/* Auth modal — restored from the planner's earlier account subsystem (git 2103752^), self-contained. */
/* auth-modal.css - Styling for login/signup modal */

/* Modal Container */
.auth-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Overlay */
.auth-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

/* Modal Content */
.auth-modal-content {
    position: relative;
    background: white;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 480px;
    width: calc(100% - 40px);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close Button */
.auth-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #718096;
    cursor: pointer;
    padding: 8px;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
    z-index: 1;
}

.auth-modal-close:hover {
    color: #2d3748;
    transform: scale(1.1);
}

/* Modal Header */
.auth-modal-header {
    padding: 40px 40px 24px;
    text-align: center;
}

.auth-modal-header h2 {
    font-size: 28px;
    font-weight: 600;
    color: #2d3748;
    margin: 0 0 8px;
}

.auth-modal-header p {
    font-size: 16px;
    color: #718096;
    margin: 0;
    line-height: 1.5;
}

/* Modal Body */
.auth-modal-body {
    padding: 0 40px 40px;
}

/* Auth Tabs */
.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: #f7fafc;
    padding: 4px;
    border-radius: 8px;
}

.auth-tab {
    flex: 1;
    padding: 10px 16px;
    background: transparent;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    color: #718096;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab:hover {
    color: #4a5568;
}

.auth-tab.active {
    background: white;
    color: #7c3aed;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Form Containers */
.auth-form-container {
    display: none;
}

.auth-form-container.active {
    display: block;
    animation: fadeInForm 0.3s ease;
}

@keyframes fadeInForm {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Forms */
.auth-modal .auth-form {
    margin-bottom: 20px;
}

.auth-modal .form-group {
    margin-bottom: 16px;
}

.auth-modal .form-group label {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
}

.auth-modal .form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.2s;
    background: #fafbfc;
}

.auth-modal .form-group input:hover {
    border-color: #cbd5e0;
    background: white;
}

.auth-modal .form-group input:focus {
    outline: none;
    border-color: #7c3aed;
    background: white;
    box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
}

/* Buttons */
.auth-modal .btn {
    width: 100%;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
}

.auth-modal .btn-primary {
    background: #7c3aed;
    color: white;
}

.auth-modal .btn-primary:hover {
    background: #6d28d9;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(124, 58, 237, 0.3);
}

.auth-modal .btn-primary:active {
    transform: translateY(0);
}

/* Divider */
.auth-modal .auth-divider {
    position: relative;
    text-align: center;
    margin: 24px 0;
}

.auth-modal .auth-divider::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    width: 100%;
    height: 1px;
    background: #e2e8f0;
}

.auth-modal .auth-divider span {
    position: relative;
    background: white;
    padding: 0 12px;
    color: #a0aec0;
    font-size: 13px;
    font-weight: 600;
}

/* OAuth Buttons */
.auth-modal .oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.auth-modal .btn-google {
    background: white;
    color: #2d3748;
    border: 2px solid #e2e8f0;
}

.auth-modal .btn-google:hover {
    background: #f7fafc;
    border-color: #cbd5e0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.auth-modal .btn-apple {
    background: #000;
    color: white;
}

.auth-modal .btn-apple:hover {
    background: #1a202c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

/* Responsive */
@media (max-width: 640px) {
    .auth-modal-header {
        padding: 32px 24px 20px;
    }

    .auth-modal-header h2 {
        font-size: 24px;
    }

    .auth-modal-header p {
        font-size: 14px;
    }

    .auth-modal-body {
        padding: 0 24px 32px;
    }
}

/* Hide elements for anonymous users */
body:not(.user-logged-in) .require-auth {
    display: none !important;
}

/* ---- Additions for the Scenic account (2026-09) ---------------------------------------------- */

/* Small initials badge inside the round profile button on the map */
.profile-picture-btn .profile-initials {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.5px;
    color: #fff;
    background: linear-gradient(135deg, #7c3aed, #a855f7);
}

/* Dropdown under the profile button when logged in */
.profile-menu {
    position: absolute;
    top: 72px;
    right: 10px;
    z-index: 1001;
    min-width: 220px;
    background: #fff;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.18);
    padding: 6px;
    display: none;
}
.profile-menu.open { display: block; }
.profile-menu-header {
    padding: 10px 12px 8px;
    font-size: 13px;
    color: #718096;
    border-bottom: 1px solid #e2e8f0;
    margin-bottom: 4px;
}
.profile-menu-header strong { display: block; color: #2d3748; font-size: 14px; }
.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    border: none;
    background: none;
    text-align: left;
    padding: 10px 12px;
    border-radius: 6px;
    font: inherit;
    font-size: 14px;
    color: #2d3748;
    cursor: pointer;
}
.profile-menu-item:hover { background: #f7fafc; }
.profile-menu-item i { width: 16px; color: #7c3aed; }
.profile-menu-note {
    margin: 4px 6px 2px;
    padding: 8px 10px;
    border-radius: 6px;
    background: #fef3c7;
    color: #92400e;
    font-size: 12px;
    line-height: 1.4;
}

/* Registration wizard steps and the forgot-password view share the modal body */
.auth-step { display: none; }
.auth-step.active { display: block; }
.auth-step-hint { font-size: 13px; color: #718096; margin: -4px 0 14px; line-height: 1.5; }
.auth-link-row { display: flex; justify-content: space-between; margin-top: 14px; font-size: 13px; }
.auth-link { background: none; border: none; padding: 0; color: #7c3aed; cursor: pointer; font: inherit; font-size: 13px; text-decoration: underline; }
.auth-field-note { font-size: 12px; margin-top: 4px; min-height: 16px; }
.auth-field-note.ok { color: #38a169; }
.auth-field-note.bad { color: #c53030; }
.auth-modal .code-input-group { display: flex; gap: 10px; justify-content: center; margin: 8px 0 18px; }
.auth-modal .checkbox-label { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; }
.auth-modal .checkbox-label input { margin-top: 3px; }
.auth-modal .turnstile-slot { margin: 12px 0; min-height: 0; }
.auth-modal .gsi-slot { display: flex; justify-content: center; }

/* Inline forms inside the profile panel */
.profile-section { padding: 14px 0; border-bottom: 1px solid #e2e8f0; }
.profile-section:last-child { border-bottom: none; }
.profile-section h3 { margin: 0 0 10px; font-size: 14px; color: #2d3748; }
.profile-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14px; }
.profile-row .muted { color: #718096; font-size: 13px; }
.profile-inline-form { display: none; margin-top: 10px; }
.profile-inline-form.open { display: block; }
.profile-danger .btn-link { color: #c53030; }
.profile-message { font-size: 13px; margin-top: 8px; min-height: 16px; }
.profile-message.ok { color: #38a169; }
.profile-message.bad { color: #c53030; }

/* Cookie consent */
.consent-banner {
    position: fixed;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 2500;
    max-width: 640px;
    width: calc(100% - 32px);
    background: #1a202c;
    color: #e2e8f0;
    border-radius: 10px;
    padding: 12px 16px;
    display: none;
    align-items: center;
    gap: 14px;
    font-size: 13px;
    line-height: 1.45;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}
.consent-banner.show { display: flex; }
.consent-banner a { color: #c4b5fd; }
.consent-banner .btn-primary { white-space: nowrap; padding: 8px 14px; }

/* Ribbon items that are not wired yet */
.ribbon-item.ribbon-item--soon { opacity: 0.55; }

/* BETA badge under the Scenic logo in the side ribbon — the planner is public but unfinished */
.ribbon-beta {
    display: block;
    margin: -4px auto 10px;
    width: fit-content;
    padding: 2px 8px;
    border-radius: 999px;
    background: #f59e0b;
    color: #1a202c;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1px;
    line-height: 16px;
    cursor: help;
}

