/* ====================================
   GST Calculator Pro - Chrome Fixed CSS
   ==================================== */

:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --success: #4cc9f0;
    --warning: #f72585;
    --danger: #e74c3c;
    --dark: #1e1e2f;
    --light: #4a4e69;
    --white: #ffffff;
    --bg-light: #f8f9fa;
    --border: #e0e0e0;
    --shadow: 0 10px 30px rgba(0,0,0,0.1);
}

/* Container */
.gstp-container {
    max-width: 1200px;
    margin: 30px auto;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 30px;
    padding: 30px;
    box-shadow: var(--shadow);
}

/* Header */
.gstp-header {
    text-align: center;
    margin-bottom: 30px;
    color: var(--white);
}

.gstp-header h1 {
    font-size: 36px;
    margin-bottom: 10px;
    font-weight: 700;
}

.gstp-header h1 i {
    margin-right: 10px;
    color: #ffd700;
}

.gstp-header p {
    font-size: 16px;
    opacity: 0.9;
}

/* Main Calculator */
.gstp-calculator {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    background: var(--white);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow);
}

/* Panels */
.gstp-input-panel h2,
.gstp-results-panel h2 {
    color: var(--dark);
    font-size: 24px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--bg-light);
}

.gstp-input-panel h2 i,
.gstp-results-panel h2 i {
    color: var(--primary);
    margin-right: 10px;
}

/* Form Fields */
.gstp-field {
    margin-bottom: 25px;
}

.gstp-field label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: var(--dark);
    font-weight: 600;
    font-size: 15px;
}

.gstp-field label i {
    color: var(--primary);
    width: 20px;
}

/* ===== FIXED DROPDOWN STYLES - CHROME OPTIMIZED ===== */
.gstp-select-wrapper {
    position: relative;
    width: 100%;
}

/* Main select styling - FIXED for Chrome */
.gstp-select {
    width: 100%;
    padding: 16px 45px 16px 20px; /* Increased padding: top/bottom 16px, left 20px, right 45px for arrow */
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 16px; /* Slightly larger font */
    color: var(--dark);
    background-color: var(--white);
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    transition: all 0.3s;
    font-weight: 500;
    line-height: 1.5; /* Better line height for text */
    height: auto; /* Auto height */
    min-height: 56px; /* Minimum height for better visibility */
    text-overflow: ellipsis; /* Handle long text */
    white-space: nowrap;
    overflow: hidden;
}

/* Hover effect */
.gstp-select:hover {
    border-color: var(--primary);
}

/* Focus effect */
.gstp-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.15);
}

/* Style for the placeholder option */
.gstp-select option:first-child {
    color: #999;
    font-style: normal;
}

/* Style for all options - FIXED for Chrome dropdown */
.gstp-select option {
    padding: 14px 16px; /* Increased padding for options */
    background: var(--white);
    color: var(--dark);
    font-size: 16px;
    line-height: 1.5;
    min-height: 48px; /* Taller options */
}

/* Custom arrow - properly positioned */
.gstp-select-arrow {
    position: absolute;
    right: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary);
    pointer-events: none;
    font-size: 16px;
    z-index: 2;
    background: var(--white); /* Background to prevent overlap */
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

/* Country select specific */
.gstp-country-select {
    font-weight: 500;
    letter-spacing: 0.3px;
}

/* When select is disabled */
.gstp-select:disabled {
    background-color: var(--bg-light);
    border-color: #ddd;
    cursor: not-allowed;
    opacity: 0.7;
}

/* ===== FIXED PRICE FIELD ===== */
.gstp-price-field {
    display: flex;
    align-items: center;
    width: 100%;
    border: 2px solid var(--border);
    border-radius: 12px;
    background: var(--white);
    transition: all 0.3s;
    overflow: hidden;
    min-height: 56px;
}

.gstp-price-field:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(67, 97, 238, 0.15);
}

.gstp-currency-prefix {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 60px;
    height: 100%;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    font-size: 20px;
    font-weight: 700;
    border-right: 2px solid var(--border);
    pointer-events: none;
    padding: 0 5px;
}

.gstp-price-input {
    flex: 1;
    height: 100%;
    padding: 0 20px;
    border: none;
    font-size: 16px;
    color: var(--dark);
    background: transparent;
    min-height: 54px;
}

.gstp-price-input:focus {
    outline: none;
}

/* Remove spinner buttons */
.gstp-price-input::-webkit-outer-spin-button,
.gstp-price-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.gstp-price-input[type=number] {
    -moz-appearance: textfield;
}

.gstp-price-input::placeholder {
    color: #aaa;
    font-weight: 300;
}

/* Button */
.gstp-btn {
    width: 100%;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    border: none;
    border-radius: 12px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 30px 0 20px;
    box-shadow: 0 4px 15px rgba(67, 97, 238, 0.3);
}

.gstp-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(67, 97, 238, 0.4);
}

.gstp-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Info Strip */
.gstp-info {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.gstp-info div {
    flex: 1;
    min-width: 100px;
    padding: 12px 10px;
    background: var(--bg-light);
    border-radius: 25px;
    text-align: center;
    font-size: 14px;
    color: var(--light);
    font-weight: 500;
}

.gstp-info div i {
    color: var(--primary);
    margin-right: 5px;
}

/* Welcome Message */
.gstp-welcome {
    text-align: center;
    padding: 60px 20px;
    background: var(--bg-light);
    border-radius: 15px;
}

.gstp-welcome i {
    font-size: 60px;
    color: var(--primary);
    margin-bottom: 20px;
}

.gstp-welcome h3 {
    font-size: 24px;
    color: var(--dark);
    margin-bottom: 10px;
}

.gstp-welcome p {
    color: var(--light);
    margin-bottom: 25px;
}

.gstp-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--primary);
    animation: slideLeft 1.5s infinite;
    font-weight: 500;
}

/* Results */
.gstp-main-result {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 25px;
    border-radius: 15px;
    margin-bottom: 25px;
}

.gstp-original,
.gstp-tax,
.gstp-total {
    text-align: center;
    flex: 1;
}

.gstp-original .label,
.gstp-tax .label,
.gstp-total .label {
    display: block;
    font-size: 13px;
    color: var(--light);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.gstp-original .value,
.gstp-tax .value,
.gstp-total .value {
    display: block;
    font-size: 24px;
    font-weight: 700;
}

.gstp-tax .value.tax {
    color: var(--warning);
}

.gstp-total .value.total {
    color: var(--success);
    font-size: 28px;
}

.gstp-plus,
.gstp-equal {
    font-size: 22px;
    color: var(--primary);
    width: 35px;
    text-align: center;
}

/* Breakdown */
.gstp-breakdown {
    background: var(--bg-light);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
}

.gstp-breakdown h3 {
    color: var(--dark);
    margin-bottom: 15px;
    font-size: 18px;
}

.gstp-breakdown h3 i {
    color: var(--primary);
    margin-right: 8px;
}

.gstp-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
}

.breakdown-item {
    background: var(--white);
    padding: 18px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.breakdown-item .item-name {
    display: block;
    font-size: 14px;
    color: var(--light);
    margin-bottom: 8px;
}

.breakdown-item .item-amount {
    display: block;
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

/* Summary Card */
.gstp-summary-card {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 25px;
    border-radius: 15px;
    margin: 20px 0;
}

.gstp-summary-card p {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    margin: 0;
    font-size: 16px;
}

.gstp-summary-card p:last-child {
    border-bottom: none;
}

.gstp-summary-card strong {
    font-size: 22px;
    color: #ffd700;
}

/* Actions */
.gstp-actions {
    display: flex;
    gap: 12px;
    margin-top: 25px;
}

.gstp-action-btn {
    flex: 1;
    height: 48px;
    border: none;
    border-radius: 10px;
    background: var(--bg-light);
    color: var(--dark);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 15px;
    font-weight: 500;
}

.gstp-action-btn:hover {
    background: var(--primary);
    color: var(--white);
}

/* Features */
.gstp-features {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-top: 30px;
}

.gstp-feature {
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(10px);
    padding: 18px;
    border-radius: 12px;
    text-align: center;
    color: var(--white);
    transition: all 0.3s;
}

.gstp-feature:hover {
    transform: translateY(-3px);
    background: rgba(255,255,255,0.2);
}

.gstp-feature i {
    font-size: 28px;
    margin-bottom: 10px;
    color: #ffd700;
}

.gstp-feature span {
    display: block;
    font-size: 15px;
    font-weight: 500;
}

/* Error */
.gstp-error {
    margin-top: 20px;
    padding: 16px 20px;
    background: #fee;
    border-left: 4px solid var(--danger);
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.gstp-error i {
    color: var(--danger);
    font-size: 22px;
}

/* Loading */
.gstp-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes slideLeft {
    0%, 100% { transform: translateX(0); }
    50% { transform: translateX(-10px); }
}

/* Responsive */
@media (max-width: 992px) {
    .gstp-calculator {
        padding: 20px;
    }
}

@media (max-width: 768px) {
    .gstp-calculator {
        grid-template-columns: 1fr;
    }
    
    .gstp-main-result {
        flex-direction: column;
        gap: 15px;
    }
    
    .gstp-plus,
    .gstp-equal {
        transform: rotate(90deg);
    }
    
    .gstp-features {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .gstp-actions {
        flex-direction: column;
    }
    
    /* Mobile dropdown fixes */
    .gstp-select {
        padding: 14px 40px 14px 16px;
        font-size: 15px;
        min-height: 50px;
    }
}

@media (max-width: 480px) {
    .gstp-container {
        padding: 15px;
    }
    
    .gstp-header h1 {
        font-size: 24px;
    }
    
    .gstp-features {
        grid-template-columns: 1fr;
    }
    
    .gstp-info {
        flex-direction: column;
    }
    
    .gstp-info div {
        width: 100%;
    }
}