/* =========================================
   VALUATION TOOLS (Modern SaaS)
   ========================================= */

/* --- SECTION CONTAINER --- */
.tools-section {
    padding: 60px 0;
    background: var(--bg-body); /* Global Background */
}

.tools-header {
    text-align: center;
    margin-bottom: 40px;
}

.tools-header h2 {
    font-size: 2rem;
    color: var(--secondary);
    margin-bottom: 10px;
}

.tools-header p {
    font-size: 1.1rem;
    color: var(--text-light);
}

/* --- TAB NAVIGATION (Pill Shape) --- */
.tools-selector {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 40px;
    padding: 0 20px;
}

.tool-tab {
    background: white;
    border: 1px solid #e2e8f0;
    padding: 12px 25px;
    border-radius: var(--radius-btn);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-main);
    box-shadow: var(--shadow-sm);
}

.tool-tab:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: #cbd5e1;
    color: var(--primary);
}

.tool-tab.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.tool-icon { font-size: 1.2rem; }

/* --- TOOLS CONTENT PANELS --- */
.tool-panel {
    display: none;
    background: white;
    padding: 40px;
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-md);
    border: 1px solid #e2e8f0;
    animation: fadeIn 0.3s ease;
    max-width: 1000px;
    margin: 0 auto;
}

.tool-panel.active { display: block; }

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.tool-panel h3 {
    font-size: 1.5rem;
    color: var(--secondary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #f1f5f9;
    padding-bottom: 15px;
}

.tool-desc {
    color: var(--text-light);
    margin-bottom: 30px;
    font-size: 0.95rem;
}

/* --- CALCULATOR FORMS --- */
.calc-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.form-row label {
    display: block;
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-row input, .form-row select {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #cbd5e1;
    border-radius: var(--radius-input);
    font-size: 1rem;
    transition: all 0.2s;
    background: #fff;
}

.form-row input:focus, .form-row select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

/* --- RESULTS DISPLAY --- */
.result-box {
    background: linear-gradient(135deg, var(--secondary) 0%, #1e293b 100%);
    padding: 30px;
    border-radius: var(--radius-card);
    margin: 30px 0;
    text-align: center;
    color: white;
    box-shadow: var(--shadow-md);
}

.result-label {
    font-size: 0.85rem;
    opacity: 0.8;
    margin-bottom: 5px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-value {
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 5px;
    color: var(--accent);
}

.result-details { font-size: 0.9rem; opacity: 0.9; }

/* --- EMI SPLIT LAYOUT --- */
.emi-split-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.emi-inputs-section, .emi-results-section {
    background: #f8fafc;
    padding: 25px;
    border-radius: var(--radius-card);
    border: 1px solid #e2e8f0;
}

.emi-card {
    background: white;
    padding: 20px;
    border-radius: var(--radius-input);
    text-align: center;
    border: 1px solid #e2e8f0;
    margin-bottom: 15px;
    box-shadow: var(--shadow-sm);
}

.emi-label {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 5px;
    text-transform: uppercase;
    font-weight: 600;
}

.emi-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

/* --- TWO COLUMN LAYOUT (Stamp Duty) --- */
.two-column-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}

.input-column, .results-column {
    background: #f8fafc;
    padding: 25px;
    border-radius: var(--radius-card);
    border: 1px solid #e2e8f0;
}

.stamp-card {
    background: white;
    padding: 20px;
    border-radius: var(--radius-input);
    text-align: center;
    border: 1px solid #e2e8f0;
    margin-bottom: 15px;
}

.stamp-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--secondary);
}

/* --- TABLES (EMI & Circle Rates) --- */
#emi-table, #circle-table { margin-top: 30px; overflow-x: auto; }

table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: var(--radius-input);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
}

thead th {
    background: var(--secondary);
    color: white;
    padding: 15px;
    font-weight: 600;
    text-align: left;
    font-size: 0.9rem;
}

tbody tr { border-bottom: 1px solid #f1f5f9; }
tbody tr:hover { background: #f8fafc; }
tbody td { padding: 12px 15px; color: var(--text-main); font-size: 0.95rem; }

/* --- DISCLAIMER --- */
.disclaimer {
    margin-top: 30px;
    padding: 15px 20px;
    background: #fffbeb; /* Light Yellow */
    border-left: 4px solid #f59e0b; /* Warning Orange */
    border-radius: var(--radius-input);
    font-size: 0.9rem;
    color: #92400e;
    line-height: 1.5;
}

.disclaimer strong { display: block; margin-bottom: 5px; color: #b45309; }

/* --- RESPONSIVE --- */
@media (max-width: 900px) {
    .emi-split-layout, .two-column-layout { grid-template-columns: 1fr; }
    .tool-tab { flex: 1; justify-content: center; }
}

@media (max-width: 600px) {
    .tools-selector { flex-direction: column; }
    .tool-panel { padding: 20px; }
    .result-value { font-size: 2rem; }
}