/* AP Score Calculator Specific Styles */

/* AP-specific color variables */
:root {
    --ap-primary: #007bff; /* College Board blue */
    --ap-secondary: #6c757d;
    --ap-success: #28a745;
    --ap-warning: #ffc107;
    --ap-danger: #dc3545;
    --ap-info: #17a2b8;
    --ap-gradient: linear-gradient(135deg, var(--ap-primary), #0056b3);
}

/* Form Layout */
.calculator-form .input-group {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
}

.calculator-form .input-group .form-control {
    flex: 1;
}

.calculator-form .input-addon {
    padding: var(--space-sm) var(--space-md);
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    color: var(--text-muted);
    font-size: 0.9rem;
    white-space: nowrap; /* Prevent wrapping */
}

/* Button Styling */
.btn-primary-ap {
    background: var(--ap-gradient);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 700;
    border-radius: var(--border-radius-md);
    cursor: pointer;
    transition: var(--transition-normal);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 20px rgba(0, 123, 255, 0.3);
    width: 100%;
    margin-top: var(--space-lg);
}

.btn-primary-ap:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(0, 123, 255, 0.4);
}

.btn-primary-ap i {
    margin-right: var(--space-sm);
}

/* Results Grid */
.results-grid-ap {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.result-card-ap {
    background: white;
    border-radius: var(--border-radius-md);
    padding: var(--space-lg);
    text-align: center;
    border: 1px solid rgba(0, 123, 255, 0.1);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: var(--transition-normal);
}

.result-card-ap:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.result-card-ap.primary-score {
    grid-column: 1 / -1; /* Spans full width on larger screens */
    background: linear-gradient(135deg, rgba(0, 123, 255, 0.1), rgba(0, 86, 179, 0.1));
    border-color: var(--ap-primary);
    box-shadow: 0 8px 25px rgba(0, 123, 255, 0.2);
}

.result-label-ap {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: var(--space-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.result-value-ap {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--ap-primary);
    margin-bottom: var(--space-xs);
    line-height: 1;
}

.result-card-ap.primary-score .result-value-ap {
    font-size: 3.5rem; /* Larger for the main score */
    color: var(--ap-primary);
}

.result-unit-ap {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.result-interpretation-ap {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-top: var(--space-sm);
    font-weight: 600;
}

/* AP Score Info / Disclaimer */
.ap-score-info {
    margin-top: var(--space-lg);
    padding: var(--space-md);
    background-color: rgba(0, 123, 255, 0.05);
    border-left: 4px solid var(--ap-info);
    border-radius: var(--border-radius-md);
    color: var(--text-dark);
    font-size: 0.95rem;
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}

.ap-score-info i {
    color: var(--ap-info);
    font-size: 1.2rem;
    margin-top: 2px;
}

/* Tips Grid (Reusing dunk-calculator styles, but applying to new specific classes) */
.calculator-tips .tips-title {
    margin-top: var(--space-xl);
    text-align: center;
    color: var(--ap-primary);
    font-size: 1.8rem;
    margin-bottom: var(--space-lg);
}

.calculator-tips .tips-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-lg);
    margin-top: var(--space-lg);
}

.calculator-tips .tip-card {
    background-color: white;
    border-radius: var(--border-radius-md);
    padding: var(--space-lg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border-left: 4px solid var(--ap-primary); /* Changed border color */
    transition: var(--transition-normal);
}

.calculator-tips .tip-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.calculator-tips .tip-card h4 {
    color: var(--ap-primary); /* Changed title color */
    margin-bottom: var(--space-md);
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.calculator-tips .tip-card h4 i {
    margin-right: var(--space-sm);
    font-size: 1.2rem;
}

.calculator-tips .tip-card ul {
    list-style: none;
    padding: 0;
}

.calculator-tips .tip-card li {
    margin-bottom: var(--space-sm);
    padding-left: var(--space-lg);
    position: relative;
    color: var(--text-dark);
    font-size: 0.95rem;
    line-height: 1.5;
}

.calculator-tips .tip-card li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--ap-primary); /* Changed list item marker color */
    font-weight: bold;
}

/* FAQ Section (reusing base styles from dunk-calculator, adjusted for AP theme) */
.faq-section {
    margin-top: var(--space-xl);
    padding: var(--space-lg);
    background: white;
    border-radius: var(--border-radius-md);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.faq-section h2 {
    text-align: center;
    color: var(--ap-primary); /* Changed title color */
    font-size: 2rem;
    margin-bottom: var(--space-lg);
}

.faq-item {
    margin-bottom: var(--space-lg);
    border-left: 4px solid var(--ap-primary); /* Changed border color */
    padding-left: var(--space-md);
    padding-right: var(--space-md);
}

.faq-item h3 {
    font-size: 1.1rem;
    color: var(--text-dark);
    margin-bottom: var(--space-xs);
    position: relative;
}

.faq-item h3::before {
    content: "Q:";
    color: var(--ap-secondary); /* Changed Q marker color */
    font-weight: bold;
    margin-right: 8px;
}

.faq-item p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-muted);
    position: relative;
}

.faq-item p::before {
    content: "A:";
    color: var(--ap-success); /* Changed A marker color */
    font-weight: bold;
    margin-right: 8px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .results-grid-ap {
        grid-template-columns: 1fr;
        gap: var(--space-md);
    }

    .result-card-ap.primary-score {
        grid-column: auto; /* Reset grid-column for smaller screens */
    }

    .result-card-ap.primary-score .result-value-ap {
        font-size: 2.8rem;
    }

    .calculator-tips .tips-grid {
        grid-template-columns: 1fr;
    }

    .calculator-tips .tip-card {
        padding: var(--space-md);
    }

    .faq-section {
        padding: var(--space-md);
    }

    .faq-item h3 {
        font-size: 1rem;
    }

    .faq-item p {
        font-size: 0.9rem;
    }
}

@media (max-width: 480px) {
    .calculator-container {
        padding: var(--space-md);
    }

    .btn-primary-ap {
        padding: 12px 20px;
        font-size: 1rem;
    }

    .result-value-ap {
        font-size: 2rem;
    }

    .result-card-ap.primary-score .result-value-ap {
        font-size: 2.5rem;
    }
}


:root {
            --ap-primary: #4361ee;
            --ap-secondary: #3a0ca3;
            --ap-accent: #7209b7;
            --ap-success: #06d6a0;
            --ap-warning: #ffd60a;
            --ap-danger: #ef476f;
            --ap-gradient: linear-gradient(135deg, var(--ap-primary), var(--ap-accent));
        }

        .ap-calculator-container {
            max-width: 1000px;
            margin: 40px auto;
            padding: 30px;
            background: white;
            border-radius: 16px;
            box-shadow: 0 8px 30px rgba(67, 97, 238, 0.15);
        }

        .calculator-header {
            text-align: center;
            margin-bottom: 40px;
        }

        .calculator-header h2 {
            color: var(--ap-primary);
            font-size: 2.2rem;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
        }

        .calculator-header p {
            color: #666;
            font-size: 1.05rem;
            line-height: 1.6;
            max-width: 800px;
            margin: 0 auto;
        }

        .section-card {
            background: linear-gradient(135deg, rgba(67, 97, 238, 0.05), rgba(114, 9, 183, 0.05));
            border-radius: 12px;
            padding: 25px;
            margin-bottom: 25px;
            border: 2px solid rgba(67, 97, 238, 0.2);
        }

        .section-header {
            display: flex;
            align-items: center;
            gap: 12px;
            margin-bottom: 20px;
            color: var(--ap-primary);
        }

        .section-header h3 {
            margin: 0;
            font-size: 1.4rem;
        }

        .section-header i {
            font-size: 1.5rem;
        }

        .input-row {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 20px;
            margin-bottom: 15px;
        }

        .form-group {
            margin-bottom: 0;
        }

        .form-label {
            display: block;
            margin-bottom: 8px;
            font-weight: 600;
            color: #333;
            font-size: 0.95rem;
        }

        .form-control {
            width: 100%;
            padding: 12px 15px;
            border: 2px solid #e0e0e0;
            border-radius: 8px;
            font-size: 1rem;
            transition: all 0.3s ease;
        }

        .form-control:focus {
            outline: none;
            border-color: var(--ap-primary);
            box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
        }

        .form-help {
            display: block;
            margin-top: 6px;
            font-size: 0.85rem;
            color: #888;
            font-style: italic;
        }

        .btn-calculate {
            background: var(--ap-gradient);
            color: white;
            border: none;
            padding: 16px 40px;
            font-size: 1.15rem;
            font-weight: 700;
            border-radius: 10px;
            cursor: pointer;
            transition: all 0.3s ease;
            width: 100%;
            margin-top: 25px;
            box-shadow: 0 6px 20px rgba(67, 97, 238, 0.3);
        }

        .btn-calculate:hover {
            transform: translateY(-3px);
            box-shadow: 0 10px 30px rgba(67, 97, 238, 0.4);
        }

        .btn-calculate i {
            margin-right: 10px;
        }

        .result-container {
            display: none;
            margin-top: 40px;
        }

        .score-display {
            text-align: center;
            background: var(--ap-gradient);
            color: white;
            padding: 40px;
            border-radius: 16px;
            margin-bottom: 30px;
            box-shadow: 0 8px 25px rgba(67, 97, 238, 0.3);
        }

        .score-label {
            font-size: 1.2rem;
            font-weight: 600;
            margin-bottom: 15px;
            opacity: 0.95;
        }

        .score-value {
            font-size: 5rem;
            font-weight: 900;
            line-height: 1;
            margin-bottom: 10px;
        }

        .score-interpretation {
            font-size: 1.3rem;
            font-weight: 600;
            opacity: 0.95;
        }

        .breakdown-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
            gap: 20px;
            margin-bottom: 30px;
        }

        .breakdown-card {
            background: white;
            border-radius: 12px;
            padding: 20px;
            border: 2px solid rgba(67, 97, 238, 0.15);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
        }

        .breakdown-label {
            font-size: 0.9rem;
            font-weight: 600;
            color: #666;
            text-transform: uppercase;
            letter-spacing: 0.5px;
            margin-bottom: 10px;
        }

        .breakdown-value {
            font-size: 2rem;
            font-weight: 800;
            color: var(--ap-primary);
        }

        .breakdown-detail {
            font-size: 0.85rem;
            color: #888;
            margin-top: 5px;
        }

        .score-ranges {
            background: linear-gradient(135deg, rgba(67, 97, 238, 0.05), rgba(114, 9, 183, 0.05));
            border-radius: 12px;
            padding: 25px;
            margin-top: 30px;
        }

        .score-ranges h4 {
            color: var(--ap-primary);
            margin-bottom: 20px;
            font-size: 1.2rem;
        }

        .range-item {
            display: flex;
            align-items: center;
            padding: 12px;
            margin-bottom: 10px;
            border-radius: 8px;
            background: white;
        }

        .range-score {
            font-size: 1.5rem;
            font-weight: 800;
            width: 50px;
            text-align: center;
        }

        .range-details {
            flex: 1;
            margin-left: 20px;
        }

        .range-title {
            font-weight: 700;
            margin-bottom: 3px;
        }

        .range-description {
            font-size: 0.85rem;
            color: #666;
        }

        .score-5 { color: #06d6a0; }
        .score-4 { color: #4cc9f0; }
        .score-3 { color: #ffd60a; }
        .score-2 { color: #f77f00; }
        .score-1 { color: #ef476f; }

        .info-section {
            margin-top: 40px;
            padding: 25px;
            background: white;
            border-radius: 12px;
            border-left: 4px solid var(--ap-primary);
        }

        .info-section h4 {
            color: var(--ap-primary);
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .info-section ul {
            list-style: none;
            padding: 0;
        }

        .info-section li {
            padding: 8px 0;
            padding-left: 25px;
            position: relative;
            color: #555;
        }

        .info-section li::before {
            content: '→';
            position: absolute;
            left: 0;
            color: var(--ap-primary);
            font-weight: bold;
        }

        .faq-section {
            margin-top: 40px;
            padding: 30px;
            background: white;
            border-radius: 12px;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
        }

        .faq-section h2 {
            text-align: center;
            color: var(--ap-primary);
            font-size: 2rem;
            margin-bottom: 30px;
        }

        .faq-item {
            margin-bottom: 25px;
            border-left: 4px solid var(--ap-primary);
            padding-left: 20px;
        }

        .faq-item h3 {
            font-size: 1.1rem;
            color: #333;
            margin-bottom: 10px;
        }

        .faq-item h3::before {
            content: "Q:";
            color: var(--ap-accent);
            font-weight: bold;
            margin-right: 8px;
        }

        .faq-item p {
            font-size: 0.95rem;
            line-height: 1.6;
            color: #666;
        }

        .faq-item p::before {
            content: "A:";
            color: var(--ap-success);
            font-weight: bold;
            margin-right: 8px;
        }

        @media (max-width: 768px) {
            .calculator-header h2 {
                font-size: 1.8rem;
            }

            .input-row {
                grid-template-columns: 1fr;
            }

            .score-value {
                font-size: 4rem;
            }

            .breakdown-grid {
                grid-template-columns: 1fr;
            }
        }