/**
 * Public-facing CSS for the Break-Even Point Calculator form.
 *
 * @package           BreakEvenCalculator
 * @since             1.0.0
 */

/* --- General Form Styling --- */
#bep-calculator-wrapper {
    max-width: 780px;
    margin: 20px auto;
    padding: 30px;
    background-color: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.bep-section-title {
    font-size: 1.25em;
    color: #333;
    margin-top: 25px;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

#bep-calculator-form .bep-section-title:first-of-type {
    margin-top: 0;
}

/* --- Grid Layout for Inputs --- */
.bep-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

/* --- Form Elements --- */
.bep-form-group {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
}

.bep-form-group label {
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
    font-size: 14px;
}

.bep-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s, box-shadow 0.3s;
}

.bep-input:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 2px rgba(0, 124, 186, 0.2);
    outline: none;
}

/* --- Checkbox Styling --- */
.bep-checkbox-group {
    flex-direction: row;
    align-items: center;
}

.bep-checkbox-group input[type="checkbox"] {
    margin-right: 10px;
    width: 18px;
    height: 18px;
    accent-color: #007cba;
}

.bep-checkbox-group label {
    margin-bottom: 0;
    font-weight: normal;
}

/* --- Error Message Styling --- */
.bep-error-message {
    color: #d93025;
    font-size: 13px;
    margin-top: 6px;
    display: none; /* Hidden by default */
}

.bep-input.bep-invalid {
    border-color: #d93025;
}

.bep-checkbox-group.bep-invalid label {
    color: #d93025;
}

/* --- Submit Button --- */
.bep-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 15px 20px;
    font-size: 18px;
    font-weight: bold;
    color: #fff;
    background-color: #007cba;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.1s;
}

.bep-button:hover {
    background-color: #005a87;
}

.bep-button:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
}

/* --- Spinner for Loading State --- */
.bep-spinner {
    display: none; /* Hidden by default */
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: bep-spin 1s ease-in-out infinite;
    margin-left: 10px;
}

.bep-button.bep-loading .bep-spinner {
    display: block;
}

.bep-button.bep-loading .bep-button-text {
    display: inline-block;
}

@keyframes bep-spin {
    to {
        transform: rotate(360deg);
    }
}

/* --- Success/Error Messages --- */
.bep-message {
    padding: 20px;
    margin-top: 20px;
    border-radius: 6px;
    border: 1px solid;
}

.bep-message h3 {
    margin-top: 0;
}

#bep-success-message {
    border-color: #c3e6cb;
    background-color: #d4edda;
    color: #155724;
}

#bep-error-message-general {
    border-color: #f5c6cb;
    background-color: #f8d7da;
    color: #721c24;
}

/* --- Utility Classes --- */
.bep-hidden {
    display: none !important;
}

/* --- reCAPTCHA Notice --- */
.bep-recaptcha-notice {
    font-size: 12px;
    color: #777;
    margin-top: 20px;
    text-align: center;
}

/* --- Responsive Design --- */
@media (max-width: 768px) {
    #bep-calculator-wrapper {
        padding: 20px;
    }
    .bep-grid {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .bep-form-group {
        margin-bottom: 20px;
    }
}
