/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: white;
}

/* Admin: mobile-use warning banner (js/admin-toolbar.js adds this via
   adminRenderMobileBanner) — only visible on narrow viewports, since the
   admin tools are not designed for small screens. */
.admin-mobile-banner {
    display: none;
    background: #7a3b12;
    color: #ffe8cf;
    padding: 0.6rem 1rem;
    font-size: 0.85rem;
    text-align: center;
}
@media (max-width: 700px) {
    .admin-mobile-banner { display: block; }
}

/* Admin: shared Print/Export toolbar (js/admin-toolbar.js) */
.admin-toolbar {
    display: flex;
    gap: 0.6rem;
    margin: 1rem 0;
}
.admin-toolbar button {
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.08);
    color: white;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}
.admin-toolbar button:hover { background: rgba(255,255,255,0.16); }
.admin-toolbar button:disabled { opacity: 0.5; cursor: default; }

/* Super Admin panel (js/admin-superadmin.js) — visually differentiated,
   only rendered for the wizardpay-superadmin credential. */
.superadmin-panel {
    margin: 1.5rem 0;
    padding: 1.25rem 1.5rem;
    border-radius: 8px;
    background: rgba(255, 200, 87, 0.08);
    border: 1px solid rgba(255, 200, 87, 0.3);
}
.superadmin-heading {
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
    color: #ffd257;
}
.superadmin-status {
    font-size: 0.85rem;
    opacity: 0.85;
    margin-bottom: 1rem;
}
.superadmin-restore-block { margin-bottom: 1.25rem; }
.superadmin-restore-label {
    display: block;
    font-weight: 600;
    margin-bottom: 0.25rem;
}
.superadmin-restore-help {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 0.6rem;
}
.superadmin-restore-explainer {
    font-size: 0.8rem;
    opacity: 0.7;
    font-style: italic;
    margin-bottom: 0.75rem;
}
.superadmin-datetime {
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.25);
    background: rgba(255,255,255,0.08);
    color: white;
    font-family: inherit;
    margin-right: 0.6rem;
}
.superadmin-datetime-ago {
    font-size: 0.8rem;
    opacity: 0.75;
    margin-top: 0.35rem;
    margin-bottom: 0.6rem;
}
.superadmin-restore-btn {
    padding: 0.4rem 0.9rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 200, 87, 0.5);
    background: rgba(255, 200, 87, 0.15);
    color: white;
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}
.superadmin-restore-btn:hover { background: rgba(255, 200, 87, 0.25); }
.superadmin-restore-btn:disabled { opacity: 0.5; cursor: default; }
.superadmin-result { margin-top: 0.5rem; font-size: 0.85rem; }
.superadmin-result-error {
    color: white;
    background: rgba(192, 57, 43, 0.55);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    display: inline-block;
}
.superadmin-result-success {
    color: white;
    background: rgba(26, 122, 60, 0.55);
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    display: inline-block;
}
.superadmin-cli-block {
    padding-top: 1rem;
    border-top: 1px solid rgba(255,255,255,0.12);
    font-size: 0.85rem;
    opacity: 0.85;
}
.superadmin-cli-block h3 { font-size: 0.95rem; margin-bottom: 0.4rem; opacity: 1; }
.superadmin-cli-block ul { padding-left: 1.2rem; margin-top: 0.5rem; }
.superadmin-cli-block li { margin-bottom: 0.5rem; }
.superadmin-cli-block code { background: rgba(255,255,255,0.1); padding: 0.1rem 0.35rem; border-radius: 4px; }

.superadmin-warning-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 999;
}
.superadmin-warning-dialog {
    max-width: 480px;
    margin: 1rem;
    padding: 1.5rem;
    border-radius: 10px;
    background: #2b2140;
    border: 1px solid rgba(255, 200, 87, 0.4);
    color: white;
}
.superadmin-warning-dialog h3 { color: #ffd257; margin-bottom: 0.75rem; }
.superadmin-warning-dialog p { font-size: 0.9rem; line-height: 1.5; margin-bottom: 1.25rem; }
.superadmin-warning-actions { display: flex; gap: 0.6rem; justify-content: flex-end; }
.superadmin-warning-actions button {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid rgba(255,255,255,0.25);
    font-family: inherit;
    font-size: 0.85rem;
    cursor: pointer;
}
.superadmin-warning-cancel { background: rgba(255,255,255,0.08); color: white; }
.superadmin-warning-confirm { background: #c0392b; color: white; border-color: #c0392b; }
.superadmin-warning-confirm:hover { background: #a53125; }
.superadmin-warning-confirm:disabled { background: rgba(192,57,43,0.35); border-color: rgba(192,57,43,0.35); cursor: not-allowed; }
.superadmin-warning-confirm-hint { font-size: 0.8rem; color: #ffd257; margin-bottom: 0.5rem !important; }
.superadmin-warning-confirm-input {
    width: 100%;
    box-sizing: border-box;
    padding: 0.5rem 0.7rem;
    margin-bottom: 1rem;
    border-radius: 6px;
    border: 1px solid rgba(255, 200, 87, 0.5);
    background: rgba(255,255,255,0.06);
    color: white;
    font-family: inherit;
    font-size: 0.9rem;
}

/* Header & Navigation - Combined */
header {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    padding: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 0;
    z-index: 99;
}

.header-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 60px;
    gap: 1rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.logo a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    height: 100%;
}

/* Hamburger Menu Button */
.hamburger {
    display: none;
    flex-direction: column;
    cursor: pointer;
    gap: 5px;
    background: none;
    border: none;
    padding: 0;
    margin: 0;
    flex-shrink: 0;
    order: -1;
}

.hamburger span {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 6px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -6px);
}

nav {
    background: transparent;
    border-bottom: none;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

nav ul {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 2rem;
    padding: 0;
    margin: 0;
    align-items: center;
}

nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s;
    white-space: nowrap;
}

nav a:hover,
nav a.active {
    color: white;
}

/* Disabled Link */
nav a.disabled-link {
    opacity: 0.5;
    pointer-events: none;
    cursor: not-allowed;
}

/* Language Switcher */
.lang-toggle {
    position: fixed;
    top: 1.2rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    font-size: 0.85rem;
    font-weight: 600;
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    letter-spacing: 0.05em;
    z-index: 101;
}

.lang-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Language Display */
.uk {
    display: none;
    visibility: hidden;
    -webkit-user-select: none;
    user-select: none;
}

body.uk-active .uk {
    display: block;
    visibility: visible;
    -webkit-user-select: auto;
    user-select: auto;
}

body.uk-active .en {
    display: none;
    visibility: hidden;
    -webkit-user-select: none;
    user-select: none;
}

/* Heading Styles */
h1 {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

/* Lead paragraph — bold intro line directly under an h1 */
.lead {
    font-weight: 700;
}

h1.uk, h2.uk {
    display: none;
}

body.uk-active h1.uk,
body.uk-active h2.uk {
    display: block;
}

body.uk-active h1.en,
body.uk-active h2.en {
    display: none;
}

h2 {
    font-size: 1.8rem;
    margin: 2rem 0 1rem;
    font-weight: 600;
}

h3 {
    font-size: 1.3rem;
    margin: 1.5rem 0 0.75rem;
    font-weight: 600;
}

/* Content */
.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 2rem;
}

.hero {
    text-align: left;
    padding: 2rem 0 3rem;
    max-width: 800px;
}

article {
    max-width: 800px;
    margin: 0 auto;
}

p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.tagline {
    font-size: 1.5rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 800px;
}

.description {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2rem;
    opacity: 0.8;
    max-width: 800px;
}

.footer-link {
    text-align: left;
    margin-top: 3rem;
    font-size: 0.95rem;
}

.footer-link a {
    color: white;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Forms */
.vision-book-form {
    max-width: 500px;
    margin: 2rem 0;
    background: rgba(255, 255, 255, 0.05);
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group-checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 400;
}

.form-group-checkbox input[type="checkbox"] {
    width: auto;
    flex: 0 0 auto;
    margin: 0;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
}

input,
textarea {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.05);
    color: white;
    font-family: inherit;
    font-size: 1rem;
}

input::placeholder,
textarea::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

input:focus,
textarea:focus {
    outline: none;
    border-color: rgba(255, 255, 255, 0.4);
    background: rgba(255, 255, 255, 0.08);
}

.submit-btn {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.4);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 20px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s;
    font-size: 1rem;
}

.submit-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.form-status {
    margin-top: 1rem;
    font-size: 0.95rem;
}

.form-status.success {
    color: #7ee787;
}

.form-status.error {
    color: #ff8080;
}

/* Footer */
footer {
    background: rgba(255, 255, 255, 0.02);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 2rem 0;
    margin-top: 4rem;
    text-align: center;
    opacity: 0.8;
}

.footer-content {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-content p {
    margin: 0.5rem 0;
}

/* Footer Legal link row (functions/_lib/layout.js renderFooterLegalLinks) —
   works independently of the main nav so it's reachable even if nav
   markup/behavior ever changes. */
.footer-legal-row {
    font-size: 0.9rem;
}

.footer-legal-row a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 3px;
    opacity: 0.85;
}

.footer-legal-row a:hover {
    opacity: 1;
}

.footer-legal-sep {
    opacity: 0.5;
    margin: 0 0.35rem;
}

/* Responsive */
@media (max-width: 1024px) {
    nav ul {
        gap: 1rem;
        font-size: 0.9rem;
    }
}

@media (max-width: 768px) {
    .header-content {
        height: 60px;
        flex-wrap: nowrap;
        justify-content: flex-start;
        gap: 1rem;
    }

    .logo {
        font-size: 1.2rem;
        flex-shrink: 0;
    }

    nav {
        position: absolute;
        top: 60px;
        left: 0;
        right: 0;
        background: transparent;
        display: none;
        width: 100%;
        flex: none;
    }

    nav.menu-open {
        display: block;
        background: rgba(102, 126, 234, 0.95);
        backdrop-filter: blur(10px);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        max-height: 400px;
        overflow-y: auto;
    }

    nav ul {
        flex-direction: column;
        gap: 0;
        padding: 1rem 0;
        margin: 0;
        align-items: flex-start;
        list-style: none;
    }

    nav li {
        width: 100%;
        padding: 0.75rem 2rem;
    }

    nav a {
        display: block;
        font-size: 1rem;
        white-space: normal;
    }

    /* Show hamburger on mobile */
    .hamburger {
        display: flex;
        flex-shrink: 0;
    }

    h1 {
        font-size: 2rem;
    }

    h2 {
        font-size: 1.4rem;
    }

    .tagline {
        font-size: 1.2rem;
    }

    .description {
        font-size: 1rem;
    }
}
