/* Cookie consent banner + preferences panel (partials/cookie-consent.blade.php).
   Standalone file so it works on both layouts.app and the nabat-miite page. */

.cookie-consent {
  --cc-green: #004E35;
  --cc-green-hover: #096151;
  --cc-text: #1a1a1a;
  --cc-muted: #5c5c5c;
  --cc-border: #d9d9d9;
  font-family: "Manrope", sans-serif;
  color: var(--cc-text);
  font-size: 15px;
  line-height: 1.5;
}

.cookie-consent[hidden] {
  display: none !important;
}

.cookie-consent p {
  margin: 0 0 .75rem;
}

.cookie-consent a {
  color: var(--cc-green);
  text-decoration: underline;
}

.cookie-consent-title {
  font-family: "Manrope", sans-serif;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.3;
  margin: 0 0 .5rem;
  color: var(--cc-text);
}

/* Banner — sits above the preloader (9999) and NProgress (99992) */
.cookie-consent-banner {
  position: fixed;
  left: 16px;
  right: 16px;
  bottom: 16px;
  z-index: 100000;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, .2);
  padding: 20px 24px;
}

.cookie-consent-inner {
  display: flex;
  flex-direction: column;
  gap: 16px;
  max-width: 1200px;
  margin: 0 auto;
}

.cookie-consent-banner .cookie-consent-text p {
  margin: 0;
}

/* The three first-screen buttons: same width, same style, same weight */
.cookie-consent-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.cookie-consent-btn {
  flex: 1 1 0;
  min-height: 44px;
  padding: 10px 18px;
  border: 2px solid var(--cc-green);
  border-radius: 999px;
  background: var(--cc-green);
  color: #fff;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease;
}

.cookie-consent-btn:hover {
  background: var(--cc-green-hover);
  border-color: var(--cc-green-hover);
}

.cookie-consent-btn:focus-visible,
.cookie-consent-close:focus-visible,
.cookie-consent-switch:focus-visible,
.cookie-consent a:focus-visible {
  outline: 3px solid #f2b705;
  outline-offset: 2px;
}

@media (min-width: 768px) {
  .cookie-consent-actions {
    flex-direction: row;
  }
}

@media (min-width: 1200px) {
  .cookie-consent-inner {
    flex-direction: row;
    align-items: center;
    gap: 32px;
  }

  .cookie-consent-banner .cookie-consent-actions {
    flex: 0 0 auto;
    width: 660px;
  }
}

/* Preferences panel (modal) */
.cookie-consent-panel {
  position: fixed;
  inset: 0;
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  background: rgba(0, 0, 0, .5);
}

.cookie-consent-panel-box {
  width: 100%;
  max-width: 640px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #fff;
  border-radius: 12px;
  padding: 24px;
}

.cookie-consent-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.cookie-consent-close {
  border: 0;
  background: none;
  font-size: 28px;
  line-height: 1;
  padding: 0 4px;
  color: var(--cc-text);
  cursor: pointer;
}

.cookie-consent-category {
  border-top: 1px solid var(--cc-border);
  padding: 14px 0 4px;
}

.cookie-consent-category:last-of-type {
  margin-bottom: 16px;
}

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

.cookie-consent-category-head label {
  font-weight: 700;
  cursor: pointer;
}

.cookie-consent-providers {
  color: var(--cc-muted);
  font-size: 13px;
}

/* Toggle switch */
.cookie-consent-switch {
  appearance: none;
  -webkit-appearance: none;
  position: relative;
  width: 44px;
  height: 24px;
  margin: 0;
  border-radius: 999px;
  background: #bdbdbd;
  cursor: pointer;
  flex: 0 0 auto;
  transition: background-color .2s ease;
}

.cookie-consent-switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: #fff;
  transition: transform .2s ease;
}

.cookie-consent-switch:checked {
  background: var(--cc-green);
}

.cookie-consent-switch:checked::after {
  transform: translateX(20px);
}

.cookie-consent-switch:disabled {
  opacity: .6;
  cursor: not-allowed;
}
