/* Copyright © 2026 CampaignComply. All rights reserved. */

/**
 * Form 461 Wizard Styles - Major Donor and IE Committee Campaign Statement
 * Campaign Comply
 */

/* Form 461 Modal Specific Styles */

/* Modal container adjustments - fit content height */
#form461Modal .form-builder-container {
    border-radius: 12px;
    overflow: visible;
    height: auto;
    max-height: 90vh;
}

#form461Modal .form-builder-header {
    background: linear-gradient(135deg, #2B4A6F 0%, #1E3A5F 100%);
    border-bottom: none !important; /* Remove the red accent line */
    border-radius: 0;
    margin: 0;
}

/* Modal body adjustments - fit content, scroll only when needed */
#form461Modal .form-builder-body {
    padding: 1.5rem 2rem;
    overflow-y: auto;
    max-height: calc(90vh - 160px);
}

@media (max-width: 768px) {
    #form461Modal .form-builder-body {
        max-height: calc(100vh - 140px);
    }
}

#form461Modal .form-builder-header h2 {
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
    color: white;
}

#form461Modal .form-builder-header p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.95rem;
    margin: 0;
}

/* Step content spacing */
#form461Modal .form-builder-body h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
}

#form461Modal .form-builder-body > p {
    margin-bottom: 1rem;
}

/* Info box spacing */
#form461Modal .form-builder-body .info-box,
#form461Modal .form-builder-body [class*="info"] {
    margin-bottom: 1.25rem;
}

/* Button row spacing */
#form461Modal .form-builder-body > div:last-child {
    margin-top: 0.5rem;
    padding-top: 1rem;
}

/* Filer Type Cards */
#form461Modal .filer-type-selector {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.875rem;
    margin-bottom: 1.25rem;
}

@media (max-width: 768px) {
    #form461Modal .filer-type-selector {
        grid-template-columns: 1fr;
    }
}

#form461Modal .filer-type-card {
    display: flex;
    flex-direction: column;
    padding: 1.25rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    background: white;
    position: relative;
}

#form461Modal .filer-type-card:hover {
    border-color: var(--primary);
    background: #F8FAFC;
}

#form461Modal .filer-type-card.selected {
    border-color: var(--primary);
    background: var(--bg-selected);
    box-shadow: 0 0 0 3px rgba(43, 74, 111, 0.1);
}

#form461Modal .filer-type-card.selected::after {
    content: '\2713';
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: #2B4A6F;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: bold;
}

#form461Modal .filer-type-card input[type="radio"] {
    display: none;
}

#form461Modal .filer-type-card .card-title {
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

#form461Modal .filer-type-card .card-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Nature/Interests Section */
#form461Modal .nature-section {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--bg-subtle);
    border-radius: 8px;
    border: 1px solid var(--border);
}

#form461Modal .nature-section h4 {
    margin: 0 0 0.75rem 0;
    font-size: 0.95rem;
    color: var(--text-primary);
}

/* Entry Cards */
#form461Modal .entry-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1rem;
}

#form461Modal .entry-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid var(--border);
}

#form461Modal .entry-number {
    font-weight: 600;
    color: var(--primary);
    font-size: 0.95rem;
}

#form461Modal .btn-remove-entry {
    padding: 0.375rem 0.75rem;
    font-size: 0.8rem;
    color: #DC2626;
    background: white;
    border: 1px solid #DC2626;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

#form461Modal .btn-remove-entry:hover {
    background: #FEF2F2;
}

#form461Modal .btn-add-entry {
    width: 100%;
    padding: 1rem;
    background: white;
    border: 2px dashed var(--primary);
    color: var(--primary);
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
    margin-top: 0.5rem;
}

#form461Modal .btn-add-entry:hover {
    background: #EFF6FF;
}

/* Payment Type Grid */
#form461Modal .payment-type-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 0.5rem;
}

@media (max-width: 480px) {
    #form461Modal .payment-type-grid {
        grid-template-columns: 1fr;
    }
}

#form461Modal .payment-type-option {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 0.75rem;
    background: white;
    border: 1px solid var(--border);
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.875rem;
}

#form461Modal .payment-type-option:hover {
    border-color: var(--primary);
}

#form461Modal .payment-type-option.selected {
    border-color: var(--primary);
    background: var(--bg-selected);
}

#form461Modal .payment-type-option input[type="radio"] {
    margin: 0;
    accent-color: var(--primary);
}

/* Support/Oppose Selector */
#form461Modal .support-oppose-selector {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

#form461Modal .support-oppose-option {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
}

#form461Modal .support-oppose-option.support:hover,
#form461Modal .support-oppose-option.support.selected {
    border-color: #059669;
    background: #F0FDF4;
    color: #166534;
}

#form461Modal .support-oppose-option.oppose:hover,
#form461Modal .support-oppose-option.oppose.selected {
    border-color: #EF4444;
    background: #FEF2F2;
    color: #B91C1C;
}

#form461Modal .support-oppose-option input[type="radio"] {
    display: none;
}

/* Summary Table */
#form461Modal .summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

#form461Modal .summary-table th,
#form461Modal .summary-table td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

#form461Modal .summary-table th {
    background: #F9FAFB;
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-secondary);
}

#form461Modal .summary-table td.amount {
    text-align: right;
    font-family: 'SF Mono', Monaco, monospace;
    font-weight: 500;
}

#form461Modal .summary-table tr.total {
    background: #EFF6FF;
    font-weight: 700;
}

#form461Modal .summary-table tr.total td {
    border-bottom: none;
}

/* Review Section */
#form461Modal .review-section {
    background: var(--bg-subtle);
    border-radius: 8px;
    padding: 1.25rem;
    margin-bottom: 1.25rem;
}

#form461Modal .review-section h4 {
    margin: 0 0 1rem 0;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border);
    font-size: 1rem;
    color: var(--text-primary);
}

#form461Modal .review-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #E5E7EB;
}

#form461Modal .review-row:last-child {
    border-bottom: none;
}

#form461Modal .review-label {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

#form461Modal .review-value {
    font-weight: 500;
    color: var(--text-primary);
}

/* Verification Text */
#form461Modal .verification-box {
    background: var(--bg-subtle);
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-bottom: 1.5rem;
    font-size: 0.875rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Download Options */
#form461Modal .download-options {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 1.5rem;
}

#form461Modal .download-options .btn {
    min-width: 150px;
}

/* Filing Info Box */
#form461Modal .filing-info-box {
    background: #F0FDF4;
    border-left: 4px solid #059669;
    padding: 1rem;
    margin-top: 1.5rem;
    border-radius: 0 8px 8px 0;
}

#form461Modal .filing-info-box h4 {
    margin: 0 0 0.5rem 0;
    color: #166534;
    font-size: 0.95rem;
}

#form461Modal .filing-info-box p {
    margin: 0;
    color: #166534;
    font-size: 0.875rem;
    line-height: 1.6;
}

/* Entry Review Cards */
#form461Modal .entry-review-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
}

#form461Modal .entry-review-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

#form461Modal .entry-review-header strong {
    color: var(--text-primary);
}

#form461Modal .entry-review-header .amount {
    font-weight: 600;
    color: var(--primary);
}

#form461Modal .entry-review-details {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.5;
}

#form461Modal .badge-support {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: #DCFCE7;
    color: #166534;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

#form461Modal .badge-oppose {
    display: inline-block;
    padding: 0.125rem 0.5rem;
    background: #FEE2E2;
    color: #B91C1C;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* ==========================================
   COLLAPSIBLE BOXES
   ========================================== */

/* Override global collapsible-header arrow - we use our own icon */
#form461Modal .collapsible-box .collapsible-header::after {
    content: none !important;
    display: none !important;
}

/* Info box collapsible - keep light background, just add toggle */
#form461Modal .info-box.collapsible-box {
    background: var(--bg-selected);
    border: 1px solid #BFDBFE;
    border-left: 4px solid var(--primary);
}

#form461Modal .info-box.collapsible-box .collapsible-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #1E3A5F;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

#form461Modal .info-box.collapsible-box .collapsible-header:hover {
    color: #2B4A6F;
}

#form461Modal .info-box.collapsible-box .collapse-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: #2B4A6F;
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0;
    flex-shrink: 0;
}

#form461Modal .info-box.collapsible-box .collapse-icon::before {
    font-size: 16px;
    content: '\2212';
}

#form461Modal .info-box.collapsible-box.collapsed .collapse-icon::before {
    content: '+';
}

#form461Modal .info-box.collapsible-box.collapsed .collapsible-header {
    margin-bottom: 0;
}

/* Generic collapsible boxes (non info-box) */
#form461Modal .collapsible-box:not(.info-box) .collapsible-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem;
    margin: -0.5rem -0.5rem 0.75rem -0.5rem;
    border-radius: 6px;
    transition: background-color 0.2s ease;
}

#form461Modal .collapsible-box:not(.info-box) .collapsible-header:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

#form461Modal .collapsible-box:not(.info-box) .collapse-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    font-weight: bold;
    font-size: 0;
    line-height: 1;
    flex-shrink: 0;
    transition: transform 0.2s ease, background-color 0.2s ease;
}

#form461Modal .collapsible-box:not(.info-box) .collapsible-header:hover .collapse-icon {
    background: #1E3A5F;
}

#form461Modal .collapsible-box:not(.info-box) .collapse-icon::before {
    font-size: 18px;
    content: '\2212'; /* minus sign */
}

#form461Modal .collapsible-box:not(.info-box).collapsed .collapse-icon::before {
    content: '+';
}

#form461Modal .collapsible-box .collapsible-content {
    transition: max-height 0.3s ease, opacity 0.3s ease;
    overflow: hidden;
}

#form461Modal .collapsible-box.collapsed .collapsible-content {
    max-height: 0;
    opacity: 0;
    margin: 0;
    padding: 0;
}

/* ==========================================
   PRINT STYLESHEET
   ========================================== */
@media print {
    #form461Modal.form-builder-modal {
        display: block !important;
        position: static !important;
        background: white !important;
        overflow: visible !important;
    }

    #form461Modal .form-builder-header,
    #form461Modal .form-builder-progress,
    #form461Modal .form-builder-footer,
    #form461Modal .modal-overlay,
    #form461Modal .collapsible-header,
    #form461Modal .collapse-icon,
    #form461Modal .validation-error-panel,
    .no-print {
        display: none !important;
    }

    #form461Modal .form-builder-body {
        overflow: visible !important;
        max-height: none !important;
        padding: 20px !important;
    }

    #form461Modal .review-section {
        page-break-inside: avoid;
        background: white !important;
        box-shadow: none !important;
    }

    #form461Modal .review-section::after {
        content: "Printed from Campaign Comply - For reference only. Official filing must use generated PDF.";
        display: block;
        margin-top: 20px;
        padding-top: 10px;
        border-top: 1px solid #ccc;
        font-size: 9pt;
        color: #666;
        text-align: center;
    }
}
