/**
 * 3S Systeme - Cookie Consent & Google Consent Mode v2 Styles
 * Brand: Warm Amber Gold (#F5B301) & Charcoal (#18181B)
 */

/* Fixed Banner at bottom */
.cookie-banner-wrapper {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 99999;
  background: rgba(24, 24, 27, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 2px solid #F5B301;
  box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35);
  color: #F8FAFC;
  padding: 24px;
  animation: slideUpBanner 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  font-family: inherit;
}

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

.cookie-banner-container {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  flex-wrap: wrap;
}

.cookie-banner-text {
  flex: 1 1 500px;
}

.cookie-banner-title {
  font-size: 17px;
  font-weight: 700;
  color: #FFFFFF;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-banner-desc {
  font-size: 13.5px;
  line-height: 1.6;
  color: #CBD5E1;
  margin: 0;
}

.cookie-banner-desc a {
  color: #F5B301;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.cookie-banner-desc a:hover {
  color: #FCD34D;
}

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

.btn-cookie {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 18px;
  border-radius: 8px;
  font-size: 13.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
  border: none;
  white-space: nowrap;
}

.btn-cookie-primary {
  background: #F5B301;
  color: #18181B;
}

.btn-cookie-primary:hover {
  background: #E5A500;
  transform: translateY(-1px);
}

.btn-cookie-secondary {
  background: rgba(255, 255, 255, 0.1);
  color: #F8FAFC;
  border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-cookie-secondary:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.35);
}

.btn-cookie-link {
  background: transparent;
  color: #94A3B8;
  font-weight: 600;
  text-decoration: underline;
  padding: 8px 12px;
}

.btn-cookie-link:hover {
  color: #FFFFFF;
}

/* Modal Overlay for Detailed Settings */
.cookie-modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 100000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeInModal 0.25s ease-out;
}

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

.cookie-modal-card {
  background: #FFFFFF;
  color: #1E293B;
  border-radius: 14px;
  max-width: 620px;
  width: 100%;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.45);
}

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

.cookie-modal-header h3 {
  margin: 0;
  font-size: 19px;
  font-weight: 800;
  color: #0F172A;
}

.cookie-modal-close {
  background: transparent;
  border: none;
  font-size: 24px;
  color: #94A3B8;
  cursor: pointer;
  line-height: 1;
}

.cookie-modal-close:hover {
  color: #0F172A;
}

.cookie-modal-body {
  padding: 24px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.6;
}

.cookie-category-item {
  border: 1px solid #E2E8F0;
  border-radius: 10px;
  padding: 18px;
  margin-bottom: 16px;
  background: #F8FAFC;
  transition: border-color 0.2s;
}

.cookie-category-item:last-child {
  margin-bottom: 0;
}

.cookie-category-item:hover {
  border-color: #CBD5E1;
}

.cookie-category-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.cookie-category-title {
  font-weight: 700;
  font-size: 15px;
  color: #0F172A;
  display: flex;
  align-items: center;
  gap: 8px;
}

.cookie-category-badge {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  background: #E2E8F0;
  color: #475569;
  padding: 3px 8px;
  border-radius: 4px;
}

.cookie-category-desc {
  font-size: 13px;
  color: #64748B;
  margin: 0;
}

/* Custom Switch for Toggles */
.cookie-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
}

.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: #CBD5E1;
  transition: 0.25s;
  border-radius: 24px;
}

.cookie-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: 0.25s;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

input:checked + .cookie-slider {
  background-color: #F5B301;
}

input:checked + .cookie-slider:before {
  transform: translateX(20px);
}

input:disabled + .cookie-slider {
  background-color: #94A3B8;
  cursor: not-allowed;
  opacity: 0.8;
}

.cookie-modal-footer {
  padding: 18px 24px;
  border-top: 1px solid #E2E8F0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #FFFFFF;
}

/* Floating Reopen Button (Bottom Left) */
.cookie-reopen-btn {
  position: fixed;
  bottom: 20px;
  left: 20px;
  z-index: 9999;
  background: #18181B;
  color: #F5B301;
  border: 1px solid rgba(245, 179, 1, 0.4);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
  font-size: 20px;
}

.cookie-reopen-btn:hover {
  transform: scale(1.1);
  background: #27272A;
  border-color: #F5B301;
}

@media (max-width: 768px) {
  .cookie-banner-container {
    flex-direction: column;
    align-items: stretch;
  }
  .cookie-banner-actions {
    flex-direction: column;
    width: 100%;
  }
  .btn-cookie {
    width: 100%;
  }
  .cookie-reopen-btn {
    bottom: 15px;
    left: 15px;
    width: 40px;
    height: 40px;
    font-size: 18px;
  }
}
