/* ============================================================
   Cookie Consent — shared styles (Lucky Hand Mining)
   Banner + preferences modal with granular category toggles.
   ============================================================ */

.cc-banner,
.cc-banner *,
.cc-modal,
.cc-modal * {
  box-sizing: border-box;
}

/* ---------------- Banner ---------------- */
.cc-banner {
  position: fixed;
  left: 50%;
  bottom: 24px;
  z-index: 2000;
  width: min(640px, calc(100% - 32px));
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 24px 26px;
  border-radius: 18px;
  border: 1px solid rgba(214, 164, 90, 0.28);
  background: linear-gradient(180deg, rgba(20, 18, 15, 0.94) 0%, rgba(9, 9, 9, 0.96) 100%);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.55), inset 0 0 30px rgba(255, 186, 84, 0.05);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateX(-50%) translateY(24px);
  transition: opacity 0.45s ease, transform 0.45s ease, visibility 0.45s ease;
}

.cc-banner.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}

.cc-banner__main {
  display: flex;
  align-items: flex-start;
  gap: 16px;
}

.cc-banner__icon {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #1a1206;
  background: linear-gradient(135deg, #ffe29f 0%, #e4b16a 45%, #ba6c2c 100%);
  box-shadow: 0 8px 20px rgba(163, 103, 45, 0.35);
}

.cc-banner__body {
  flex: 1;
  min-width: 0;
}

.cc-banner__title {
  margin: 0 0 8px;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: #fff;
}

.cc-banner__text {
  margin: 0;
  font-family: "Montserrat", sans-serif;
  font-size: 13.5px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.7);
}

.cc-banner__text a,
.cc-modal__desc a {
  color: #e4b16a;
  text-decoration: none;
  border-bottom: 1px solid rgba(228, 177, 106, 0.4);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.cc-banner__text a:hover,
.cc-modal__desc a:hover {
  color: #ffe29f;
  border-color: rgba(255, 226, 159, 0.8);
}

.cc-banner__actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ---------------- Buttons ---------------- */
.cc-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 46px;
  padding: 0 24px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 13px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform 0.25s ease, box-shadow 0.25s ease, background 0.25s ease, border-color 0.25s ease, color 0.25s ease;
}

.cc-btn--primary {
  border-color: rgba(246, 226, 181, 0.62);
  background: linear-gradient(96deg, #d8ab69 0%, #ca9a5b 46%, #9b673f 100%);
  color: #17110a;
  box-shadow: 0 8px 20px rgba(163, 103, 45, 0.32);
}

.cc-btn--primary:hover {
  transform: translateY(-2px);
  background: linear-gradient(96deg, #ffffff 0%, #ececec 100%);
  border-color: rgba(255, 255, 255, 0.86);
  box-shadow: 0 12px 28px rgba(255, 255, 255, 0.18);
}

.cc-btn--secondary {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.82);
}

.cc-btn--secondary:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 255, 255, 0.42);
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.cc-btn--ghost {
  border-color: rgba(214, 164, 90, 0.4);
  background: transparent;
  color: #e4b16a;
}

.cc-btn--ghost:hover {
  transform: translateY(-2px);
  border-color: rgba(255, 226, 159, 0.8);
  background: rgba(228, 177, 106, 0.08);
  color: #ffe29f;
}

.cc-btn:focus-visible {
  outline: 2px solid #ffe29f;
  outline-offset: 3px;
}

/* ---------------- Modal ---------------- */
.cc-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.35s ease, visibility 0.35s ease;
}

.cc-modal.is-visible {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.cc-modal__overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.cc-modal__dialog {
  position: relative;
  width: min(560px, 100%);
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  padding: 32px;
  border-radius: 20px;
  border: 1px solid rgba(214, 164, 90, 0.22);
  background: linear-gradient(180deg, rgba(22, 20, 16, 0.98) 0%, rgba(10, 10, 10, 0.98) 100%);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.6), inset 0 0 48px rgba(255, 186, 84, 0.04);
  transform: translateY(16px) scale(0.98);
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}

.cc-modal.is-visible .cc-modal__dialog {
  transform: translateY(0) scale(1);
}

.cc-modal__close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.7);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.cc-modal__close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.3);
}

.cc-modal__close:focus-visible {
  outline: 2px solid #ffe29f;
  outline-offset: 2px;
}

.cc-modal__title {
  margin: 0 38px 10px 0;
  font-family: "Montserrat", sans-serif;
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.02em;
  color: #fff;
}

.cc-modal__desc {
  margin: 0 0 22px;
  font-family: "Montserrat", sans-serif;
  font-size: 13.5px;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.65);
}

.cc-options {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-bottom: 26px;
}

.cc-option {
  padding: 16px 18px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
}

.cc-option__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.cc-option__name {
  font-family: "Montserrat", sans-serif;
  font-weight: 600;
  font-size: 14.5px;
  color: #fff;
}

.cc-option__desc {
  margin: 8px 0 0;
  font-family: "Montserrat", sans-serif;
  font-size: 12.5px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.55);
}

.cc-modal__actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

/* ---------------- Toggle switch ---------------- */
.cc-switch {
  position: relative;
  flex-shrink: 0;
  display: inline-flex;
}

.cc-switch input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}

.cc-switch__track {
  display: inline-flex;
  align-items: center;
  width: 46px;
  height: 26px;
  padding: 2px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.12);
  transition: background 0.25s ease, border-color 0.25s ease;
}

.cc-switch__thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.25s ease;
}

.cc-switch input:checked + .cc-switch__track {
  background: linear-gradient(96deg, #d8ab69 0%, #ca9a5b 46%, #9b673f 100%);
  border-color: rgba(246, 226, 181, 0.6);
}

.cc-switch input:checked + .cc-switch__track .cc-switch__thumb {
  transform: translateX(20px);
}

.cc-switch input:focus-visible + .cc-switch__track {
  outline: 2px solid #ffe29f;
  outline-offset: 2px;
}

.cc-switch--locked .cc-switch__track {
  opacity: 0.7;
  cursor: not-allowed;
}

.cc-switch--locked input {
  cursor: not-allowed;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 600px) {
  .cc-banner {
    gap: 16px;
    bottom: 16px;
    padding: 22px 20px;
  }

  .cc-banner__actions {
    flex-direction: column-reverse;
  }

  .cc-banner__actions .cc-btn {
    width: 100%;
  }

  .cc-modal__dialog {
    padding: 26px 22px;
  }

  .cc-modal__actions {
    flex-direction: column-reverse;
  }

  .cc-modal__actions .cc-btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .cc-banner {
    transition: opacity 0.3s ease, visibility 0.3s ease;
    transform: translateX(-50%);
  }

  .cc-banner.is-visible {
    transform: translateX(-50%);
  }

  .cc-modal__dialog {
    transition: none;
    transform: none;
  }
}
