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

/* ---- Main Calc Box ---- */
.gst-calc-box {
    background: #fff;
    border-radius: 20px;
    padding: 32px;
    margin-bottom: 30px;
    box-shadow: 0 4px 30px rgba(0,0,0,0.08);
    border: 2px solid #e5e7eb;
}

/* ---- Mode Toggle ---- */
.gst-mode-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 20px;
}

.gst-mode-btn {
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 14px;
    padding: 14px 18px;
    cursor: pointer;
    text-align: center;
    font-size: 15px;
    font-weight: 700;
    color: #374151;
    transition: all 0.25s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.gst-mode-btn small {
    font-size: 12px;
    font-weight: 400;
    color: #6b7280;
}

.gst-mode-btn:hover {
    border-color: #059669;
    color: #059669;
    background: #f0fdf4;
}

.gst-mode-btn.active {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    border-color: #059669;
    color: #065f46;
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.2);
}

.gst-mode-btn.active small { color: #059669; }

/* Mode label */
.gst-mode-label {
    background: #f0fdf4;
    border: 1.5px solid #bbf7d0;
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 13px;
    color: #065f46;
    margin-bottom: 24px;
    line-height: 1.5;
}

/* ---- Input Row ---- */
.gst-input-row {
    display: grid;
    grid-template-columns: 1fr 1.6fr;
    gap: 24px;
    margin-bottom: 28px;
    align-items: start;
}

.gst-input-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gst-input-group label {
    font-size: 14px;
    font-weight: 700;
    color: #374151;
}

.gst-amount-wrap {
    display: flex;
    align-items: center;
    border: 2px solid #d1d5db;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.gst-amount-wrap:focus-within {
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
}

.gst-rupee {
    background: #f3f4f6;
    padding: 13px 14px;
    font-size: 18px;
    font-weight: 700;
    color: #374151;
    border-right: 2px solid #d1d5db;
    flex-shrink: 0;
}

.gst-amount-wrap input {
    border: none;
    outline: none;
    padding: 13px 14px;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
    width: 100%;
    background: #fff;
}

.gst-amount-wrap input::placeholder {
    font-weight: 400;
    font-size: 15px;
    color: #9ca3af;
}

/* ---- Rate Buttons ---- */
.gst-rate-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin-bottom: 10px;
}

.gst-rate-btn {
    background: #f8fafc;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 8px 4px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    color: #374151;
    transition: all 0.2s;
    text-align: center;
}

.gst-rate-btn:hover {
    border-color: #059669;
    color: #059669;
    background: #f0fdf4;
}

.gst-rate-btn.active {
    background: linear-gradient(135deg, #059669, #047857);
    border-color: #047857;
    color: #fff;
    box-shadow: 0 2px 8px rgba(5, 150, 105, 0.3);
}

/* Custom rate */
.gst-custom-rate {
    display: flex;
    align-items: center;
    border: 2px solid #d1d5db;
    border-radius: 10px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.gst-custom-rate:focus-within { border-color: #059669; }

.gst-custom-rate input {
    border: none;
    outline: none;
    padding: 10px 12px;
    font-size: 14px;
    width: 100%;
    background: #fff;
    color: #1f2937;
}

.gst-custom-rate input::placeholder { color: #9ca3af; font-size: 12px; }

.gst-pct-sign {
    background: #f3f4f6;
    padding: 10px 12px;
    font-size: 14px;
    font-weight: 700;
    color: #374151;
    border-left: 2px solid #d1d5db;
    flex-shrink: 0;
}

/* ---- Result Cards ---- */
.gst-result-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    margin-bottom: 20px;
}

.gst-res-card {
    border-radius: 16px;
    padding: 20px 16px;
    text-align: center;
    border: 2px solid transparent;
    transition: transform 0.2s;
}

.gst-res-card:hover { transform: translateY(-2px); }

.gst-card-orig  { background: linear-gradient(135deg, #f0f9ff, #e0f2fe); border-color: #bae6fd; }
.gst-card-gst   { background: linear-gradient(135deg, #fff7ed, #ffedd5); border-color: #fed7aa; }
.gst-card-total { background: linear-gradient(135deg, #f0fdf4, #dcfce7); border-color: #bbf7d0; }

.gst-card-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.gst-card-label {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

.gst-card-val {
    font-size: 24px;
    font-weight: 900;
    color: #1f2937;
    line-height: 1;
    margin-bottom: 6px;
}

.gst-card-total .gst-card-val { color: #065f46; font-size: 26px; }
.gst-card-gst   .gst-card-val { color: #c2410c; }

.gst-card-sub {
    font-size: 11px;
    color: #6b7280;
    margin-top: 4px;
}

/* Pop animation */
@keyframes gstPop {
    0%   { transform: scale(1); }
    50%  { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.gst-val-pop { animation: gstPop 0.3s ease; }

/* ---- Breakdown Table ---- */
.gst-breakdown {
    background: #f8fafc;
    border-radius: 14px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1.5px solid #e5e7eb;
}

.gst-breakdown-title {
    font-size: 15px;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 14px;
}

.gst-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.gst-table th {
    background: #1f2937;
    color: #fff;
    padding: 10px 14px;
    text-align: left;
    font-size: 13px;
}

.gst-table th:last-child { text-align: right; }

.gst-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #e5e7eb;
    color: #374151;
}

.gst-table td:last-child { text-align: right; font-weight: 600; color: #1f2937; }

.gst-sub-td {
    color: #6b7280 !important;
    font-size: 13px !important;
    padding-left: 24px !important;
}

.gst-row-gst td { background: #fff7ed; color: #c2410c; }
.gst-row-gst td:last-child { color: #c2410c; }

.gst-row-total td {
    background: linear-gradient(135deg, #f0fdf4, #dcfce7);
    font-weight: 700;
    color: #065f46;
    border-top: 2px solid #059669;
}

.gst-row-total td:last-child { color: #065f46; font-size: 15px; }

/* ---- Actions ---- */
.gst-actions {
    display: flex;
    gap: 12px;
    margin-top: 4px;
}

.gst-copy-btn {
    flex: 1;
    padding: 13px;
    background: linear-gradient(135deg, #059669, #047857);
    color: #fff;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
}

.gst-copy-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(5, 150, 105, 0.4);
}

.gst-reset-btn {
    padding: 13px 22px;
    background: #f3f4f6;
    color: #374151;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}

.gst-reset-btn:hover {
    background: #e5e7eb;
    border-color: #d1d5db;
}

/* ---- GST Slabs Section ---- */
.gst-slabs-section {
    margin-bottom: 30px;
}

.gst-slabs-section h2 {
    font-size: 22px;
    color: #1f2937;
    margin-bottom: 18px;
}

.gst-slabs-grid {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
}

.gst-slab-card {
    border-radius: 14px;
    padding: 18px 14px;
    text-align: center;
    border: 2px solid transparent;
    transition: transform 0.2s;
}

.gst-slab-card:hover { transform: translateY(-3px); }

.gst-slab-0  { background: #f8fafc; border-color: #e2e8f0; }
.gst-slab-5  { background: linear-gradient(135deg, #f0fdf4, #dcfce7); border-color: #86efac; }
.gst-slab-12 { background: linear-gradient(135deg, #f0f9ff, #e0f2fe); border-color: #7dd3fc; }
.gst-slab-18 { background: linear-gradient(135deg, #fefce8, #fef9c3); border-color: #fde047; }
.gst-slab-28 { background: linear-gradient(135deg, #fff5f5, #fee2e2); border-color: #fca5a5; }

.gst-slab-rate {
    font-size: 28px;
    font-weight: 900;
    margin-bottom: 4px;
}

.gst-slab-0  .gst-slab-rate { color: #475569; }
.gst-slab-5  .gst-slab-rate { color: #15803d; }
.gst-slab-12 .gst-slab-rate { color: #0369a1; }
.gst-slab-18 .gst-slab-rate { color: #a16207; }
.gst-slab-28 .gst-slab-rate { color: #dc2626; }

.gst-slab-name {
    font-size: 12px;
    font-weight: 700;
    color: #374151;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gst-slab-items {
    font-size: 11px;
    color: #6b7280;
    line-height: 1.6;
}

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

.info-box h4 {
    color: #14532d;
    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: #059669;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 4px;
}

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

.features-box h4 {
    color: #0c4a6e;
    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: #0c4a6e; }

/* ---- Responsive ---- */
@media (max-width: 1024px) {
    .gst-slabs-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 768px) {
    .gst-calc-box { padding: 22px 18px; }
    .gst-input-row { grid-template-columns: 1fr; }
    .gst-result-cards { grid-template-columns: 1fr; gap: 10px; }
    .gst-slabs-grid { grid-template-columns: repeat(2, 1fr); }
    .gst-mode-toggle { grid-template-columns: 1fr; }
    .gst-rate-grid { grid-template-columns: repeat(5, 1fr); }
    .info-grid { grid-template-columns: 1fr; }
    .gst-card-val { font-size: 22px; }
}

@media (max-width: 480px) {
    .gst-slabs-grid { grid-template-columns: repeat(2, 1fr); }
    .gst-rate-grid { grid-template-columns: repeat(5, 1fr); gap: 5px; }
    .gst-rate-btn { font-size: 11px; padding: 7px 2px; }
    .gst-actions { flex-direction: column; }
    .gst-reset-btn { width: 100%; }
    .gst-amount-wrap input { font-size: 18px; }
}