/* Gheosoft CMP — Cookie Consent Management Platform */
.gh-cmp {
  --gh-cmp-bg: #1a1a2e;
  --gh-cmp-surface: #16213e;
  --gh-cmp-text: #f0f0f5;
  --gh-cmp-muted: #a0a0b8;
  --gh-cmp-primary: #3b82f6;
  --gh-cmp-primary-hover: #2563eb;
  --gh-cmp-border: rgba(255, 255, 255, 0.15);
  --gh-cmp-radius: 14px;
  --gh-cmp-z: 99990;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
  color: var(--gh-cmp-text);
  box-sizing: border-box;
}

.gh-cmp *,
.gh-cmp *::before,
.gh-cmp *::after {
  box-sizing: border-box;
}

.gh-cmp[hidden] {
  display: none !important;
}

body.gh-cmp-locked {
  overflow: hidden !important;
  touch-action: none;
}

/* Blocking overlay (first visit / reopen settings) */
.gh-cmp__overlay {
  position: fixed;
  inset: 0;
  z-index: var(--gh-cmp-z);
  background: rgba(10, 12, 24, 0.72);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
}

.gh-cmp__overlay[hidden] {
  display: none !important;
}

.gh-cmp__overlay--blocking {
  pointer-events: auto;
  cursor: default;
}

/* First-visit center card (was bottom banner) */
.gh-cmp__banner {
  position: fixed;
  inset: 0;
  z-index: calc(var(--gh-cmp-z) + 1);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
}

.gh-cmp__banner[hidden] {
  display: none !important;
}

.gh-cmp__banner-inner {
  pointer-events: auto;
  width: 100%;
  max-width: 520px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  background: var(--gh-cmp-bg);
  border: 1px solid var(--gh-cmp-border);
  border-radius: var(--gh-cmp-radius);
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  padding: 24px 22px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.gh-cmp__banner-content {
  min-width: 0;
}

.gh-cmp__title {
  margin: 0 0 8px;
  font-size: 18px;
  font-weight: 650;
  color: var(--gh-cmp-text);
}

.gh-cmp__text {
  margin: 0;
  font-size: 14px;
  color: var(--gh-cmp-muted);
}

.gh-cmp__privacy-link {
  color: var(--gh-cmp-primary);
  text-decoration: underline;
  margin-left: 4px;
}

.gh-cmp__privacy-link:hover {
  color: #60a5fa;
}

.gh-cmp__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gh-cmp__actions .gh-cmp__btn--primary {
  flex: 1 1 auto;
}

/* Buttons */
.gh-cmp__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 18px;
  border-radius: 8px;
  border: 1px solid var(--gh-cmp-border);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
  white-space: nowrap;
  line-height: 1.2;
  background: transparent;
  color: var(--gh-cmp-text);
}

.gh-cmp__btn:focus {
  outline: 2px solid var(--gh-cmp-primary);
  outline-offset: 2px;
}

.gh-cmp__btn--primary {
  background: var(--gh-cmp-primary);
  border-color: var(--gh-cmp-primary);
  color: #fff;
}

.gh-cmp__btn--primary:hover {
  background: var(--gh-cmp-primary-hover);
  border-color: var(--gh-cmp-primary-hover);
}

.gh-cmp__btn--secondary:hover {
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.3);
}

/* Customize modal */
.gh-cmp__modal {
  position: fixed;
  inset: 0;
  z-index: calc(var(--gh-cmp-z) + 2);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  pointer-events: none;
}

.gh-cmp__modal[hidden] {
  display: none !important;
}

.gh-cmp__modal-dialog {
  pointer-events: auto;
  background: var(--gh-cmp-surface);
  border-radius: var(--gh-cmp-radius);
  border: 1px solid var(--gh-cmp-border);
  width: 100%;
  max-width: 480px;
  max-height: calc(100vh - 32px);
  overflow: auto;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
}

.gh-cmp__modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--gh-cmp-border);
}

.gh-cmp__modal-title {
  margin: 0;
  font-size: 17px;
  font-weight: 600;
}

.gh-cmp__modal-close {
  background: transparent;
  border: none;
  color: var(--gh-cmp-muted);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 4px;
}

.gh-cmp__modal-close:hover {
  color: var(--gh-cmp-text);
  background: rgba(255, 255, 255, 0.08);
}

.gh-cmp__modal-close:focus {
  outline: 2px solid var(--gh-cmp-primary);
}

.gh-cmp__modal-body {
  padding: 12px 20px;
}

.gh-cmp__modal-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px 20px 16px;
  border-top: 1px solid var(--gh-cmp-border);
}

.gh-cmp__category {
  padding: 12px 0;
  border-bottom: 1px solid var(--gh-cmp-border);
}

.gh-cmp__category:last-child {
  border-bottom: none;
}

.gh-cmp__category-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gh-cmp__category-desc {
  margin: 6px 0 0;
  font-size: 12px;
  color: var(--gh-cmp-muted);
}

.gh-cmp__badge {
  display: inline-block;
  margin-left: 8px;
  padding: 2px 8px;
  font-size: 11px;
  font-weight: 500;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.2);
  color: #93c5fd;
  vertical-align: middle;
}

.gh-cmp__switch {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  flex-shrink: 0;
  cursor: pointer;
}

.gh-cmp__switch input {
  opacity: 0;
  width: 0;
  height: 0;
  position: absolute;
}

.gh-cmp__slider {
  position: absolute;
  inset: 0;
  background: #374151;
  border-radius: 24px;
  transition: background 0.2s;
}

.gh-cmp__slider::before {
  content: "";
  position: absolute;
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.2s;
}

.gh-cmp__switch input:checked + .gh-cmp__slider {
  background: var(--gh-cmp-primary);
}

.gh-cmp__switch input:checked + .gh-cmp__slider::before {
  transform: translateX(20px);
}

.gh-cmp__switch input:disabled + .gh-cmp__slider {
  opacity: 0.7;
  cursor: not-allowed;
}

.gh-cmp__switch input:focus + .gh-cmp__slider {
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

.gh-cmp__reopen {
  position: fixed;
  left: 12px;
  bottom: 12px;
  z-index: calc(var(--gh-cmp-z) - 1);
  background: var(--gh-cmp-bg);
  color: var(--gh-cmp-muted);
  border: 1px solid var(--gh-cmp-border);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.25);
  transition: color 0.15s, background 0.15s;
}

.gh-cmp__reopen:hover {
  color: var(--gh-cmp-text);
  background: var(--gh-cmp-surface);
}

.gh-cmp__reopen:focus {
  outline: 2px solid var(--gh-cmp-primary);
  outline-offset: 2px;
}

.gh-cmp__reopen[hidden] {
  display: none !important;
}

@media (max-width: 640px) {
  .gh-cmp__banner-inner {
    max-width: 100%;
    padding: 20px 16px 16px;
  }

  .gh-cmp__actions {
    flex-direction: column;
  }

  .gh-cmp__btn {
    width: 100%;
  }

  .gh-cmp__modal {
    align-items: flex-end;
    padding: 0;
  }

  .gh-cmp__modal-dialog {
    max-width: 100%;
    max-height: 90vh;
    border-radius: var(--gh-cmp-radius) var(--gh-cmp-radius) 0 0;
  }

  .gh-cmp__modal-footer {
    flex-direction: column;
  }

  .gh-cmp__modal-footer .gh-cmp__btn {
    width: 100%;
  }

  .gh-cmp__reopen {
    left: 8px;
    bottom: calc(8px + env(safe-area-inset-bottom, 0px));
  }
}
