/**
 * VPS Forms Split Modal CSS
 * Single-card layout for donations/login/signup forms
 * Reuses article modal styling with form-specific overrides
 * Privacy-First, Offline-Tolerant, CRT Terminal Aesthetic
 */

/* ============================================================
   FORM CONTAINER (single card, centered)
   ============================================================ */
.vps-form-container.article-split-modal-container {
    max-width: 900px; /* Narrower than article modal */
    width: 90%;
    max-height: 95vh;
    margin: auto;
}

/* ============================================================
   FORM SCROLL CONTAINER (single card, no scrolling)
   ============================================================ */
.vps-form-scroll-container.modal-scroll-container {
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
}

/* ============================================================
   FORM CARD (single card, full height)
   ============================================================ */
.modal-card-form {
    flex: 1;
    min-height: 100%;
    padding: 0;
    display: flex;
    flex-direction: column;
}

/* ============================================================
   FORM CARD CONTENT
   ============================================================ */
.form-card-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    padding: 2rem;
}

/* ============================================================
   FORM CARD HEADER
   ============================================================ */
.form-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--crt-border, rgba(255, 255, 255, 0.2));
}

.form-card-title {
    flex: 1;
    text-align: center;
    font-size: 1.5rem;
    color: var(--crt-primary, #00ffd5);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
    font-family: 'Source Code Pro', 'Courier New', monospace;
}

.modal-close-btn {
    background: transparent;
    border: 2px solid var(--crt-primary, #00ffd5);
    color: var(--crt-primary, #00ffd5);
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 3px;
    transition: all 0.2s;
    font-family: 'Source Code Pro', 'Courier New', monospace;
}

.modal-close-btn:hover {
    background: rgba(var(--crt-primary-rgb, 0, 255, 213), 0.1);
    box-shadow: 0 0 10px rgba(var(--crt-primary-rgb, 0, 255, 213), 0.3);
}

.modal-close-btn:focus-visible {
    outline: 2px solid var(--crt-primary, #00ffd5);
    outline-offset: 2px;
}

/* ============================================================
   FORM CONTENT CONTAINER
   ============================================================ */
.vps-form-content {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
}

/* ============================================================
   SCROLLBAR STYLING (match article modal for theme consistency)
   ============================================================ */
.vps-form-content::-webkit-scrollbar {
    width: 8px;
}

.vps-form-content::-webkit-scrollbar-track {
    background: var(--crt-background, #000);
}

.vps-form-content::-webkit-scrollbar-thumb {
    background: var(--crt-primary, #00ffd5);
    border-radius: 4px;
}

.vps-form-content::-webkit-scrollbar-thumb:hover {
    background: var(--crt-glow, #00ffd5);
}

/* ============================================================
   LOADING PLACEHOLDER
   ============================================================ */
.loading-placeholder {
    text-align: center;
    padding: 3rem;
    color: var(--crt-secondary, #aaaaaa);
    font-size: 1rem;
    font-family: 'Source Code Pro', 'Courier New', monospace;
}

/* ============================================================
   ERROR STATE
   ============================================================ */
.vps-form-content .error {
    text-align: center;
    padding: 3rem;
    color: var(--crt-error, #ff0000);
    font-size: 1rem;
    font-family: 'Source Code Pro', 'Courier New', monospace;
}

.vps-form-content .error button {
    margin-top: 1rem;
    padding: 0.75rem 1.5rem;
    background: var(--crt-primary, #00ffd5);
    color: #000;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
    font-family: 'Source Code Pro', 'Courier New', monospace;
    transition: all 0.2s;
}

.vps-form-content .error button:hover {
    background: var(--crt-glow, #00ffd5);
    box-shadow: 0 0 10px rgba(var(--crt-primary-rgb, 0, 255, 213), 0.3);
}

/* ============================================================
   MOBILE ADJUSTMENTS
   ============================================================ */
@media (max-width: 768px) {
    .vps-form-container.article-split-modal-container {
        max-width: 100%;
        width: 100%;
        height: 100vh;
        margin: 0;
        border-radius: 0;
    }

    .form-card-content {
        padding: 1.5rem;
    }

    .form-card-title {
        font-size: 1.2rem;
    }

    .modal-close-btn {
        width: 40px;
        height: 40px;
        font-size: 1.2rem;
    }
}

