/**
 * Capify Business Loan Calculator Styles
 * Version: 2.4.1
 * Optimized for performance - Google Fonts loaded via PHP, scoped CSS resets
 */

/* Reset - Scoped to calculator elements only to avoid conflicts */
.capify-loan-calculator-wrapper,
.capify-loan-calculator-wrapper * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Wrapper */
.capify-loan-calculator-wrapper {
    font-family: 'Poppins', sans-serif;
    width: 100%;
    margin: 0 auto;
}

.calculator-card {
    background: white;
    border-radius: 24px;
    border-bottom: 1px solid #edf1f2;
    padding: 40px;
    display: flex;
    width: 100%;
    min-height: 526px;
}

/* Left Column - Inputs (50%) */
.calculator-left {
    flex: 1;
    padding-right: 20px;
}

/* Right Column - Results (50%) */
.calculator-right {
    flex: 1;
    padding-left: 20px;
}

/* Header Section */
.header {
    margin-bottom: 60px;
}

.header-icon {
    font-size: 48px;
    color: #a6ce39;
    margin-bottom: 20px;
    line-height: 1;
}

.header-icon i,
.header-icon svg {
    width: 48px;
    height: 48px;
}

.title {
    font-weight: 700;
    font-size: 28px;
    line-height: 1.5;
    color: #0b3558;
    margin-bottom: 12px;
}

.subtitle {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.65;
    color: #333;
}

/* Input Sections */
.input-section {
    margin-bottom: 40px;
}

.input-label {
    display: block;
    font-weight: 600;
    font-size: 16px;
    line-height: 1.65;
    color: #333;
    margin-bottom: 4px;
}

.input-value {
    font-weight: 700;
    font-size: 20px;
    line-height: 1.65;
    color: #0b3558;
    margin-bottom: 20px;
}

/* Custom Slider Styling - Fully customizable, no external dependencies */
.slider-container {
    position: relative;
    height: 28px;
    width: 100%;
    padding: 10px 0;
}

/* Track (background bar) */
.custom-slider-track {
    position: relative;
    width: 100%;
    height: 8px;
    background: #f5f7f8;
    border-radius: 32px;
    cursor: pointer;
}

/* Progress bar (filled portion) */
.custom-slider-progress {
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 0%;
    background: #a6ce39;
    border-radius: 32px;
    pointer-events: none;
}

/* Handle (draggable thumb) */
.custom-slider-handle {
    position: absolute;
    top: 50%;
    left: 0%;
    width: 28px;
    height: 28px;
    margin-left: -14px;
    margin-top: -14px;
    background: #a6ce39;
    border-radius: 50%;
    box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.25);
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.custom-slider-handle.dragging {
    cursor: grabbing;
}

.custom-slider-handle:focus {
    outline: none;
}

/* White dot in center of handle */
.custom-slider-handle-dot {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 12px;
    height: 12px;
    background-color: white;
    border-radius: 50%;
    transform: translate(-50%, -50%);
}

/* Disabled state */
.slider-container[disabled] .custom-slider-track {
    opacity: 0.5;
    cursor: not-allowed;
}

.slider-container[disabled] .custom-slider-handle {
    cursor: not-allowed;
}

/* Calculate Button */
.calculate-btn {
    background-color: #a6ce39;
    color: #0b3558;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
    letter-spacing: -0.08px;
    padding: 16px 32px;
    border: none;
    border-radius: 32px;
    cursor: pointer;
    min-width: 181px;
    height: 56px;
    margin-top: 8px;
    transition: background-color 0.3s ease;
}

.calculate-btn:hover {
    background-color: #95ba2f;
}

/* Results Panel */
.results-panel {
    width: 100%;
    height: 100%;
    background-color: #f5f7f8;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    border: 1px solid #edf1f2;
    border-radius: 12px;
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Empty State */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 300px;
    padding: 40px 20px;
}

.empty-state-icon {
    margin-bottom: 24px;
    opacity: 0.6;
}

/* Icon positioning adjustments */
.empty-state.icon-after .empty-state-icon {
    margin-bottom: 0;
    margin-top: 24px;
}

.empty-state-title {
    font-weight: 700;
    font-size: 20px;
    line-height: 1.5;
    color: #0b3558;
    margin-bottom: 12px;
}

.empty-state-subtitle {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.65;
    color: #626d7c;
    max-width: 360px;
}

/* Results Content */
.results-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.results-header {
    text-align: center;
    padding-bottom: 15px;
}

.results-title {
    font-weight: 700;
    font-size: 20px;
    line-height: 1.65;
    color: #0b3558;
    margin-bottom: 7px;
}

.results-subtitle {
    font-weight: 400;
    font-size: 16px;
    line-height: 1.65;
    color: #333;
    margin-bottom: 7px;
}

.loan-amount {
    font-weight: 700;
    font-size: 28px;
    line-height: 1.5;
    color: #0b3558;
    margin-bottom: 7px;
}

.disclaimer {
    font-weight: 400;
    font-size: 13px;
    line-height: 16px;
    color: #626d7c;
}

.divider {
    height: 1px;
    background-color: #edf1f2;
}

.section-label {
    font-weight: 700;
    font-size: 16px;
    line-height: 1.65;
    color: #333;
    text-align: center;
    margin-bottom: 16px;
}

/* Repayment Grid */
.repayment-grid {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    height: 49px;
}

.repayment-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.repayment-label {
    font-weight: 400;
    font-size: 13px;
    line-height: 16px;
    color: #626d7c;
    margin-bottom: 4px;
}

.repayment-value {
    font-weight: 700;
    font-size: 20px;
    line-height: 1.65;
    color: #0b3558;
    white-space: nowrap;
}

.vertical-divider {
    width: 1px;
    height: 100%;
    background-color: #edf1f2;
}

/* Total Section */
.total-section {
    text-align: center;
}

.total-label {
    font-weight: 600;
    font-size: 16px;
    line-height: 1.65;
    color: #333;
    margin-bottom: 8px;
}

.total-value {
    font-weight: 700;
    font-size: 20px;
    line-height: 1.65;
    color: #0b3558;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .calculator-card {
        flex-direction: column;
        padding: 40px;
    }

    .calculator-left {
        padding-right: 0;
        margin-bottom: 40px;
    }

    .calculator-right {
        padding-left: 0;
    }
}

@media (max-width: 768px) {
    .capify-loan-calculator-wrapper {
        max-width: 100%;
        padding: 0 16px;
    }

    .calculator-card {
        padding: 24px;
        margin: 0 auto;
    }

    .calculator-left {
        margin-bottom: 24px;
    }

    .header,
    .input-section,
    .results-panel {
        text-align: center;
    }

    .header {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .title {
        font-size: 24px;
    }

    .subtitle {
        font-size: 14px;
    }

    .repayment-grid {
        flex-direction: column;
        height: auto;
        gap: 20px;
        align-items: center;
    }

    .vertical-divider {
        display: none;
    }

    .results-panel {
        padding: 24px 20px;
    }
}
