/**
 * Cookie Consent Banner Styles
 * GDPR/TTDSG Compliant Design
 */

/* Cookie Banner - Bottom Fixed */
#cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background-color: #ffffff;
  box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
  padding: 20px;
  z-index: 999999;
  display: none;
  border-top: 3px solid #d4af37;
  animation: slideUp 0.3s ease-out;
}

@keyframes slideUp {
  from {
    transform: translateY(100%);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cookie-banner-content {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.cookie-banner-text {
  color: #333;
  font-size: 14px;
  line-height: 1.6;
}

.cookie-banner-text strong {
  font-weight: 600;
  color: #000;
}

.cookie-banner-text a {
  color: #d4af37;
  text-decoration: underline;
}

.cookie-banner-text a:hover {
  color: #b8952e;
}

.cookie-banner-buttons {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

/* Cookie Buttons */
.cookie-btn {
  padding: 12px 24px;
  border: none;
  border-radius: 4px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  font-family: inherit;
}

.cookie-btn:focus {
  outline: 2px solid #d4af37;
  outline-offset: 2px;
}

.cookie-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.cookie-btn-primary {
  background-color: #d4af37;
  color: #000;
}

.cookie-btn-primary:hover {
  background-color: #b8952e;
}

.cookie-btn-secondary {
  background-color: #6c757d;
  color: #fff;
}

.cookie-btn-secondary:hover {
  background-color: #5a6268;
}

.cookie-btn-outline {
  background-color: transparent;
  color: #333;
  border: 2px solid #333;
}

.cookie-btn-outline:hover {
  background-color: #333;
  color: #fff;
}

/* Settings Modal */
.cookie-modal {
  display: none;
  position: fixed;
  z-index: 1000000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.2s ease-out;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.cookie-modal-content {
  background-color: #ffffff;
  margin: 5% auto;
  padding: 0;
  border-radius: 8px;
  width: 90%;
  max-width: 600px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateY(-50px);
    opacity: 0;
  }
  to {
    transform: translateY(0);
    opacity: 1;
  }
}

.cookie-modal-header {
  padding: 20px 24px;
  border-bottom: 1px solid #e0e0e0;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.cookie-modal-header h2 {
  margin: 0;
  font-size: 22px;
  color: #000;
  font-weight: 600;
}

.cookie-modal-close {
  background: none;
  border: none;
  font-size: 32px;
  font-weight: 300;
  color: #666;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.2s ease;
}

.cookie-modal-close:hover {
  background-color: #f5f5f5;
  color: #000;
}

.cookie-modal-close:focus {
  outline: 2px solid #d4af37;
}

.cookie-modal-body {
  padding: 24px;
  max-height: 60vh;
  overflow-y: auto;
}

.cookie-modal-body > p {
  margin-top: 0;
  margin-bottom: 20px;
  color: #555;
  line-height: 1.6;
}

.cookie-category {
  margin-bottom: 20px;
  padding: 16px;
  border: 1px solid #e0e0e0;
  border-radius: 4px;
  background-color: #f9f9f9;
}

.cookie-category-header {
  margin-bottom: 8px;
}

.cookie-category-label {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  font-weight: 500;
}

.cookie-category-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
  accent-color: #d4af37;
}

.cookie-category-label input[type="checkbox"]:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.cookie-category-name {
  font-size: 16px;
  color: #000;
}

.cookie-required {
  font-size: 12px;
  color: #666;
  font-weight: normal;
  font-style: italic;
}

.cookie-category-description {
  margin: 8px 0 0 28px;
  font-size: 14px;
  color: #666;
  line-height: 1.5;
}

.cookie-modal-footer {
  padding: 16px 24px;
  border-top: 1px solid #e0e0e0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  background-color: #f9f9f9;
  border-bottom-left-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* Footer Settings Link */
.cookie-settings-link {
  color: #d4af37;
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
  font-size: inherit;
  font-family: inherit;
  transition: color 0.2s ease;
}

.cookie-settings-link:hover {
  color: #b8952e;
}

.cookie-settings-link:focus {
  outline: 2px solid #d4af37;
  outline-offset: 2px;
}

/* Responsive Design */
@media (min-width: 768px) {
  .cookie-banner-content {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }

  .cookie-banner-text {
    flex: 1;
    margin-right: 20px;
  }

  .cookie-banner-buttons {
    flex-shrink: 0;
  }
}

@media (max-width: 767px) {
  #cookie-consent-banner {
    padding: 16px;
  }

  .cookie-banner-buttons {
    width: 100%;
  }

  .cookie-btn {
    flex: 1;
    min-width: 120px;
  }

  .cookie-modal-content {
    margin: 10% auto;
    width: 95%;
  }

  .cookie-modal-header h2 {
    font-size: 18px;
  }

  .cookie-modal-body {
    padding: 16px;
  }

  .cookie-modal-footer {
    flex-direction: column;
  }

  .cookie-modal-footer .cookie-btn {
    width: 100%;
  }
}

/* Print styles - hide cookie banner when printing */
@media print {
  #cookie-consent-banner,
  .cookie-modal {
    display: none !important;
  }
}

/* Accessibility: Reduced motion */
@media (prefers-reduced-motion: reduce) {
  #cookie-consent-banner,
  .cookie-modal,
  .cookie-modal-content {
    animation: none;
  }
}
