/* ==========================================================================
   FENIX YANGIN — KVKK & GDPR Consent Banner (Görev 3)
   Equal visual weight buttons, accessible modal/bar, 320px responsive, no CLS
   ========================================================================== */

#fx-consent-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 999999;
  background: #0f172a;
  color: #f1f5f9;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.35);
  padding: 16px 20px;
  font-family: inherit;
  font-size: 13.5px;
  line-height: 1.55;
  box-sizing: border-box;
  width: 100%;
  max-width: 100vw;
}

#fx-consent-banner * {
  box-sizing: border-box;
}

.fx-cb-inner {
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  width: 100%;
}

.fx-cb-content {
  flex: 1 1 540px;
  min-width: 0;
}

.fx-cb-text {
  margin: 0;
  color: #cbd5e1;
  font-size: 13.5px;
}

.fx-cb-text a {
  color: #ffffff;
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 600;
}

.fx-cb-text a:focus-visible {
  outline: 2px solid #be1523;
  outline-offset: 2px;
}

/* Üç buton eşit görsel ağırlıkta (KVKK kuralı) */
.fx-cb-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex: 0 0 auto;
}

.fx-cb-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 9px 18px;
  font-size: 13.5px;
  font-weight: 600;
  font-family: inherit;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s ease;
  background: #1e293b;
  color: #ffffff;
  border: 1px solid #475569;
  text-align: center;
  min-height: 38px;
  box-sizing: border-box;
}

.fx-cb-btn:hover {
  background: #334155;
  border-color: #64748b;
  color: #ffffff;
}

.fx-cb-btn:focus-visible {
  outline: 2px solid #be1523;
  outline-offset: 2px;
}

/* Tercihler Modalı */
#fx-consent-modal {
  position: fixed;
  inset: 0;
  z-index: 1000000;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 16px;
  box-sizing: border-box;
}

#fx-consent-modal.is-open {
  display: flex;
}

.fx-cm-card {
  background: #0f172a;
  color: #f1f5f9;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 12px;
  max-width: 520px;
  width: 100%;
  max-height: 90vh;
  overflow-y: auto;
  padding: 24px;
  box-shadow: 0 20px 45px rgba(0, 0, 0, 0.6);
  box-sizing: border-box;
}

.fx-cm-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding-bottom: 12px;
}

.fx-cm-title {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
  color: #ffffff;
}

.fx-cm-close {
  background: transparent;
  border: none;
  color: #94a3b8;
  font-size: 22px;
  cursor: pointer;
  line-height: 1;
  padding: 4px 8px;
  border-radius: 4px;
}

.fx-cm-close:hover {
  color: #ffffff;
}

.fx-cm-desc {
  margin: 0 0 16px;
  color: #94a3b8;
  font-size: 13px;
  line-height: 1.5;
}

.fx-cm-groups {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 20px;
}

.fx-cm-group {
  background: #1e293b;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  box-sizing: border-box;
}

.fx-cm-group-info {
  flex: 1 1 auto;
  min-width: 0;
}

.fx-cm-group-title {
  font-weight: 600;
  font-size: 14px;
  color: #ffffff;
  margin-bottom: 4px;
}

.fx-cm-group-text {
  font-size: 12.5px;
  color: #94a3b8;
  margin: 0;
  line-height: 1.45;
}

.fx-cm-switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex: 0 0 44px;
}

.fx-cm-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.fx-cm-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #475569;
  transition: .3s;
  border-radius: 24px;
}

.fx-cm-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background-color: white;
  transition: .3s;
  border-radius: 50%;
}

.fx-cm-switch input:checked + .fx-cm-slider {
  background-color: #be1523;
}

.fx-cm-switch input:disabled + .fx-cm-slider {
  opacity: 0.6;
  cursor: not-allowed;
  background-color: #16a34a;
}

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

.fx-cm-switch input:focus-visible + .fx-cm-slider {
  outline: 2px solid #be1523;
  outline-offset: 2px;
}

.fx-cm-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* Footer trigger */
.fx-consent-trigger {
  cursor: pointer;
}

@media (max-width: 600px) {
  #fx-consent-banner {
    padding: 12px 14px;
    width: 100%;
    max-width: 100vw;
    box-sizing: border-box;
  }
  .fx-cb-inner {
    gap: 10px;
    width: 100%;
  }
  .fx-cb-content {
    flex: 1 1 100%;
    min-width: 0;
    width: 100%;
  }
  .fx-cb-actions {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
  }
  .fx-cb-btn {
    width: 100%;
    padding: 9px 12px;
    font-size: 13px;
  }
  .fx-cm-card {
    padding: 16px 14px;
    max-width: 95vw;
  }
}
