/* ===== HRA CALCULATOR — Tool Specific CSS ===== */

.hra-wrapper {
    display: grid;
    grid-template-columns: 400px 1fr;
    gap: 24px;
    margin-bottom: 30px;
    align-items: start;
}

/* ===== INPUT PANEL ===== */
.hra-input-panel {
    background: #fff;
    border-radius: 20px;
    padding: 26px;
    border: 2px solid #e5e7eb;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
}

.hra-panel-title {
    font-size: 18px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 22px;
    padding-bottom: 14px;
    border-bottom: 2px solid #f3f4f6;
}

/* Fields */
.hra-field {
    margin-bottom: 22px;
    padding-bottom: 22px;
    border-bottom: 1px solid #f3f4f6;
}

.hra-field:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }

.hra-field > label {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
    display: block;
    margin-bottom: 10px;
}

.hra-field-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.hra-field-header label {
    font-size: 13px;
    font-weight: 700;
    color: #374151;
}

.hra-val-tag {
    background: linear-gradient(135deg, #ecfeff, #cffafe);
    border: 1.5px solid #67e8f9;
    border-radius: 8px;
    padding: 4px 12px;
    font-size: 14px;
    font-weight: 800;
    color: #164e63;
    white-space: nowrap;
}

/* City Toggle */
.hra-city-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.hra-city-btn {
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 12px 10px;
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    cursor: pointer;
    text-align: center;
    transition: all 0.25s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.hra-city-btn small {
    font-size: 11px;
    font-weight: 400;
    color: #6b7280;
}

.hra-city-rate {
    font-size: 12px;
    font-weight: 800;
    background: #e5e7eb;
    border-radius: 20px;
    padding: 2px 10px;
    color: #374151;
    margin-top: 2px;
    transition: all 0.2s;
}

.hra-city-btn:hover {
    border-color: #0891b2;
    color: #0e7490;
    background: #ecfeff;
}

.hra-city-btn.active {
    background: linear-gradient(135deg, #ecfeff, #cffafe);
    border-color: #0891b2;
    color: #164e63;
    box-shadow: 0 4px 12px rgba(8,145,178,0.2);
}

.hra-city-btn.active .hra-city-rate {
    background: #0891b2;
    color: #fff;
}

.hra-city-btn.active small { color: #0e7490; }

/* Slider */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 999px;
    background: #e5e7eb;
    outline: none;
    cursor: pointer;
    margin-bottom: 4px;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: linear-gradient(135deg, #0891b2, #0e7490);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(8,145,178,0.4);
    border: 2px solid #fff;
    transition: transform 0.15s;
}

input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.2); }
input[type="range"]::-moz-range-thumb {
    width: 18px; height: 18px; border-radius: 50%;
    background: linear-gradient(135deg, #0891b2, #0e7490);
    border: 2px solid #fff; cursor: pointer;
}

.hra-range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: #9ca3af;
    margin-bottom: 8px;
}

.hra-manual-input {
    display: flex;
    align-items: center;
    border: 2px solid #e5e7eb;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.hra-manual-input:focus-within {
    border-color: #0891b2;
    box-shadow: 0 0 0 3px rgba(8,145,178,0.1);
}

.hra-prefix {
    background: #f3f4f6;
    padding: 9px 12px;
    font-size: 15px;
    font-weight: 700;
    color: #374151;
    border-right: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.hra-suffix {
    background: #f3f4f6;
    padding: 9px 10px;
    font-size: 12px;
    font-weight: 600;
    color: #6b7280;
    border-left: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.hra-manual-input input {
    border: none;
    outline: none;
    padding: 9px 12px;
    font-size: 14px;
    font-weight: 600;
    color: #1f2937;
    width: 100%;
    background: #fff;
}

.hra-field-note {
    font-size: 11px;
    color: #6b7280;
    margin-top: 8px;
    padding: 6px 10px;
    background: #f0fdfa;
    border-radius: 6px;
    border-left: 3px solid #0891b2;
}

/* Tax Slab Buttons */
.hra-slab-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 8px;
}

.hra-slab-btn {
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px 4px;
    font-size: 14px;
    font-weight: 800;
    color: #374151;
    cursor: pointer;
    text-align: center;
    transition: all 0.2s;
}

.hra-slab-btn:hover {
    border-color: #0891b2;
    color: #0e7490;
    background: #ecfeff;
}

.hra-slab-btn.active {
    background: linear-gradient(135deg, #0891b2, #0e7490);
    border-color: #0e7490;
    color: #fff;
    box-shadow: 0 2px 8px rgba(8,145,178,0.3);
}

/* ===== RESULT PANEL ===== */
.hra-result-panel {
    background: #fff;
    border-radius: 20px;
    border: 2px solid #e5e7eb;
    box-shadow: 0 4px 20px rgba(0,0,0,0.06);
    overflow: hidden;
}

/* Hero */
.hra-hero {
    background: linear-gradient(135deg, #164e63, #0e7490, #0891b2);
    padding: 26px 24px;
    text-align: center;
    color: #fff;
}

.hra-hero-label { font-size: 13px; font-weight: 600; opacity: 0.85; text-transform: uppercase; letter-spacing: 0.8px; margin-bottom: 8px; }
.hra-hero-val   { font-size: 44px; font-weight: 900; line-height: 1; margin-bottom: 8px; text-shadow: 0 2px 12px rgba(0,0,0,0.2); }
.hra-hero-sub   { font-size: 13px; opacity: 0.8; }

/* 3 Conditions Box */
.hra-conditions-box {
    padding: 20px;
    border-bottom: 2px solid #f3f4f6;
}

.hra-cond-title {
    font-size: 13px;
    font-weight: 800;
    color: #1f2937;
    margin-bottom: 14px;
}

.hra-cond-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }

.hra-cond-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #f8fafc;
    border-radius: 10px;
    padding: 12px 14px;
    border: 2px solid #f3f4f6;
    transition: all 0.3s;
}

.hra-cond-row.hra-cond-min {
    background: linear-gradient(135deg, #ecfeff, #cffafe);
    border-color: #0891b2;
    box-shadow: 0 2px 10px rgba(8,145,178,0.15);
}

.hra-cond-num {
    font-size: 18px;
    flex-shrink: 0;
    width: 28px;
    text-align: center;
}

.hra-cond-detail { flex: 1; min-width: 0; }
.hra-cond-label   { font-size: 13px; font-weight: 700; color: #1f2937; display: block; }
.hra-cond-formula { font-size: 11px; color: #6b7280; display: block; margin-top: 2px; }

.hra-cond-val {
    font-size: 15px;
    font-weight: 800;
    color: #1f2937;
    flex-shrink: 0;
}

.hra-cond-min .hra-cond-val { color: #0e7490; }

.hra-cond-tag {
    font-size: 11px;
    font-weight: 700;
    flex-shrink: 0;
    min-width: 70px;
    text-align: right;
}

.hra-tag-min {
    background: #0891b2;
    color: #fff;
    padding: 3px 8px;
    border-radius: 20px;
    font-size: 10px;
}

.hra-cond-result {
    background: linear-gradient(135deg, #164e63, #0e7490);
    color: #fff;
    border-radius: 10px;
    padding: 12px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
}

.hra-cond-result strong { font-size: 16px; }

/* Summary Cards */
.hra-sum-cards {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: #f0f0f0;
    border-bottom: 2px solid #f3f4f6;
}

.hra-sum-card {
    background: #fff;
    padding: 14px 10px;
    text-align: center;
}

.hra-sum-icon   { font-size: 20px; margin-bottom: 4px; }
.hra-sum-label  { font-size: 10px; font-weight: 700; color: #6b7280; text-transform: uppercase; letter-spacing: 0.4px; margin-bottom: 2px; }
.hra-sum-period { font-size: 10px; color: #9ca3af; margin-bottom: 4px; }
.hra-sum-val    { font-size: 14px; font-weight: 800; color: #1f2937; }

.hra-sum-exempt  .hra-sum-val { color: #0e7490; }
.hra-sum-taxable .hra-sum-val { color: #dc2626; }
.hra-sum-saving  .hra-sum-val { color: #059669; }

/* Split Bar */
.hra-bar-section {
    padding: 16px 20px;
    border-bottom: 2px solid #f3f4f6;
}

.hra-bar-label-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 8px;
}

.hra-split-bar {
    display: flex;
    height: 14px;
    border-radius: 999px;
    overflow: hidden;
    background: #f3f4f6;
}

.hra-split-exempt  { background: linear-gradient(90deg, #0891b2, #06b6d4); transition: width 0.6s ease; }
.hra-split-taxable { background: linear-gradient(90deg, #f87171, #ef4444); transition: width 0.6s ease; }

.hra-bar-pct-row {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    font-weight: 700;
    margin-top: 6px;
    color: #374151;
}

/* Tips Box */
.hra-tips-box {
    padding: 16px 20px;
    background: #fffbeb;
    border-top: 2px solid #fef3c7;
}

.hra-tips-title {
    font-size: 14px;
    font-weight: 800;
    color: #78350f;
    margin-bottom: 10px;
}

.hra-tip-item {
    font-size: 13px;
    color: #374151;
    padding: 8px 12px;
    background: #fff;
    border-radius: 8px;
    border-left: 3px solid #f59e0b;
    margin-bottom: 8px;
    line-height: 1.6;
}

.hra-tip-item:last-child { margin-bottom: 0; }

/* Info / Features */
.info-box {
    background: linear-gradient(135deg, #ecfeff, #cffafe);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
}

.info-box h4 { color: #164e63; font-size: 20px; margin-bottom: 18px; }

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
}

.info-item {
    background: #fff;
    border-radius: 12px;
    padding: 16px;
    color: #374151;
    font-size: 14px;
    line-height: 1.6;
}

.info-item strong { display: block; color: #0891b2; font-size: 15px; font-weight: 700; margin-bottom: 4px; }

.features-box {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-radius: 16px;
    padding: 28px;
    margin-bottom: 24px;
}

.features-box h4 { color: #14532d; font-size: 20px; margin-bottom: 16px; }
.features-box ul { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }

.features-box ul li {
    font-size: 14px;
    color: #374151;
    padding-left: 22px;
    position: relative;
    line-height: 1.6;
}

.features-box ul li::before { content: '✓'; position: absolute; left: 0; color: #059669; font-weight: 700; }
.features-box ul li strong { color: #14532d; }

/* RESPONSIVE */
@media (max-width: 1100px) {
    .hra-wrapper { grid-template-columns: 1fr; }
}

@media (max-width: 768px) {
    .hra-input-panel { padding: 20px 16px; }
    .hra-sum-cards { grid-template-columns: repeat(2, 1fr); }
    .hra-hero-val { font-size: 34px; }
    .hra-city-grid { grid-template-columns: 1fr; }
    .hra-cond-row { flex-wrap: wrap; }
    .info-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
    .hra-sum-cards { grid-template-columns: repeat(2, 1fr); }
    .hra-slab-grid { grid-template-columns: repeat(4, 1fr); }
    .hra-hero-val { font-size: 28px; }
}