/**
 * Frontend Styles for EBO ROI Calculators
 *
 * @package EBO_ROI_Calculators
 */

/* Calculator Wrapper */
.ebo-roi-calculator-wrapper {
    margin: 20px 0;
}


.ebo-roi-calculator-title {
    margin: 0 0 20px;
    font-size: 24px;
    font-weight: 600;
    color: #1e1e1e;
}

/* Selector Dropdown */
.ebo-roi-calculator-selector-wrapper {
    margin: 20px 0;
}

.ebo-roi-calculator-selector {
    margin-bottom: 20px;
}

.ebo-roi-calculator-selector label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 16px;
    color: #1e1e1e;
}

.ebo-roi-calculator-select {
    width: 100%;
    max-width: 400px;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    background-color: #ffffff;
    cursor: pointer;
}

.ebo-roi-calculator-select:focus {
    outline: 2px solid #2271b1;
    outline-offset: 0;
    border-color: #2271b1;
}

/* Calculator Container */
.ebo-roi-calculator-container {
    margin-top: 20px;
}

/* Calculator Content */
.ebo-roi-calculator-content {
    margin-top: 20px;
}

/* Fields */
.ebo-roi-calculator-fields {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 20px;
}

.ebo-roi-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.ebo-roi-field-label {
    font-weight: 600;
    font-size: 14px;
    color: #1e1e1e;
}

.ebo-roi-field-input,
.ebo-roi-field-select,
.ebo-roi-field-textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 16px;
    border: 1px solid #c3c4c7;
    border-radius: 4px;
    background-color: #ffffff;
    transition: border-color 0.2s;
}

.ebo-roi-field-input:focus,
.ebo-roi-field-select:focus,
.ebo-roi-field-textarea:focus {
    outline: 2px solid #2271b1;
    outline-offset: 0;
    border-color: #2271b1;
}

.ebo-roi-field-textarea {
    min-height: 100px;
    resize: vertical;
}

.ebo-roi-field-value {
    padding: 10px 12px;
    background-color: #f6f7f7;
    border-radius: 4px;
    font-size: 14px;
    color: #50575e;
}

/* Actions */
.ebo-roi-calculator-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 20px;
}

.ebo-roi-calculate-button,
.ebo-roi-reset-button {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
}

.ebo-roi-calculate-button {
    background-color: #2271b1;
    color: #ffffff;
}

.ebo-roi-calculate-button:hover {
    background-color: #135e96;
}

.ebo-roi-calculate-button:active {
    transform: translateY(1px);
}

.ebo-roi-reset-button {
    background-color: #f0f0f1;
    color: #2c3338;
}

.ebo-roi-reset-button:hover {
    background-color: #dcdcde;
}

.ebo-roi-reset-button:active {
    transform: translateY(1px);
}

.ebo-roi-calculate-button:focus,
.ebo-roi-reset-button:focus {
    outline: 2px solid #2271b1;
    outline-offset: 2px;
}

/* Results */
.ebo-roi-calculator-results {
    margin-top: 24px;
    padding: 20px;
    background-color: #f0f6fc;
    border: 1px solid #0071a1;
    border-radius: 4px;
}

.ebo-roi-results-title {
    margin: 0 0 12px;
    font-size: 18px;
    font-weight: 600;
    color: #1e1e1e;
}

.ebo-roi-results-content {
    font-size: 16px;
    line-height: 1.6;
    color: #1e1e1e;
}

.ebo-roi-result-item {
    margin-bottom: 8px;
}

.ebo-roi-result-label {
    font-weight: 600;
}

.ebo-roi-result-value {
    color: #0071a1;
    font-weight: 600;
}

/* Notices and Errors */
.ebo-roi-calculator-notice,
.ebo-roi-calculator-error {
    padding: 12px 16px;
    border-radius: 4px;
    margin: 16px 0;
}

.ebo-roi-calculator-notice {
    background-color: #f0f6fc;
    border-left: 4px solid #0071a1;
    color: #1e1e1e;
}

.ebo-roi-calculator-error {
    background-color: #fcf0f1;
    border-left: 4px solid #d63638;
    color: #1e1e1e;
}

/* Loading State */
.ebo-roi-calculator-loading {
    opacity: 0.6;
    pointer-events: none;
}

.ebo-roi-loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f0f0f1;
    border-top-color: #2271b1;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

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

/* Assessment Forms & Appointment Management Calculator Styles */

/* Two-column layout: controls left, savings right */
.ebo-roi-layout {
    display: grid;
    grid-template-columns: 35% 1fr;
    gap: 48px;
    align-items: center;
}

.ebo-roi-controls {
    /* fields/sliders column */
}

/* Slider section */
.ebo-roi-slider-section {
    margin-bottom: 28px;
}

.ebo-roi-slider-section .ebo-roi-label-text {
    display: block;
    font-weight: 600;
    font-size: 15px;
    color: #1e1e1e;
    margin-bottom: 4px;
}

.ebo-roi-slider-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #4C12A1;
    margin-bottom: 14px;
}

.ebo-roi-usage-slider {
    width: 100%;
    height: 6px;
    border-radius: 4px;
    outline: none;
    background: #f4f5fa;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.ebo-roi-usage-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #ffffff;
    border: 3px solid #4C12A1;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(76, 18, 161, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ebo-roi-usage-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 10px rgba(76, 18, 161, 0.45);
}

.ebo-roi-usage-slider::-moz-range-thumb {
    width: 22px;
    height: 22px;
    border: 3px solid #4C12A1;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(76, 18, 161, 0.3);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ebo-roi-usage-slider::-moz-range-thumb:hover {
    transform: scale(1.15);
    box-shadow: 0 3px 10px rgba(76, 18, 161, 0.45);
}

.ebo-roi-slider-minmax {
    display: flex;
    justify-content: space-between;
    margin-top: 8px;
    font-size: 12px;
    color: #9e9e9e;
}

/* Savings panel */
.ebo-roi-savings {
    background: #f4f5fa;
    border-radius: 12px;
    padding: 32px;
}

.ebo-roi-total-saving {
    margin-bottom: 28px;
}

.ebo-roi-total-saving-value {
    display: inline-block;
    font-size: 48px;
    font-weight: 800;
    line-height: 1.1;
    background: linear-gradient(90deg, #f8485e, #4c12a1);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.ebo-roi-total-saving-label {
    margin: 8px 0 0;
    font-size: 14px;
    color: #757575;
    font-weight: 500;
}

.ebo-roi-year-breakdown {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    border-top: 1px solid #e0e0e0;
    padding-top: 24px;
}

.ebo-roi-year-col {
    text-align: left;
}

.ebo-roi-year-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: #1e1e1e;
}

.entry-content p.ebo-roi-year-label {
    margin: 4px 0 0;
    font-size: 13px;
    color: #757575;
    font-weight: 500;
}

/* Responsive */
@media screen and (max-width: 782px) {
    .ebo-roi-calculator {
        padding: 16px;
    }

    .ebo-roi-calculator-title {
        font-size: 20px;
    }

    .ebo-roi-calculator-actions {
        flex-direction: column;
    }

    .ebo-roi-calculate-button,
    .ebo-roi-reset-button {
        width: 100%;
    }

    .ebo-roi-layout {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .ebo-roi-total-saving-value {
        font-size: 36px;
    }

    .ebo-roi-year-value {
        font-size: 18px;
    }

    .ebo-roi-year-breakdown {
        grid-template-columns: 1fr;
    }
}

/* Notes Section */
.ebo-roi-notes {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    font-size: 13px;
    color: #9e9e9e;
    line-height: 1.6;
}

.ebo-roi-notes p {
    margin: 0 0 8px;
}

.ebo-roi-notes p:last-child {
    margin-bottom: 0;
}
