﻿/* Age Gate overlay - Revised for Cleanliness and Consistency */
:root {
  --ag-backdrop: rgba(10, 11, 12, 0.9);
  --ag-card-bg: #1a1b1e;
  --ag-red-1: #e11d48;
  --ag-red-2: #f43f5e;
  --ag-text: #e8e8ea;
  --ag-subtext: #9ca3af;
  --ag-shadow: 0 20px 60px rgba(0,0,0,0.55), 0 10px 24px rgba(225, 29, 72, 0.25);
  --ag-border-color: rgba(255, 255, 255, 0.08);
  --ag-accent-color: var(--ag-red-1);
  --ag-checkbox-color: var(--ag-red-1);
}

body.age-gate-open #page-root {
  filter: blur(6px) saturate(0.9) brightness(0.8);
  pointer-events: none;
  user-select: none;
}

.ag-overlay {
  position: fixed;
  inset: 0;
  background: var(--ag-backdrop);
  display: grid;
  place-items: center;
  z-index: 999999;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.ag-card {
  width: min(560px, 92vw);
  border-radius: 16px;
  background:
    radial-gradient(120% 120% at 10% 10%, rgba(225,29,72,0.15) 0%, rgba(225,29,72,0) 40%),
    radial-gradient(120% 120% at 90% 0%, rgba(244,63,94,0.1) 0%, rgba(244,63,94,0) 40%),
    var(--ag-card-bg);
  box-shadow: var(--ag-shadow);
  padding: 32px;
  color: var(--ag-text);
  border: 1px solid var(--ag-border-color);
  font-family: 'Inter', sans-serif;
  font-display: swap;
}

.ag-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  opacity: 0.95;
  margin-bottom: 12px;
}
.ag-logo img { width: 26px; height: 26px; }
.ag-logo span { color: var(--ag-text); }
.ag-logo span:last-child { color: var(--ag-red-1); }

.ag-title {
  font-size: clamp(24px, 2.5vw, 32px);
  line-height: 1.2;
  margin: 8px 0 12px 0;
  font-weight: 800;
  color: var(--ag-text);
}

.ag-subtitle {
  font-size: 15px;
  color: var(--ag-subtext);
  margin-bottom: 24px;
}

.ag-bullet {
  display: flex;
  align-items: start;
  gap: 10px;
  font-size: 15px;
  color: var(--ag-text);
  opacity: 0.9;
  margin: 6px 0;
}

.ag-bullet::before {
  content: '✓';
  color: var(--ag-accent-color);
  font-weight: 700;
  margin-top: 2px;
}

.ag-bullet:has(input[type="checkbox"]) {
    gap: 10px;
}

.ag-bullet:has(input[type="checkbox"])::before {
    content: '';
    margin-top: 0;
}

/* ✅ OPRAVENÉ: Checkbox wrapper mimo grid layout */
.ag-checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
    margin-bottom: 8px;
}

.ag-checkbox-wrapper input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--ag-checkbox-color);
    cursor: pointer;
    border-radius: 4px;
    flex-shrink: 0;
}

.ag-checkbox-wrapper label {
    font-size: 14px;
    color: var(--ag-subtext);
    cursor: pointer;
    line-height: 1.4;
}

.ag-checkbox-wrapper label a {
    color: var(--ag-accent-color);
    text-decoration: underline;
    font-weight: 600;
}

/* ✅ OPRAVENÉ: Chybová správa */
#ag-terms-error {
    color: #f43f5e;
    font-size: 13px;
    margin-bottom: 12px;
    padding: 8px 12px;
    background: rgba(244, 63, 94, 0.1);
    border-radius: 8px;
    border: 1px solid rgba(244, 63, 94, 0.3);
}

/* ✅ OPRAVENÉ: Tlačidlá v samostatnom grid layout */
.ag-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 16px;
}

.ag-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 14px 18px;
  border-radius: 9999px;
  font-weight: 700;
  border: 0;
  cursor: pointer;
  transition: transform 0.08s ease, filter 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
  font-size: 16px;
  width: 100%;
}

.ag-btn:active { transform: translateY(1px); }

.ag-btn-enter {
  background: linear-gradient(180deg, var(--ag-red-1), var(--ag-red-2));
  color: var(--ag-text);
  box-shadow: 0 8px 20px rgba(225, 29, 72, 0.3);
}

.ag-btn-enter:hover { 
  filter: brightness(1.08); 
  box-shadow: 0 12px 28px rgba(225, 29, 72, 0.4); 
}

.ag-btn-leave {
  background: var(--ag-card-bg);
  color: var(--ag-subtext);
  border: 1px solid var(--ag-border-color);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.06);
}

.ag-btn-leave:hover { 
  background: rgba(255, 255, 255, 0.08); 
  color: var(--ag-text); 
  border-color: var(--ag-border-color); 
}

.ag-btn[disabled] {
  opacity: 0.55;
  cursor: not-allowed;
  filter: grayscale(40%) brightness(0.9);
  box-shadow: none;
}

.ag-foot {
  margin-top: 12px;
  font-size: 13px;
  color: var(--ag-subtext);
  text-align: center;
  opacity: 0.9;
}

.ag-kbd {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 6px;
  background: #231518;
  border: 1px solid rgba(255,255,255,0.08);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 11px;
}

@media (max-width: 420px) {
  .ag-actions { grid-template-columns: 1fr; }
  .ag-card { padding: 24px; }
}