/* ==========================================================================
   Fifth Layer Technology - GDPR Cookie Consent Banner & Modal Styles
   ========================================================================== */

/* Banner at bottom */
.fl-cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  background: rgba(25, 58, 34, 0.98);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #ffffff;
  border-top: 1px solid rgba(27, 133, 81, 0.35);
  box-shadow: 0 -10px 35px rgba(0, 0, 0, 0.35);
  padding: 22px 0;
  animation: flSlideUp 0.35s cubic-bezier(0.16, 1, 0.3, 1);
  display: none;
}

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

.fl-cookie-wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
}

.fl-cookie-content {
  flex: 1;
}

.fl-cookie-title {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
  color: #fff;
  font-size: 1.05rem;
}

.fl-cookie-ic {
  color: #38bdf8;
  flex-shrink: 0;
}

.fl-cookie-content p {
  font-size: 0.9rem;
  line-height: 1.55;
  color: #cbd5e1;
  margin: 0;
}

.fl-cookie-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.btn-text {
  background: none;
  border: 0;
  color: #38bdf8;
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 12px;
  text-decoration: underline;
  transition: color 0.2s;
}

.btn-text:hover {
  color: #7dd3fc;
}

/* Modal dialog */
.fl-cookie-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.fl-cookie-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 18, 38, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.fl-cookie-modal-card {
  position: relative;
  z-index: 2;
  background: #ffffff;
  color: #334155;
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  border-radius: 16px;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.4);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: flModalPop 0.25s ease-out;
}

@keyframes flModalPop {
  from {
    transform: scale(0.95);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

.fl-cookie-modal-header {
  padding: 22px 28px;
  border-bottom: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #f8fafc;
}

.fl-cookie-modal-header h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #0b1b3b;
  margin: 0;
}

.fl-close-btn {
  background: none;
  border: 0;
  font-size: 1.8rem;
  line-height: 1;
  color: #64748b;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
  transition: color 0.2s, background 0.2s;
}

.fl-close-btn:hover {
  color: #0b1b3b;
  background: #e2e8f0;
}

.fl-cookie-modal-body {
  padding: 24px 28px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.fl-modal-intro {
  font-size: 0.92rem;
  line-height: 1.6;
  color: #64748b;
  margin: 0;
}

.fl-cookie-category {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 18px 20px;
}

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

.fl-category-header strong {
  font-size: 0.98rem;
  color: #0b1b3b;
}

.fl-badge-required {
  display: inline-block;
  background: #dff0f3;
  color: #0d6c80;
  font-size: 0.74rem;
  font-weight: 700;
  padding: 2px 10px;
  border-radius: 99px;
  margin-left: 8px;
}

.fl-cookie-category p {
  font-size: 0.86rem;
  color: #64748b;
  line-height: 1.55;
  margin: 0;
}

/* Toggle Switches */
.fl-switch {
  position: relative;
  display: inline-block;
  width: 46px;
  height: 26px;
  flex-shrink: 0;
}

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

.fl-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background-color: #cbd5e1;
  transition: 0.25s;
  border-radius: 99px;
}

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

.fl-switch input:checked + .fl-slider {
  background-color: #1b8551;
}

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

.fl-cookie-modal-footer {
  padding: 18px 28px;
  border-top: 1px solid #e2e8f0;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #f8fafc;
}

/* Mobile responsive */
@media (max-width: 840px) {
  .fl-cookie-wrap {
    flex-direction: column;
    align-items: stretch;
    gap: 18px;
    padding: 0 18px;
  }
  .fl-cookie-actions {
    flex-wrap: wrap;
    justify-content: stretch;
  }
  .fl-cookie-actions .btn {
    flex: 1;
    min-width: 130px;
  }
  .fl-cookie-actions .btn-text {
    width: 100%;
    text-align: center;
  }
  .fl-cookie-modal-card {
    max-height: 95vh;
  }
  .fl-cookie-modal-header,
  .fl-cookie-modal-body,
  .fl-cookie-modal-footer {
    padding: 18px 20px;
  }
  .fl-cookie-modal-footer {
    flex-direction: column-reverse;
  }
  .fl-cookie-modal-footer .btn {
    width: 100%;
  }
}
