/* ============================================
   GST CALCULATOR - FIGMA LEVEL CSS
   Version 1.0
============================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&display=swap');

/* Reset */
.gst-wrap * {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

.gst-wrap {
    --emerald:       #059669;
    --emerald-dark:  #047857;
    --emerald-light: #ECFDF5;
    --teal:          #0D9488;
    --orange:        #F59E0B;
    --red:           #EF4444;
    --grad:          linear-gradient(135deg, #059669 0%, #0D9488 100%);
    --grad-soft:     linear-gradient(135deg,
                     rgba(5,150,105,0.07) 0%,
                     rgba(13,148,136,0.07) 100%);
    --white:         #FFFFFF;
    --bg:            #F0FDF9;
    --border:        rgba(5,150,105,0.14);
    --text:          #1A1A2E;
    --text-muted:    #6B7280;
    --shadow:        0 32px 80px rgba(5,150,105,0.15),
                     0 8px 24px rgba(13,148,136,0.10);
    --shadow-btn:    0 12px 32px rgba(5,150,105,0.40);
    --radius-xl:     24px;
    --radius-lg:     16px;
    --radius-md:     12px;
    --radius-sm:     8px;
    font-family: 'Inter', sans-serif;
    position: relative;
    padding: 40px 16px;
    background: var(--bg);
}

/* Blobs */
.gst-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(70px);
    pointer-events: none;
    z-index: 0;
}
.gst-blob-1 {
    width: 300px; height: 300px;
    background: rgba(5,150,105,0.10);
    top: -80px; left: -80px;
}
.gst-blob-2 {
    width: 250px; height: 250px;
    background: rgba(13,148,136,0.09);
    bottom: 20px; right: -60px;
}
.gst-blob-3 {
    width: 180px; height: 180px;
    background: rgba(245,158,11,0.07);
    top: 40%; left: 40%;
}

/* Card */
.gst-card {
    position: relative;
    z-index: 1;
    max-width: 580px;
    margin: 0 auto;
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    overflow: hidden;
    border: 1px solid var(--border);
}

/* Header */
.gst-header {
    background: var(--grad);
    padding: 26px 32px;
    display: flex;
    align-items: center;
    gap: 16px;
    position: relative;
    overflow: hidden;
}

.gst-header::after {
    content: '';
    position: absolute;
    width: 200px; height: 200px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
    top: -80px; right: -50px;
}

.gst-header::before {
    content: '';
    position: absolute;
    width: 120px; height: 120px;
    background: rgba(255,255,255,0.04);
    border-radius: 50%;
    bottom: -40px; left: 30%;
}

.gst-header-icon {
    width: 52px; height: 52px;
    background: rgba(255,255,255,0.18);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.25);
}

.gst-header-text h2 {
    color: white;
    font-size: 22px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.gst-header-text p {
    color: rgba(255,255,255,0.75);
    font-size: 13px;
    margin-top: 3px;
}

/* Tabs */
.gst-tabs {
    display: flex;
    padding: 16px 32px 0;
    gap: 4px;
    background: white;
    border-bottom: 2px solid var(--border);
}

.gst-tab {
    padding: 10px 24px;
    border: none;
    background: transparent;
    font-size: 14px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    border-radius: 8px 8px 0 0;
    transition: all 0.25s ease;
}

.gst-tab:hover {
    color: var(--emerald);
    background: rgba(5,150,105,0.04);
}

.gst-tab-active {
    color: var(--emerald) !important;
    border-bottom: 3px solid var(--emerald) !important;
    background: rgba(5,150,105,0.06) !important;
}

/* Body */
.gst-body {
    padding: 28px 32px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Field Group */
.gst-field-group {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Step Label */
.gst-step-label {
    display: flex;
    align-items: center;
    gap: 10px;
}

.gst-step-num {
    width: 26px; height: 26px;
    background: var(--grad);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 800;
    flex-shrink: 0;
    box-shadow: 0 4px 10px rgba(5,150,105,0.35);
}

.gst-step-label span {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
}

/* Input Wrap */
.gst-input-wrap {
    display: flex;
    align-items: stretch;
    border: 2px solid var(--border);
    border-radius: var(--radius-md);
    overflow: hidden;
    background: #FAFFFE;
    transition: all 0.25s ease;
}

.gst-input-wrap:focus-within {
    border-color: var(--emerald);
    background: white;
    box-shadow: 0 0 0 4px rgba(5,150,105,0.08);
}

.gst-input-prefix,
.gst-input-suffix {
    padding: 0 14px;
    font-size: 15px;
    font-weight: 700;
    color: var(--emerald);
    background: rgba(5,150,105,0.06);
    display: flex;
    align-items: center;
    white-space: nowrap;
    flex-shrink: 0;
}

.gst-input-prefix {
    border-right: 1.5px solid var(--border);
}

.gst-input-suffix {
    border-left: 1.5px solid var(--border);
}

.gst-input-wrap input {
    width: 100%;
    padding: 14px 16px;
    border: none;
    background: transparent;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    color: var(--text);
    outline: none;
    -moz-appearance: textfield;
}

.gst-input-wrap input::-webkit-inner-spin-button,
.gst-input-wrap input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.gst-input-wrap input::placeholder {
    color: #CBD5E1;
    font-weight: 400;
}

/* GST Rate Grid */
.gst-rate-grid {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.gst-rate-btn {
    padding: 10px 20px;
    border: 2px solid var(--border);
    background: white;
    font-size: 14px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all 0.25s ease;
    flex: 1;
    min-width: 60px;
}

.gst-rate-btn:hover {
    border-color: var(--emerald);
    color: var(--emerald);
    background: var(--emerald-light);
}

.gst-rate-active {
    background: var(--grad) !important;
    color: white !important;
    border-color: transparent !important;
    box-shadow: 0 4px 12px rgba(5,150,105,0.30) !important;
}

/* Custom Rate */
.gst-custom-rate-wrap {
    margin-top: 4px;
}

/* Calculate Button */
#gst_btn {
    width: 100%;
    padding: 15px 24px;
    background: var(--grad);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 16px;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    letter-spacing: 0.3px;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-btn);
    position: relative;
    overflow: hidden;
}

#gst_btn::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        135deg,
        rgba(255,255,255,0.15),
        transparent
    );
    opacity: 0;
    transition: opacity 0.3s;
}

#gst_btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(5,150,105,0.45);
}

#gst_btn:hover::before { opacity: 1; }
#gst_btn:active { transform: translateY(0); }

.gst-btn-icon {
    width: 28px; height: 28px;
    background: rgba(255,255,255,0.20);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Result Section */
.gst-result {
    display: none;
    opacity: 0;
    transform: translateY(16px);
    transition: all 0.45s cubic-bezier(0.34,1.56,0.64,1);
    flex-direction: column;
    gap: 14px;
}

.gst-result-visible {
    display: flex !important;
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* Result Header */
.gst-result-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.gst-result-badge {
    background: var(--grad);
    color: white;
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 13px;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(5,150,105,0.30);
}

.gst-result-rate {
    font-size: 13px;
    font-weight: 700;
    color: var(--emerald);
    background: var(--emerald-light);
    padding: 6px 14px;
    border-radius: 100px;
    border: 1.5px solid rgba(5,150,105,0.20);
}

/* Main Result */
.gst-main-result {
    background: var(--grad);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 12px 32px rgba(5,150,105,0.25);
}

.gst-main-result::before {
    content: '';
    position: absolute;
    width: 160px; height: 160px;
    background: rgba(255,255,255,0.06);
    border-radius: 50%;
    top: -60px; right: -40px;
}

.gst-main-label {
    color: rgba(255,255,255,0.80);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 10px;
}

.gst-main-value {
    color: white;
    font-size: 36px;
    font-weight: 900;
    letter-spacing: -1px;
    line-height: 1;
}

/* Breakdown Grid */
.gst-breakdown-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.gst-breakdown-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    border: 1.5px solid var(--border);
    transition: all 0.25s ease;
}

.gst-breakdown-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(5,150,105,0.10);
}

.gst-card-original { background: #F0FDF9; }
.gst-card-gst      { background: #FFFBEB; }
.gst-card-cgst     { background: #EFF6FF; }
.gst-card-sgst     { background: #FDF4FF; }

.gst-breakdown-icon {
    font-size: 22px;
    width: 40px; height: 40px;
    background: white;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.gst-breakdown-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.gst-breakdown-value {
    font-size: 16px;
    font-weight: 800;
    color: var(--text);
    letter-spacing: -0.3px;
}

/* Slab Info */
.gst-slab-info {
    padding: 14px 16px;
    background: #FFFBEB;
    border-radius: var(--radius-md);
    border-left: 3px solid var(--orange);
    font-size: 13px;
    color: #92400E;
    line-height: 1.6;
    font-weight: 500;
}

/* GST Slabs Section */
.gst-slabs-section {
    padding: 24px 32px;
    background: #FAFFFE;
    border-top: 1px solid var(--border);
}

.gst-slabs-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    letter-spacing: -0.2px;
}

.gst-slabs-grid {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.gst-slab-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 10px 14px;
    background: white;
    border-radius: var(--radius-sm);
    border: 1.5px solid var(--border);
}

.gst-slab-rate {
    font-size: 14px;
    font-weight: 800;
    padding: 6px 12px;
    border-radius: 6px;
    flex-shrink: 0;
    min-width: 48px;
    text-align: center;
}

.gst-slab-0  {
    background: #F1F5F9;
    color: #475569;
}
.gst-slab-5  {
    background: #ECFDF5;
    color: #059669;
}
.gst-slab-12 {
    background: #EFF6FF;
    color: #2563EB;
}
.gst-slab-18 {
    background: #FFFBEB;
    color: #D97706;
}
.gst-slab-28 {
    background: #FEF2F2;
    color: #DC2626;
}

.gst-slab-desc {
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.5;
    font-weight: 500;
}

/* Footer */
.gst-footer {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 16px 32px 24px;
    font-size: 12px;
    color: var(--text-muted);
    line-height: 1.6;
    border-top: 1px solid var(--border);
    background: #FAFFFE;
}

.gst-footer svg {
    flex-shrink: 0;
    margin-top: 2px;
    color: var(--emerald);
}

/* Mobile */
@media (max-width: 600px) {
    .gst-wrap {
        padding: 20px 10px;
    }
    .gst-card {
        border-radius: var(--radius-lg);
    }
    .gst-header {
        padding: 22px 20px;
    }
    .gst-body {
        padding: 22px 20px;
    }
    .gst-tabs {
        padding: 14px 20px 0;
    }
    .gst-slabs-section {
        padding: 20px;
    }
    .gst-footer {
        padding: 14px 20px 20px;
    }
    .gst-main-value {
        font-size: 28px;
    }
    .gst-breakdown-grid {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }
    .gst-rate-btn {
        padding: 8px 14px;
        font-size: 13px;
    }
    .gst-tab {
        padding: 8px 16px;
        font-size: 13px;
    }
}

@media (max-width: 400px) {
    .gst-breakdown-grid {
        grid-template-columns: 1fr;
    }
    .gst-rate-grid {
        gap: 6px;
    }
    .gst-main-value {
        font-size: 24px;
    }
}
