/**
 * AI Robotics - Cookie Consent Banner Styles
 * Minimal, non-intrusive styling for consent management
 */

/* Consent Banner Container */
#consent-banner {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid #e0e0e0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  z-index: 9999;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
}

#consent-banner.show {
  display: flex;
}

/* Consent Banner Text */
#consent-banner-text {
  flex: 1;
  min-width: 250px;
  font-size: 14px;
  line-height: 1.5;
  color: #333;
}

#consent-banner-text p {
  margin: 0;
}

/* Consent Banner Buttons Container */
#consent-banner-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
}

/* Consent Buttons */
.consent-btn {
  padding: 10px 20px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
  white-space: nowrap;
}

#consent-accept-btn {
  background: #2c3e50;
  color: white;
}

#consent-accept-btn:hover {
  background: #1a252f;
}

#consent-deny-btn {
  background: #ecf0f1;
  color: #333;
  border: 1px solid #bdc3c7;
}

#consent-deny-btn:hover {
  background: #d5dbdb;
}

#consent-settings-btn {
  background: transparent;
  color: #2c3e50;
  border: 1px solid #2c3e50;
  text-decoration: underline;
}

#consent-settings-btn:hover {
  background: #f8f9fa;
}

/* Settings Panel */
#consent-settings-panel {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: #ffffff;
  border-top: 1px solid #e0e0e0;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  padding: 30px 20px;
  z-index: 10000;
  max-height: 80vh;
  overflow-y: auto;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

#consent-settings-panel.show {
  display: block;
}

/* Settings Panel Header */
.consent-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid #e0e0e0;
  padding-bottom: 15px;
}

.consent-settings-header h3 {
  margin: 0;
  font-size: 18px;
  color: #333;
}

#consent-close-settings-btn {
  background: none;
  border: none;
  font-size: 24px;
  cursor: pointer;
  color: #666;
  padding: 0;
  width: 30px;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: center;
}

#consent-close-settings-btn:hover {
  color: #333;
}

/* Settings Options */
.consent-settings-options {
  margin-bottom: 30px;
}

.consent-setting-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 15px 0;
  border-bottom: 1px solid #f0f0f0;
}

.consent-setting-item:last-child {
  border-bottom: none;
}

.consent-setting-label {
  flex: 1;
}

.consent-setting-label h4 {
  margin: 0 0 5px 0;
  font-size: 14px;
  font-weight: 600;
  color: #333;
}

.consent-setting-label p {
  margin: 0;
  font-size: 12px;
  color: #666;
}

/* Toggle Switch */
.consent-toggle {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
}

.consent-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.consent-toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.4s;
  border-radius: 26px;
}

.consent-toggle-slider:before {
  position: absolute;
  content: "";
  height: 20px;
  width: 20px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.4s;
  border-radius: 50%;
}

.consent-toggle input:checked + .consent-toggle-slider {
  background-color: #2c3e50;
}

.consent-toggle input:checked + .consent-toggle-slider:before {
  transform: translateX(24px);
}

/* Settings Buttons */
.consent-settings-buttons {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid #e0e0e0;
}

#consent-save-settings-btn {
  padding: 10px 24px;
  background: #2c3e50;
  color: white;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.3s ease;
}

#consent-save-settings-btn:hover {
  background: #1a252f;
}

/* Responsive Design */
@media (max-width: 768px) {
  #consent-banner {
    flex-direction: column;
    align-items: stretch;
    padding: 15px;
  }

  #consent-banner-text {
    min-width: auto;
    font-size: 13px;
  }

  #consent-banner-buttons {
    width: 100%;
    justify-content: stretch;
  }

  .consent-btn {
    flex: 1;
    text-align: center;
  }

  #consent-settings-panel {
    padding: 20px 15px;
  }

  .consent-settings-header {
    margin-bottom: 15px;
  }

  .consent-setting-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  .consent-toggle {
    align-self: flex-end;
  }

  .consent-settings-buttons {
    flex-direction: column;
    gap: 10px;
  }

  .consent-btn {
    width: 100%;
  }

  #consent-save-settings-btn {
    width: 100%;
  }
}

/* Accessibility */
.consent-btn:focus,
#consent-close-settings-btn:focus,
.consent-toggle input:focus + .consent-toggle-slider {
  outline: 2px solid #2c3e50;
  outline-offset: 2px;
}

/* Print Styles */
@media print {
  #consent-banner,
  #consent-settings-panel {
    display: none !important;
  }
}
