/* Donut Chart Animation Variable */
@property --p {
    syntax: '<percentage>';
    inherits: false;
    initial-value: 0%;
}

/* Widget Container styling to match your site's look */
.si-widget-container {
    max-width: 800px;
    margin: 0 auto;
}

.calculator-card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

/* Form Styling */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--text-main);
}

.form-input-group {
    display: flex;
    gap: 10px;
}

.form-input,
.form-select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 1rem;
    background: #f8fafc;
    transition: 0.2s;
}

.form-input:focus,
.form-select:focus {
    background: #fff;
    border-color: var(--primary);
    outline: none;
}

/* Button */
.btn-calc {
    width: 100%;
    padding: 14px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s;
    margin-top: 10px;
}

.btn-calc:hover {
    background: var(--primary-hover);
}

/* Results Area */
.result-box {
    display: none;
    /* Hidden by default */
    animation: fadeIn 0.5s ease;
}

.summary-card {
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    margin-bottom: 25px;
}

.summary-value {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
    margin-top: 5px;
}

.summary-label {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #475569;
}

/* Chart & Breakdown */
.breakdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.mini-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.mini-card strong {
    display: block;
    font-size: 1.2rem;
    margin-top: 5px;
}

/* Donut Chart */
.chart-container {
    display: flex;
    justify-content: center;
    margin: 30px 0;
}

.donut-chart {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: conic-gradient(#f59e0b var(--p), var(--primary) 0);
    transition: --p 1s ease-out;
    position: relative;
}

.donut-hole {
    width: 140px;
    height: 140px;
    background: #fff;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
}

/* Table */
.schedule-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin-top: 20px;
}

.schedule-table th {
    background: #f1f5f9;
    padding: 12px;
    text-align: left;
}

.schedule-table td {
    border-bottom: 1px solid #e2e8f0;
    padding: 12px;
}

/* Error Box */
#errorBox {
    display: none;
    background: #fef2f2;
    color: #991b1b;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #fecaca;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 600px) {
    .breakdown-grid {
        grid-template-columns: 1fr;
    }
}