/* Shared layout for checkout / download flow pages (nav + centered main + footer) */
.flow-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #1e40af 0%, #3b82f6 100%);
    color: #1f2937;
}

.flow-page #nav-container,
.flow-page #footer-container {
    width: 100%;
    flex-shrink: 0;
}

.flow-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 24px 16px;
    box-sizing: border-box;
}

.flow-card {
    background: #fff;
    border-radius: 20px;
    padding: 40px 32px;
    max-width: 520px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.18);
    text-align: center;
}

.flow-card h1 {
    font-size: 1.65rem;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 8px;
}

.flow-card .flow-lead {
    color: #6b7280;
    line-height: 1.6;
    margin-bottom: 24px;
    font-size: 0.98rem;
}

.flow-icon {
    font-size: 2.75rem;
    margin-bottom: 16px;
    line-height: 1;
}

.flow-icon--success { color: #10b981; }
.flow-icon--download { color: #1e40af; }

.flow-status {
    display: none;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px 16px;
    margin-bottom: 20px;
    color: #374151;
    font-size: 0.95rem;
    line-height: 1.5;
}

.flow-status.is-visible { display: block; }

.flow-spinner {
    border: 3px solid #e5e7eb;
    border-top: 3px solid #1e40af;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    animation: flow-spin 0.9s linear infinite;
    margin: 0 auto 14px;
}

@keyframes flow-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.flow-form-group {
    text-align: left;
    margin-bottom: 18px;
}

.flow-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #374151;
    font-size: 0.9rem;
}

.flow-form-group input,
.flow-form-group select {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
}

.flow-btn {
    display: inline-block;
    padding: 14px 28px;
    border-radius: 10px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    text-decoration: none;
    font-family: inherit;
    transition: transform 0.2s ease;
}

.flow-btn:hover { transform: translateY(-1px); }

.flow-btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: #fff;
}

.flow-btn-secondary {
    background: linear-gradient(135deg, #3b82f6 0%, #1d4ed8 100%);
    color: #fff;
}

.flow-btn-muted {
    background: #6b7280;
    color: #fff;
}

.flow-error {
    color: #dc2626;
    margin-top: 12px;
    font-size: 0.92rem;
    text-align: left;
}

.flow-info-box {
    background: #f8fafc;
    border-radius: 10px;
    padding: 16px;
    margin-bottom: 20px;
    border-left: 4px solid #1e40af;
    text-align: left;
}

.flow-info-box h3 {
    color: #1e40af;
    font-size: 1rem;
    margin-bottom: 8px;
}

.flow-info-box p {
    color: #6b7280;
    font-size: 0.92rem;
    margin-bottom: 6px;
}

.flow-info-box p:last-child { margin-bottom: 0; }

.flow-panel { display: none; }
.flow-panel.is-active { display: block; }

.flow-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-top: 8px;
}

.flow-page #footer-container .footer {
    margin-top: 0;
    padding-top: 40px;
}

.flow-support {
    margin-top: 20px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
    font-size: 0.85rem;
    line-height: 1.5;
    color: #6b7280;
    text-align: center;
}

.flow-support a {
    color: #1e40af;
    font-weight: 600;
    text-decoration: none;
}

.flow-support a:hover { text-decoration: underline; }

.flow-page.flow-page--processing .flow-intro { display: none; }
.flow-page.flow-page--processing #formSection { display: none; }

.flow-alert {
    padding: 14px 16px;
    border-radius: 10px;
    margin-bottom: 16px;
    text-align: left;
    font-size: 0.92rem;
    line-height: 1.5;
}
.flow-alert--error {
    background: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fecaca;
}
.flow-alert--success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}
