/**
 * OKGUN Cookie Consent Banner Styles
 * GDPR & CCPA Compliant Design
 */

/* Banner Base Styles - Sticky Footer Bar (GDPR Compliant) */
.cookie-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(10px);
  box-shadow: 0 -1px 3px rgba(0, 0, 0, 0.08);
  z-index: 10000;
  transform: translateY(100%);
  transition: transform 0.3s ease-in-out, box-shadow 0.2s ease;
  border-top: 1px solid rgba(0, 51, 102, 0.1);
  will-change: transform;
}

.cookie-consent-banner.show {
  transform: translateY(0);
}

/* Sticky behavior - stays visible while scrolling */
.cookie-consent-banner.sticky {
  box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.12);
  background: rgba(255, 255, 255, 0.99);
}

/* Container - Minimalist Layout */
.cookie-consent-container {
  max-width: 1400px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

/* Content Layout - Single Line */
.cookie-consent-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex: 1;
}

.cookie-icon {
  font-size: 1.25rem;
  color: #6c757d;
  flex-shrink: 0;
  line-height: 1;
  opacity: 0.8;
}

.cookie-text {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.375rem;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.cookie-title {
  font-size: 0.875rem;
  font-weight: 400;
  color: #333;
  margin: 0;
  white-space: nowrap;
}

.cookie-description {
  font-size: 0.875rem;
  color: #666;
  margin: 0;
  line-height: 1.4;
  font-weight: 300;
}

.cookie-description a {
  color: #003366;
  text-decoration: none;
  border-bottom: 1px solid rgba(0, 51, 102, 0.4);
  font-weight: 500;
  transition: all 0.2s ease;
}

.cookie-description a:hover {
  color: #002244;
  border-bottom-color: #003366;
}

/* Actions - Minimalist Buttons */
.cookie-consent-actions {
  display: flex;
  flex-wrap: nowrap;
  gap: 0.5rem;
  flex-shrink: 0;
}

.cookie-consent-actions .btn {
  padding: 0.438rem 1rem;
  border-radius: 0.25rem;
  font-weight: 400;
  font-size: 0.875rem;
  border: none;
  cursor: pointer;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  letter-spacing: 0.01em;
}

.btn-accept {
  background: #003366;
  color: #ffffff;
}

.btn-accept:hover {
  background: #002244;
}

.btn-settings {
  background: transparent;
  color: #666;
  border: 1px solid #ddd;
  padding: 0.375rem 0.875rem;
}

.btn-settings:hover {
  background: #f8f9fa;
  border-color: #bbb;
  color: #333;
}

.btn-reject {
  background: transparent;
  color: #999;
  padding: 0.438rem 0.625rem;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.btn-reject:hover {
  color: #666;
  text-decoration-color: #666;
}

/* Settings Modal */
.cookie-settings-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  right: auto;
  bottom: auto;
  transform: translate(-50%, -50%) scale(0.95);
  opacity: 0;
  max-width: 560px;
  width: 90%;
  max-height: 85vh;
  overflow-y: auto;
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
  transition: all 0.25s ease;
}

.cookie-settings-modal.show {
  transform: translate(-50%, -50%) scale(1);
  opacity: 1;
}

.cookie-settings-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 1rem;
  border-bottom: 2px solid #e9ecef;
  margin-bottom: 1.5rem;
}

.btn-close-settings {
  background: none;
  border: none;
  font-size: 1.5rem;
  color: #6c757d;
  cursor: pointer;
  padding: 0.5rem;
  transition: color 0.2s;
}

.btn-close-settings:hover {
  color: #dc3545;
}

/* Cookie Categories */
.cookie-settings-content {
  margin-bottom: 1.5rem;
}

.cookie-category {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background: #f8f9fa;
  border-radius: 0.375rem;
  border-left: 4px solid #003366;
}

.cookie-category-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.cookie-category-header h6 {
  margin: 0;
  font-weight: 700;
  color: #003366;
}

.cookie-category-header small {
  display: block;
  margin-top: 0.25rem;
}

.cookie-category-desc {
  font-size: 0.875rem;
  color: #666;
  margin: 0;
  line-height: 1.5;
}

/* Toggle Switch */
.cookie-switch {
  position: relative;
  display: inline-block;
  width: 50px;
  height: 26px;
  flex-shrink: 0;
}

.cookie-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.cookie-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: 0.3s;
  border-radius: 26px;
}

.cookie-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: 0.3s;
  border-radius: 50%;
}

.cookie-switch input:checked + .cookie-slider {
  background-color: #28a745;
}

.cookie-switch input:checked + .cookie-slider:before {
  transform: translateX(24px);
}

.cookie-switch input:disabled + .cookie-slider {
  background-color: #003366;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Settings Actions */
.cookie-settings-actions {
  display: flex;
  gap: 0.75rem;
  justify-content: flex-end;
  padding-top: 1rem;
  border-top: 2px solid #e9ecef;
}

.cookie-settings-actions .btn-primary {
  background: #003366;
  color: #ffffff;
}

.cookie-settings-actions .btn-primary:hover {
  background: #002244;
}

.cookie-settings-actions .btn-success {
  background: #28a745;
  color: #ffffff;
}

.cookie-settings-actions .btn-success:hover {
  background: #218838;
}

/* Responsive Design */
@media (max-width: 991.98px) {
  .cookie-consent-container {
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem;
    gap: 1rem;
  }

  .cookie-consent-content {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.75rem;
  }

  .cookie-text {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.375rem;
  }

  .cookie-title {
    white-space: normal;
  }

  .cookie-consent-actions {
    width: 100%;
    justify-content: stretch;
  }

  .cookie-consent-actions .btn {
    flex: 1;
    min-width: 0;
  }
}

@media (max-width: 575.98px) {
  .cookie-icon {
    font-size: 1.5rem;
  }

  .cookie-title {
    font-size: 0.875rem;
  }

  .cookie-description {
    font-size: 0.813rem;
  }

  .cookie-consent-actions {
    flex-direction: column;
  }

  .cookie-consent-actions .btn {
    width: 100%;
    padding: 0.625rem 1rem;
  }
}

  .cookie-settings-modal {
    width: 95%;
  }

  .cookie-category-header {
    flex-direction: column;
    gap: 0.75rem;
  }

  .cookie-settings-actions {
    flex-direction: column;
  }

/* Accessibility */
.cookie-consent-banner:focus-within {
  border-top-color: rgba(0, 51, 102, 0.3);
}

.btn:focus-visible {
  outline: 2px solid #003366;
  outline-offset: 2px;
  box-shadow: 0 0 0 3px rgba(0, 51, 102, 0.1);
}

.cookie-description a:focus-visible {
  outline: 2px solid #003366;
  outline-offset: 2px;
  border-bottom-color: transparent;
}

/* Dark overlay for modal */
.cookie-settings-modal::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: -1;
}

/* Smooth animations */
@media (prefers-reduced-motion: reduce) {
  .cookie-consent-banner,
  .cookie-settings-modal,
  .btn,
  .cookie-slider,
  .cookie-slider:before {
    transition: none;
  }
}
