/* Ultimate GST Calculator Pro Styles */
:root {
    --primary-blue: #4361ee;
    --blue-light: #4895ef;
    --blue-dark: #3a0ca3;
    --success-green: #4cc9f0;
    --green-dark: #4895ef;
    --warning-orange: #f72585;
    --orange-dark: #b5179e;
    --text-dark: #2b2d42;
    --text-light: #8d99ae;
    --bg-light: #f8f9fa;
    --border-light: #e9ecef;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
    --shadow-hover: 0 15px 40px rgba(0,0,0,0.15);
    --gradient-header: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-button: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-blue: linear-gradient(135deg, #4361ee 0%, #3a0ca3 100%);
    --gradient-green: linear-gradient(135deg, #4cc9f0 0%, #4361ee 100%);
    --gradient-orange: linear-gradient(135deg, #f72585 0%, #b5179e 100%);
}

.ult-gst-calculator-container {
    max-width: 800px;
    margin: 0 auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

.gst-calculator-card {
    background: white;
    border-radius: 20px;
    box-shadow: var(--shadow);
    overflow: hidden;
    transition: all 0.3s ease;
}

.gst-calculator-card:hover {
    box-shadow: var(--shadow-hover);
}

/* Header Styles */
.gst-header {
    background: var(--gradient-header);
    color: white;
    padding: 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.gst-header::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 0%, transparent 70%);
    animation: float 6s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(180deg); }
}

.gst-header-icon {
    font-size: 48px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.gst-header h2 {
    margin: 0 0 10px 0;
    font-size: 32px;
    font-weight: 700;
}

.gst-header p {
    margin: 0;
    opacity: 0.9;
    font-size: 16px;
}

/* Form Styles */
.gst-calculator-form {
    padding: 40px;
}

.form-group {
    margin-bottom: 30px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 16px;
}

.form-group label i {
    margin-right: 8px;
    color: var(--primary-blue);
    width: 20px;
}

.gst-input, .gst-select {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid var(--border-light);
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
}

.gst-input:focus, .gst-select:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.1);
}

.gst-input::placeholder {
    color: var(--text-light);
}

/* Range Slider */
.gst-range {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: var(--border-light);
    outline: none;
    margin: 15px 0 10px 0;
    -webkit-appearance: none;
}

.gst-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--gradient-blue);
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
    transition: all 0.3s ease;
}

.gst-range::-webkit-slider-thumb:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(67, 97, 238, 0.4);
}

.gst-range::-moz-range-thumb {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary-blue);
    cursor: pointer;
    border: none;
    box-shadow: 0 4px 10px rgba(67, 97, 238, 0.3);
}

.range-labels {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: var(--text-light);
    margin-top: 5px;
}

#current_rate {
    font-weight: 600;
    color: var(--primary-blue);
}

/* Toggle Switch */
.toggle-group {
    text-align: center;
}

.toggle-switch {
    display: inline-block;
    position: relative;
    margin: 15px 0;
}

.toggle-input {
    display: none;
}

.toggle-label {
    display: flex;
    align-items: center;
    background: var(--border-light);
    border-radius: 50px;
    padding: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-width: 220px;
}

.toggle-exclusive, .toggle-inclusive {
    padding: 8px 20px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
    z-index: 1;
    flex: 1;
    text-align: center;
}

.toggle-handle {
    position: absolute;
    top: 5px;
    left: 5px;
    width: 50%;
    height: calc(100% - 10px);
    background: var(--gradient-blue);
    border-radius: 50px;
    transition: all 0.3s ease;
    z-index: 0;
}

.toggle-input:checked + .toggle-label .toggle-handle {
    left: calc(50% - 5px);
}

.toggle-input:checked + .toggle-label .toggle-exclusive {
    color: var(--text-light);
}

.toggle-input:not(:checked) + .toggle-label .toggle-inclusive {
    color: var(--text-light);
}

.toggle-hint {
    margin-top: 10px;
    font-size: 14px;
    color: var(--text-light);
}

/* Calculate Button */
.gst-calculate-btn {
    width: 100%;
    padding: 18px;
    background: var(--gradient-button);
    border: none;
    border-radius: 12px;
    color: white;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.3);
}

.gst-calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.gst-calculate-btn:active {
    transform: translateY(0);
}

.gst-calculate-btn.loading {
    pointer-events: none;
    opacity: 0.8;
}

/* Results Section */
.gst-results {
    padding: 0 40px 40px 40px;
    animation: fadeInUp 0.6s ease;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid var(--border-light);
}

.results-header h3 {
    margin: 0;
    color: var(--text-dark);
    font-size: 24px;
}

.results-header i {
    color: var(--primary-blue);
    margin-right: 10px;
}

/* Summary Cards */
.summary-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.summary-card {
    padding: 25px;
    border-radius: 15px;
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.summary-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}

.summary-card.base-amount {
    background: var(--gradient-blue);
}

.summary-card.tax-amount {
    background: var(--gradient-orange);
}

.summary-card.final-amount {
    background: var(--gradient-green);
}

.card-icon {
    font-size: 32px;
    margin-bottom: 15px;
    opacity: 0.9;
}

.card-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 8px;
    font-weight: 500;
}

.card-value {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 10px;
}

.final-amount .card-value {
    font-size: 28px;
}

.copy-amount-btn {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
}

.copy-amount-btn:hover {
    background: rgba(255,255,255,0.3);
    transform: scale(1.05);
}

/* Tax Breakdown Table */
.tax-breakdown h4 {
    color: var(--text-dark);
    margin-bottom: 20px;
    font-size: 18px;
    text-align: center;
}

.breakdown-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.breakdown-table thead {
    background: var(--gradient-blue);
    color: white;
}

.breakdown-table th {
    padding: 15px 20px;
    text-align: left;
    font-weight: 600;
    font-size: 14px;
}

.breakdown-table tbody tr {
    border-bottom: 1px solid var(--border-light);
    transition: all 0.3s ease;
}

.breakdown-table tbody tr:nth-child(even) {
    background: var(--bg-light);
}

.breakdown-table tbody tr:hover {
    background: rgba(67, 97, 238, 0.05);
}

.breakdown-table td {
    padding: 15px 20px;
    color: var(--text-dark);
}

.breakdown-table td:last-child {
    font-weight: 600;
    color: var(--primary-blue);
}

/* ============================================== */
/* MOBILE RESPONSIVE STYLES - SMALLER SIZE */
/* ============================================== */

@media (max-width: 1024px) {
    .ult-gst-calculator-container {
        max-width: 95%;
        margin: 10px auto;
    }
}

@media (max-width: 768px) {
    .ult-gst-calculator-container {
        max-width: 92%;
        margin: 8px auto;
    }
    
    .gst-calculator-card {
        border-radius: 16px;
    }
    
    .gst-header {
        padding: 20px 15px;
    }
    
    .gst-header-icon {
        font-size: 36px;
        margin-bottom: 10px;
    }
    
    .gst-header h2 {
        font-size: 24px;
        margin-bottom: 8px;
    }
    
    .gst-header p {
        font-size: 14px;
    }
    
    .gst-calculator-form {
        padding: 25px 20px;
    }
    
    .form-group {
        margin-bottom: 20px;
    }
    
    .form-group label {
        font-size: 14px;
        margin-bottom: 8px;
    }
    
    .gst-input, .gst-select {
        padding: 12px 15px;
        font-size: 14px;
        border-radius: 10px;
    }
    
    .gst-range {
        margin: 12px 0 8px 0;
        height: 6px;
    }
    
    .gst-range::-webkit-slider-thumb {
        width: 20px;
        height: 20px;
    }
    
    .range-labels {
        font-size: 12px;
    }
    
    .toggle-label {
        min-width: 180px;
        padding: 4px;
    }
    
    .toggle-exclusive, .toggle-inclusive {
        padding: 6px 15px;
        font-size: 12px;
    }
    
    .toggle-handle {
        height: calc(100% - 8px);
    }
    
    .toggle-hint {
        font-size: 12px;
        margin-top: 8px;
    }
    
    .gst-calculate-btn {
        padding: 14px;
        font-size: 16px;
        border-radius: 10px;
    }
    
    .gst-results {
        padding: 0 20px 25px 20px;
    }
    
    .results-header {
        margin-bottom: 20px;
        padding-bottom: 15px;
    }
    
    .results-header h3 {
        font-size: 20px;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
        gap: 15px;
        margin-bottom: 25px;
    }
    
    .summary-card {
        padding: 20px 15px;
        border-radius: 12px;
    }
    
    .card-icon {
        font-size: 28px;
        margin-bottom: 12px;
    }
    
    .card-label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .card-value {
        font-size: 20px;
        margin-bottom: 8px;
    }
    
    .final-amount .card-value {
        font-size: 22px;
    }
    
    .copy-amount-btn {
        padding: 6px 10px;
        font-size: 12px;
        border-radius: 6px;
    }
    
    .tax-breakdown h4 {
        font-size: 16px;
        margin-bottom: 15px;
    }
    
    .breakdown-table th {
        padding: 12px 15px;
        font-size: 13px;
    }
    
    .breakdown-table td {
        padding: 12px 15px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .ult-gst-calculator-container {
        max-width: 90%;
        margin: 5px auto;
    }
    
    .gst-calculator-card {
        border-radius: 14px;
    }
    
    .gst-header {
        padding: 15px 12px;
    }
    
    .gst-header-icon {
        font-size: 32px;
        margin-bottom: 8px;
    }
    
    .gst-header h2 {
        font-size: 20px;
        margin-bottom: 6px;
    }
    
    .gst-header p {
        font-size: 13px;
    }
    
    .gst-calculator-form {
        padding: 20px 15px;
    }
    
    .form-group {
        margin-bottom: 18px;
    }
    
    .form-group label {
        font-size: 13px;
        margin-bottom: 6px;
    }
    
    .gst-input, .gst-select {
        padding: 10px 12px;
        font-size: 13px;
        border-radius: 8px;
    }
    
    .gst-range {
        margin: 10px 0 6px 0;
        height: 5px;
    }
    
    .gst-range::-webkit-slider-thumb {
        width: 18px;
        height: 18px;
    }
    
    .range-labels {
        font-size: 11px;
    }
    
    .toggle-label {
        min-width: 160px;
        padding: 3px;
    }
    
    .toggle-exclusive, .toggle-inclusive {
        padding: 5px 12px;
        font-size: 11px;
    }
    
    .toggle-handle {
        height: calc(100% - 6px);
    }
    
    .toggle-hint {
        font-size: 11px;
        margin-top: 6px;
    }
    
    .gst-calculate-btn {
        padding: 12px;
        font-size: 15px;
        border-radius: 8px;
    }
    
    .gst-results {
        padding: 0 15px 20px 15px;
    }
    
    .results-header {
        margin-bottom: 18px;
        padding-bottom: 12px;
    }
    
    .results-header h3 {
        font-size: 18px;
    }
    
    .summary-cards {
        gap: 12px;
        margin-bottom: 20px;
    }
    
    .summary-card {
        padding: 18px 12px;
        border-radius: 10px;
    }
    
    .card-icon {
        font-size: 24px;
        margin-bottom: 10px;
    }
    
    .card-label {
        font-size: 12px;
        margin-bottom: 5px;
    }
    
    .card-value {
        font-size: 18px;
        margin-bottom: 6px;
    }
    
    .final-amount .card-value {
        font-size: 20px;
    }
    
    .copy-amount-btn {
        padding: 5px 8px;
        font-size: 11px;
    }
    
    .tax-breakdown h4 {
        font-size: 15px;
        margin-bottom: 12px;
    }
    
    .breakdown-table th {
        padding: 10px 12px;
        font-size: 12px;
    }
    
    .breakdown-table td {
        padding: 10px 12px;
        font-size: 12px;
    }
}

@media (max-width: 360px) {
    .ult-gst-calculator-container {
        max-width: 88%;
        margin: 3px auto;
    }
    
    .gst-calculator-card {
        border-radius: 12px;
    }
    
    .gst-header {
        padding: 12px 10px;
    }
    
    .gst-header-icon {
        font-size: 28px;
    }
    
    .gst-header h2 {
        font-size: 18px;
    }
    
    .gst-header p {
        font-size: 12px;
    }
    
    .gst-calculator-form {
        padding: 15px 12px;
    }
    
    .gst-input, .gst-select {
        padding: 8px 10px;
        font-size: 12px;
    }
    
    .toggle-label {
        min-width: 140px;
    }
    
    .toggle-exclusive, .toggle-inclusive {
        padding: 4px 10px;
        font-size: 10px;
    }
    
    .summary-card {
        padding: 15px 10px;
    }
    
    .card-value {
        font-size: 16px;
    }
    
    .final-amount .card-value {
        font-size: 18px;
    }
}

/* FontAwesome fallback */
.fas {
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
}