/**
 * Download Page Styles (Dark Theme)
 * Supplements sales-page.css with download-specific components.
 * Uses the same .ob root wrapper and design tokens.
 *
 * @package OptiBehaviorSalesPage
 * @version 1.3.7
 */

/* ──────────────────────────────────────────────
   DOWNLOAD SECTION LAYOUT
   ────────────────────────────────────────────── */
.ob-dl-section {
    padding: 100px 40px;
    max-width: 1200px;
    margin: 0 auto;
}

.ob-dl-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 64px;
    align-items: start;
}

/* ──────────────────────────────────────────────
   FEATURE CARDS (Left Column)
   ────────────────────────────────────────────── */
.ob-dl-features h2 {
    font-size: clamp(1.5rem, 2.5vw, 2rem);
    font-weight: 800;
    color: #fff;
    margin-bottom: 32px;
}

.ob-dl-feature-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.ob-dl-feature-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    transition: all 0.3s ease;
}

.ob-dl-feature-card:hover {
    transform: translateY(-2px);
    border-color: rgba(99, 102, 241, 0.3);
    background: rgba(99, 102, 241, 0.06);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

.ob-dl-feature-icon {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 10px;
    font-size: 1.25rem;
}

.ob-dl-feature-body h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 0 0 4px;
}

.ob-dl-feature-body p {
    font-size: 0.875rem;
    color: #9ca3af;
    margin: 0;
    line-height: 1.6;
}

/* ──────────────────────────────────────────────
   FORM WRAPPER (Right Column)
   ────────────────────────────────────────────── */
.ob-dl-form-wrapper {
    position: sticky;
    top: 40px;
}

/* ──────────────────────────────────────────────
   FORM CARD (built by JS)
   ────────────────────────────────────────────── */
.ob-dl-form-card {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 36px 28px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transition: border-color 0.3s;
}

.ob-dl-form-card:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.ob-dl-form-card h2 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    margin: 0 0 6px;
}

.ob-dl-form-desc {
    font-size: 0.875rem;
    color: #9ca3af;
    margin: 0 0 24px;
    line-height: 1.6;
}

/* Form Fields */
.ob-dl-form-group {
    margin-bottom: 18px;
}

.ob-dl-form-group label {
    display: block;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #d1d5db;
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.ob-dl-form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    font-size: 0.9375rem;
    font-family: inherit;
    color: #fff;
    background: rgba(255, 255, 255, 0.06);
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    box-sizing: border-box;
}

.ob-dl-form-group input:focus {
    outline: none;
    border-color: rgba(99, 102, 241, 0.6);
    background: rgba(99, 102, 241, 0.08);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
}

.ob-dl-form-group input::placeholder {
    color: #6b7280;
}

/* Error Box */
.ob-dl-form-error {
    background: rgba(239, 68, 68, 0.1);
    color: #f87171;
    padding: 12px 16px;
    border-radius: 8px;
    margin-bottom: 16px;
    font-size: 0.875rem;
    border-left: 4px solid #ef4444;
    line-height: 1.5;
}

/* Submit Button */
.ob-dl-submit-btn {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 24px;
    background: linear-gradient(135deg, #6366f1, #a855f7);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.3);
}

.ob-dl-submit-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 28px rgba(99, 102, 241, 0.4);
}

.ob-dl-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.ob-dl-submit-btn svg {
    width: 20px;
    height: 20px;
}

/* ──────────────────────────────────────────────
   SUCCESS CARD (built by JS)
   ────────────────────────────────────────────── */
.ob-dl-success-card {
    background: rgba(16, 185, 129, 0.06);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: 16px;
    padding: 40px 28px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(16, 185, 129, 0.1);
}

.ob-dl-success-icon {
    color: #10b981;
    margin-bottom: 20px;
}

.ob-dl-success-card h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 8px;
    color: #fff;
}

.ob-dl-success-card > p {
    font-size: 0.9375rem;
    color: #9ca3af;
    margin: 0 0 24px;
    line-height: 1.6;
}

.ob-dl-install-steps {
    text-align: left;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    padding: 20px 24px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.ob-dl-install-steps h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: #10b981;
}

.ob-dl-install-steps ol {
    margin: 0;
    padding-left: 20px;
}

.ob-dl-install-steps li {
    font-size: 0.875rem;
    color: #d1d5db;
    margin-bottom: 8px;
    line-height: 1.6;
}

.ob-dl-install-steps li:last-child {
    margin-bottom: 0;
}

.ob-dl-install-steps strong {
    color: #fff;
}

.ob-dl-success-note {
    font-size: 0.8125rem;
    color: #6b7280;
    font-style: italic;
    margin: 16px 0 0;
    line-height: 1.5;
}

/* Loading Spinner */
.ob-dl-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: ob-dl-spin 0.8s linear infinite;
}

@keyframes ob-dl-spin {
    to { transform: rotate(360deg); }
}

/* ──────────────────────────────────────────────
   ACCESS DENIED CARD (built by JS)
   ────────────────────────────────────────────── */
.ob-dl-access-denied-card {
    background: rgba(239, 68, 68, 0.04);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 16px;
    padding: 40px 28px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(239, 68, 68, 0.08);
}

.ob-dl-denied-icon {
    color: #ef4444;
    margin-bottom: 20px;
}

.ob-dl-access-denied-card h2 {
    font-size: 1.5rem;
    font-weight: 800;
    margin: 0 0 12px;
    color: #fff;
}

.ob-dl-access-denied-card > p {
    font-size: 0.9375rem;
    color: #9ca3af;
    margin: 0 0 24px;
    line-height: 1.6;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

.ob-dl-denied-steps {
    text-align: left;
    background: rgba(239, 68, 68, 0.06);
    border: 1px solid rgba(239, 68, 68, 0.15);
    padding: 20px 24px;
    border-radius: 12px;
    max-width: 500px;
    margin: 0 auto;
}

.ob-dl-denied-steps h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 12px;
    color: #f87171;
}

.ob-dl-denied-steps ol {
    margin: 0;
    padding-left: 20px;
}

.ob-dl-denied-steps li {
    font-size: 0.875rem;
    color: #d1d5db;
    margin-bottom: 8px;
    line-height: 1.6;
}

.ob-dl-denied-steps li:last-child {
    margin-bottom: 0;
}

.ob-dl-denied-steps strong {
    color: #fff;
}

/* ──────────────────────────────────────────────
   DOWNLOAD BUTTON & FILE INFO (built by JS)
   ────────────────────────────────────────────── */
.ob-dl-download-wrapper {
    margin-bottom: 24px;
}

.ob-dl-file-info {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    background: rgba(16, 185, 129, 0.08);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 10px;
    margin-bottom: 16px;
}

.ob-dl-file-icon {
    color: #10b981;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}

.ob-dl-file-icon svg {
    width: 20px;
    height: 20px;
}

.ob-dl-file-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: #d1d5db;
    font-family: 'SFMono-Regular', 'Consolas', 'Liberation Mono', 'Menlo', monospace;
}

.ob-dl-file-size {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-left: auto;
}

.ob-dl-download-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 18px 24px;
    background: linear-gradient(135deg, #10b981, #059669);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 1.0625rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
    text-decoration: none;
    box-sizing: border-box;
}

.ob-dl-download-btn:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 28px rgba(16, 185, 129, 0.4);
    color: #fff;
    text-decoration: none;
}

.ob-dl-download-btn:active {
    transform: scale(0.98);
}

.ob-dl-download-btn svg {
    width: 22px;
    height: 22px;
}

.ob-dl-download-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.ob-dl-download-btn--done {
    background: linear-gradient(135deg, #059669, #047857);
    pointer-events: none;
}

.ob-dl-timer-note {
    font-size: 0.8125rem;
    color: #6b7280;
    text-align: center;
    margin: 12px 0 0;
    font-style: italic;
}

/* ──────────────────────────────────────────────
   RESPONSIVE
   ────────────────────────────────────────────── */
@media (max-width: 768px) {
    .ob-dl-section {
        padding: 60px 20px;
    }

    .ob-dl-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .ob-dl-form-wrapper {
        position: static;
    }

    .ob-dl-form-card,
    .ob-dl-success-card,
    .ob-dl-access-denied-card {
        padding: 28px 20px;
    }

    .ob-dl-file-info {
        flex-wrap: wrap;
    }

    .ob-dl-file-size {
        margin-left: 0;
        width: 100%;
        text-align: center;
    }
}
