/*
 * Plugin: Urgent Car Credit Pre-Qualification Form
 * File: frontend.css
 * Description: Styling for the UCCPF front-end form, including the affordability display.
 */

/* --- General Form Wrapper and Typography --- */
.uccpf-form-wrapper {
    max-width: 600px;
    margin: 20px auto;
    padding: 30px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    font-family: Arial, sans-serif;
}

.uccpf-form-wrapper h2 {
    color: #004c99; /* Urgent Car Credit Blue */
    text-align: center;
    margin-bottom: 25px;
    font-size: 1.8em;
    border-bottom: 2px solid #ffcc00; /* Accent Yellow */
    padding-bottom: 10px;
}

/* --- Fieldsets and Legends (Sections) --- */
.uccpf-form-wrapper fieldset {
    border: 1px solid #cccccc;
    padding: 20px;
    margin-bottom: 25px;
    border-radius: 8px;
}

.uccpf-form-wrapper legend {
    font-size: 1.2em;
    font-weight: bold;
    color: #333333;
    padding: 0 10px;
}

/* --- Form Fields (P elements for spacing) --- */
.uccpf-form-wrapper p {
    margin-bottom: 15px;
}

.uccpf-form-wrapper label {
    display: block;
    font-weight: 600;
    margin-bottom: 5px;
    color: #555555;
    font-size: 0.95em;
}

.uccpf-form-wrapper input[type="text"],
.uccpf-form-wrapper input[type="email"],
.uccpf-form-wrapper input[type="tel"],
.uccpf-form-wrapper input[type="number"] {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d1d1;
    border-radius: 5px;
    box-sizing: border-box; /* Ensures padding doesn't affect overall width */
    font-size: 1em;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.uccpf-form-wrapper input:focus {
    border-color: #004c99;
    box-shadow: 0 0 5px rgba(0, 76, 153, 0.3);
    outline: none;
}

.uccpf-form-wrapper small {
    display: block;
    margin-top: 5px;
    color: #888888;
    font-size: 0.85em;
}


/* --- Credit Score Slider Styling --- */
#credit_score {
    -webkit-appearance: none;
    width: 80%; /* Adjust slider width */
    height: 8px;
    background: #dddddd;
    border-radius: 4px;
    margin-right: 10px;
    vertical-align: middle;
}

#credit_score::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #004c99;
    cursor: pointer;
    border: 3px solid #ffffff;
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.2);
}

#creditScoreValue {
    display: inline-block;
    min-width: 40px;
    text-align: center;
    font-weight: bold;
    color: #004c99;
    font-size: 1.1em;
}


/* --- Submit Button --- */
#uccpf-submit-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background-color: #ffcc00; /* Accent Yellow */
    color: #000000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: background-color 0.3s, opacity 0.3s;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

#uccpf-submit-btn:hover {
    background-color: #e6b800; /* Darker yellow on hover */
}

#uccpf-submit-btn:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
    opacity: 0.7;
}

/* --- Response Messages --- */
#uccpf-response-message {
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    text-align: center;
    font-size: 1.1em;
    font-weight: bold;
}

#uccpf-response-message.success {
    background-color: #e6ffe6; /* Light Green */
    border: 1px solid #00cc00; /* Green */
    color: #008000;
}

#uccpf-response-message.error {
    background-color: #ffe6e6; /* Light Red */
    border: 1px solid #cc0000; /* Red */
    color: #800000;
}

/* --- NEW: Affordability Result Styling --- */

.affordability-result {
    margin-top: 20px;
    padding: 15px;
    border-top: 2px dashed #ffcc00; /* Yellow dashed line separator */
    text-align: center;
}

.affordability-result h3 {
    color: #004c99;
    font-size: 1.4em;
    margin-top: 15px;
    margin-bottom: 5px;
    text-transform: uppercase;
}

.affordability-result p {
    font-size: 1em;
    color: #333;
    margin-bottom: 5px;
}

.max-loan-amount {
    font-size: 2.5em;
    font-weight: bold;
    color: #008000; /* Prominent Green highlight */
    margin: 10px 0;
    padding: 5px 0;
    border-bottom: 1px solid #eee;
}

/* --- Responsive Adjustments (Optional but Recommended) --- */
@media (max-width: 480px) {
    .uccpf-form-wrapper {
        padding: 20px;
        margin: 10px;
    }
    
    .uccpf-form-wrapper h2 {
        font-size: 1.5em;
    }

    /* Stack slider components */
    #credit_score, #creditScoreValue {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
    
    .max-loan-amount {
        font-size: 2em;
    }
}