/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: #333;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

/* Header */
header {
    text-align: center;
    margin-bottom: 30px;
    color: white;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 10px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

header p {
    font-size: 1.1rem;
    opacity: 0.9;
    font-weight: 300;
}

/* Cards */
.card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(10px);
}

.card h2 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.5rem;
    font-weight: 600;
}

.card h3 {
    color: #4a5568;
    margin-bottom: 12px;
    font-size: 1.2rem;
    font-weight: 500;
}

/* Navigation */
.nav-link {
    display: inline-block;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin-top: 16px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

/* Country Selection */
.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}

.exchange-rate-info {
    text-align: center;
    padding: 16px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.exchange-rate-info p {
    margin-bottom: 4px;
    color: #4a5568;
    font-weight: 500;
}

.exchange-rate-info small {
    color: #718096;
    font-size: 0.85rem;
}

.country-btn {
    padding: 16px 12px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
    font-weight: 500;
    color: #4a5568;
}

.country-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.country-btn.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

/* Form Groups */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #4a5568;
}

.form-group input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Price Input */
.price-input {
    position: relative;
    display: flex;
    align-items: center;
}

.price-input input {
    padding-right: 60px;
}

.currency {
    position: absolute;
    right: 16px;
    color: #718096;
    font-weight: 500;
    pointer-events: none;
}

/* Calculate Button */
.calculate-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: 24px;
}

.calculate-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.4);
}

.calculate-btn:active {
    transform: translateY(0);
}

/* Results */
.results.hidden {
    display: none;
}

.result-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #e2e8f0;
}

.result-item.total {
    background: #667eea;
    color: white;
    border-left-color: #5a67d8;
    font-weight: 600;
}

.result-item .label {
    font-weight: 500;
}

.result-item .value {
    font-weight: 600;
    font-size: 1.1rem;
}

.tax-note {
    display: block;
    font-size: 0.8rem;
    color: #718096;
    font-weight: 400;
    margin-top: 4px;
}

/* Customs Limits */
.customs-limits {
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}

.limits-info {
    display: grid;
    gap: 12px;
    margin-bottom: 20px;
}

.limit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f0fff4;
    border-radius: 8px;
    border-left: 4px solid #68d391;
}

.customs-warning {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: #fed7d7;
    border: 1px solid #feb2b2;
    border-radius: 8px;
    color: #c53030;
}

.customs-warning.hidden {
    display: none;
}

.customs-note {
    margin: 16px 0;
    padding: 12px;
    background: #ebf8ff;
    border-radius: 6px;
    border-left: 3px solid #3182ce;
}

.customs-note small {
    color: #2c5282;
    line-height: 1.4;
}

.warning-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.warning-text {
    line-height: 1.4;
}

/* Compact Inputs */
.compact-inputs {
    padding: 20px;
}

.compact-inputs .input-group:last-of-type {
    margin-bottom: 0;
}

.input-group {
    margin-bottom: 20px;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2d3748;
    font-size: 0.9rem;
}

.country-grid.compact {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
}

.country-grid.compact .country-btn {
    padding: 12px 8px;
    font-size: 0.85rem;
}

.category-grid.compact {
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.category-grid.compact .category-btn {
    padding: 16px 12px;
    font-size: 0.9rem;
}

.category-grid.compact .category-btn small {
    display: none;
}

.travelers-group {
    margin-bottom: 16px;
}

.travelers-input {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
}

.traveler-btn {
    background: #f7fafc;
    border: none;
    padding: 12px 16px;
    font-size: 1.2rem;
    font-weight: 600;
    color: #4a5568;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 48px;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}

.traveler-btn:hover {
    background: #edf2f7;
    color: #2d3748;
}

.traveler-btn:active {
    background: #e2e8f0;
}

.traveler-btn:disabled {
    background: #f1f5f9;
    color: #94a3b8;
    cursor: not-allowed;
}

.traveler-btn:disabled:hover {
    background: #f1f5f9;
    color: #94a3b8;
}

.travelers-input input {
    flex: 1;
    border: none;
    padding: 12px 16px;
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    color: #2d3748;
    background: white;
}

.travelers-input input:focus {
    outline: none;
    background: #f7fafc;
}

.exchange-rate-compact {
    text-align: center;
    padding: 12px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 3px solid #667eea;
    color: #4a5568;
    font-size: 0.9rem;
    margin-top: 16px;
}

/* Category Selection */
.category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.category-btn {
    padding: 20px 16px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    background: white;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
}

.category-btn:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.2);
}

.category-btn.active {
    border-color: #667eea;
    background: #667eea;
    color: white;
    box-shadow: 0 4px 16px rgba(102, 126, 234, 0.3);
}

.category-btn small {
    display: block;
    margin-top: 8px;
    font-size: 0.85rem;
    opacity: 0.8;
}

.category-info {
    text-align: center;
    padding: 16px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    margin-top: 16px;
}

.category-info p {
    color: #4a5568;
    margin: 0;
}

/* Max Amount Display */
.max-amount-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 24px;
    border-radius: 16px;
    margin-bottom: 24px;
    text-align: center;
}

.max-amount-display.compact {
    padding: 20px;
    margin-bottom: 20px;
}

.max-amount-display.compact .primary-amount {
    margin-bottom: 16px;
}

.max-amount-display.compact .primary-amount .value {
    font-size: 2.2rem;
}

.max-amount-display.compact .secondary-amount .value {
    font-size: 1.2rem;
    opacity: 0.9;
}

.amount-in-chf {
    margin-bottom: 20px;
}

.amount-in-chf .value {
    font-size: 2.5rem;
    font-weight: 700;
    display: block;
    margin-top: 8px;
}

.amount-in-foreign .value {
    font-size: 1.8rem;
    font-weight: 600;
    display: block;
    margin-top: 8px;
}

.max-amount-display .label {
    font-size: 1rem;
    opacity: 0.9;
}

/* Calculation Breakdown */
.calculation-breakdown {
    background: #f7fafc;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 24px;
}

.quick-breakdown {
    background: #f7fafc;
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.quick-breakdown .breakdown-item {
    text-align: center;
    padding: 12px;
    background: white;
    border-radius: 6px;
    border: 1px solid #e2e8f0;
}

.quick-breakdown .breakdown-item .label {
    display: block;
    font-size: 0.8rem;
    color: #718096;
    margin-bottom: 4px;
}

.quick-breakdown .breakdown-item .value {
    font-size: 1.1rem;
    font-weight: 600;
    color: #2d3748;
}

.calculation-breakdown h3 {
    margin-bottom: 16px;
    color: #2d3748;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #e2e8f0;
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-item .label {
    font-weight: 500;
    color: #4a5568;
}

.breakdown-item .value {
    font-weight: 600;
    color: #2d3748;
}



/* Reference Grid */
.reference-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.reference-grid.compact {
    grid-template-columns: repeat(4, 1fr);
    gap: 8px;
    margin-bottom: 16px;
}

.ref-item {
    padding: 16px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    text-align: center;
}

.ref-item.compact {
    padding: 12px 8px;
    text-align: center;
}

.ref-item .country {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 4px;
}

.ref-item .rates {
    display: block;
    font-size: 0.8rem;
    color: #4a5568;
    font-weight: 500;
}

.compact-reference {
    padding: 20px;
}

.swiss-info.compact {
    text-align: center;
    padding: 12px;
    background: #f0fff4;
    border-radius: 6px;
    border-left: 3px solid #68d391;
    color: #4a5568;
    font-size: 0.9rem;
}

/* Country-specific tips */
.country-tips {
    display: grid;
    gap: 16px;
}

.tip-item {
    padding: 16px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.tip-item h3 {
    margin-bottom: 8px;
    color: #2d3748;
    font-size: 1.1rem;
}

.tip-item p {
    color: #4a5568;
    margin: 0;
    line-height: 1.5;
}

/* Countries Grid */
.countries-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.country-card {
    display: block;
    padding: 24px;
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    text-align: center;
}

.country-card:hover {
    border-color: #667eea;
    transform: translateY(-4px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

.country-flag {
    font-size: 3rem;
    margin-bottom: 16px;
}

.country-card h3 {
    color: #2d3748;
    margin-bottom: 12px;
    font-size: 1.4rem;
}

.country-description {
    color: #4a5568;
    margin-bottom: 20px;
    line-height: 1.5;
}

.country-rates {
    display: flex;
    justify-content: center;
    gap: 16px;
    margin-bottom: 16px;
}

.rate {
    background: #f7fafc;
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    color: #4a5568;
    font-weight: 500;
}

.country-currency {
    color: #667eea;
    font-weight: 600;
    font-size: 0.9rem;
}

/* How It Works */
.how-it-works {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.step {
    text-align: center;
    padding: 20px;
}

.step-number {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin: 0 auto 16px;
}

.step h3 {
    color: #2d3748;
    margin-bottom: 12px;
    font-size: 1.1rem;
}

.step p {
    color: #4a5568;
    line-height: 1.5;
    margin: 0;
}

/* Customs Info */
.customs-info {
    display: grid;
    gap: 20px;
}

.info-item {
    padding: 20px;
    background: #f7fafc;
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.info-item h3 {
    color: #2d3748;
    margin-bottom: 12px;
    font-size: 1.2rem;
}

.info-item p {
    color: #4a5568;
    line-height: 1.6;
    margin-bottom: 12px;
}

.info-item ul {
    margin: 0;
    padding-left: 20px;
}

.info-item li {
    color: #4a5568;
    margin-bottom: 6px;
    line-height: 1.5;
}

/* Details Button and Section */
.details-btn {
    background: #f7fafc;
    border: 2px solid #e2e8f0;
    color: #4a5568;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 16px;
    width: 100%;
}

.details-btn:hover {
    background: #edf2f7;
    border-color: #cbd5e0;
    color: #2d3748;
}

.details-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.details-section h3 {
    color: #2d3748;
    margin-bottom: 20px;
    font-size: 1.2rem;
}

.details-section h4 {
    color: #4a5568;
    margin-bottom: 12px;
    font-size: 1rem;
    font-weight: 600;
}

.tax-details, .tariff-details {
    margin-bottom: 24px;
}

.tax-table, .tariff-table {
    background: #f7fafc;
    border-radius: 8px;
    overflow: hidden;
}

.tax-row, .tariff-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
}

.tax-row:last-child, .tariff-row:last-child {
    border-bottom: none;
}

.tax-row .category, .tariff-row .category {
    color: #4a5568;
    font-weight: 500;
}

.tax-row .rate, .tariff-row .tariff {
    color: #2d3748;
    font-weight: 600;
    background: #edf2f7;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.85rem;
}

/* Limits Table */
.limits-table {
    background: #f7fafc;
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
}

.limit-row {
    display: grid;
    grid-template-columns: 1fr 1.5fr 1.5fr;
    gap: 12px;
    padding: 12px 16px;
    border-bottom: 1px solid #e2e8f0;
    align-items: center;
}

.limit-row:last-child {
    border-bottom: none;
}

.limit-row .category {
    color: #4a5568;
    font-weight: 500;
    font-size: 0.9rem;
}

.limit-row .free-limit {
    color: #2d3748;
    font-size: 0.85rem;
    line-height: 1.4;
}

.limit-row .surcharge {
    color: #e53e3e;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.4;
}

/* Important Notes */
.important-notes {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
}

.important-notes h4 {
    color: #c53030;
    margin-bottom: 12px;
    font-size: 1rem;
}

.important-notes ul {
    margin: 0;
    padding-left: 20px;
}

.important-notes li {
    color: #742a2a;
    margin-bottom: 8px;
    line-height: 1.5;
    font-size: 0.9rem;
}

/* Age Note */
.age-note {
    background: #fff5f5;
    border: 1px solid #fed7d7;
    border-radius: 8px;
    padding: 12px;
    margin-top: 16px;
    text-align: center;
}

.age-note p {
    color: #c53030;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 500;
}

.ref-item {
    padding: 16px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
    text-align: center;
}

.ref-item h3 {
    margin-bottom: 8px;
    color: #2d3748;
}

.ref-item p {
    color: #4a5568;
    font-size: 0.9rem;
    margin: 0;
}

/* Tax Rates */
.tax-rates {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.country-rates {
    padding: 16px;
    background: #f7fafc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.country-rates h3 {
    margin-bottom: 8px;
    color: #2d3748;
}

.country-rates p {
    color: #4a5568;
    font-size: 0.9rem;
}

.swiss-info {
    padding: 16px;
    background: #f0fff4;
    border-radius: 8px;
    border-left: 4px solid #68d391;
}

.swiss-info h3 {
    margin-bottom: 8px;
    color: #2d3748;
}

.swiss-info p {
    color: #4a5568;
    font-size: 0.9rem;
}

/* Footer */
footer {
    text-align: center;
    color: white;
    opacity: 0.8;
    margin-top: 40px;
    font-size: 0.9rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 16px;
    }
    
    header h1 {
        font-size: 2rem;
    }
    
    .card {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .country-grid,
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .country-grid.compact {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .category-grid.compact {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .tax-rates,
    .reference-grid {
        grid-template-columns: 1fr;
    }
    
    .reference-grid.compact {
        grid-template-columns: repeat(4, 1fr);
    }
    
    .quick-breakdown {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .result-item,
    .breakdown-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .limit-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .max-amount-display {
        padding: 20px;
    }
    
    .max-amount-display.compact {
        padding: 16px;
    }
    
    .amount-in-chf .value {
        font-size: 2rem;
    }
    
    .amount-in-foreign .value {
        font-size: 1.5rem;
    }
    
    .max-amount-display.compact .primary-amount .value {
        font-size: 1.8rem;
    }
    
    .max-amount-display.compact .secondary-amount .value {
        font-size: 1rem;
    }
    
    .travelers-input {
        flex-direction: row;
    }
    
    .traveler-btn {
        min-width: 44px;
        padding: 12px 12px;
    }
    
    .travelers-input input {
        font-size: 0.9rem;
        padding: 12px 12px;
    }
}

@media (max-width: 480px) {
    .country-grid {
        grid-template-columns: 1fr;
    }
    
    .country-grid.compact {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .category-grid.compact {
        grid-template-columns: 1fr;
    }
    
    .customs-warning {
        flex-direction: column;
        text-align: center;
        gap: 12px;
    }
    
    .compact-inputs {
        padding: 16px;
    }
    
    .travelers-input {
        flex-direction: row !important;
        gap: 8px !important;
        display: flex !important;
        align-items: center !important;
    }
    
    .traveler-btn {
        min-width: 44px !important;
        padding: 12px 8px !important;
        font-size: 1.2rem !important;
        flex-shrink: 0 !important;
    }
    
    .travelers-input input {
        flex: 1 !important;
        min-width: 0 !important;
        order: 2 !important;
    }
    
    .traveler-btn[data-action="decrease"] {
        order: 1 !important;
    }
    
    .traveler-btn[data-action="increase"] {
        order: 3 !important;
    }
    
    .countries-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .country-card {
        padding: 20px;
    }
    
    .how-it-works {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .step {
        padding: 16px;
    }
    
    .limit-row {
        grid-template-columns: 1fr;
        gap: 8px;
        text-align: center;
    }
    
    .limit-row .category {
        font-weight: 600;
        color: #2d3748;
    }
    
    /* Force horizontal layout for travelers on very small screens */
    .travelers-input {
        flex-direction: row !important;
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
    }
    
    .traveler-btn {
        min-width: 40px !important;
        padding: 10px 6px !important;
        font-size: 1.1rem !important;
        flex-shrink: 0 !important;
    }
    
    .travelers-input input {
        flex: 1 !important;
        min-width: 0 !important;
        padding: 10px 8px !important;
    }
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results:not(.hidden) {
    animation: fadeIn 0.5s ease-out;
}

/* General hidden class */
.hidden {
    display: none !important;
}

/* Focus states for accessibility */
button:focus,
input:focus,
select:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* Loading state */
.calculate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Force horizontal layout for travelers input on all screen sizes */
.travelers-input {
    display: flex !important;
    flex-direction: row !important;
    align-items: center !important;
    gap: 8px !important;
}

.traveler-btn {
    flex-shrink: 0 !important;
    min-width: 44px !important;
}

.travelers-input input {
    flex: 1 !important;
    min-width: 0 !important;
}

/* Side-by-side calculator layout */
.calculator-main {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    margin-bottom: 24px;
}

.calculator-inputs,
.calculator-results {
    display: flex;
    flex-direction: column;
}

.calculator-inputs .card {
    height: fit-content;
}

.calculator-results .card {
    height: fit-content;
    position: sticky;
    top: 24px;
    transition: all 0.2s ease-in-out;
}

.calculator-results .card.updating {
    background-color: #f8f9fa;
    border-color: #007bff;
    transform: scale(1.02);
}

/* Mobile responsive layout */
@media (max-width: 768px) {
    .calculator-main {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .calculator-results .card {
        position: static;
    }
    
    /* Mobile viewport optimization */
    .container {
        padding: 12px;
        max-width: 100vw;
    }
    
    header {
        margin-bottom: 16px;
    }
    
    header h1 {
        font-size: 1.8rem;
        margin-bottom: 6px;
    }
    
    header p {
        font-size: 1rem;
    }
    
    .card {
        padding: 16px;
        margin-bottom: 12px;
        border-radius: 12px;
    }
    
    .card h2 {
        font-size: 1.3rem;
        margin-bottom: 12px;
    }
    
    /* Compact input styling for mobile */
    .input-group {
        margin-bottom: 16px;
    }
    
    .input-group label {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }
    
    /* Category buttons more compact */
    .category-btn {
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    /* Results display more compact */
    .max-amount-display.compact {
        gap: 12px;
    }
    
    .primary-amount .value,
    .secondary-amount .value {
        font-size: 1.4rem;
    }
    
    .primary-amount .label,
    .secondary-amount .label {
        font-size: 0.8rem;
    }
    
    .quick-breakdown {
        gap: 12px;
    }
    
    .breakdown-item {
        font-size: 0.85rem;
    }
    
    /* Exchange rate more compact */
    .exchange-rate-compact {
        font-size: 0.85rem;
        padding: 8px 0;
    }
    
    /* Navigation more compact */
    nav {
        margin-top: 12px;
    }
    
    .nav-link {
        padding: 6px 12px;
        font-size: 0.85rem;
        margin: 0 4px 6px 0;
    }
    
    /* Details section mobile optimization */
    .details-btn {
        padding: 10px 16px;
        font-size: 0.9rem;
    }
    
    .details-section {
        padding: 12px 0;
    }
    
    .details-section h3 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .details-section h4 {
        font-size: 1rem;
        margin-bottom: 8px;
    }
    
    .tax-table, .limits-table {
        font-size: 0.8rem;
    }
    
    .tax-row, .limit-row {
        padding: 8px 0;
    }
    
    .important-notes ul {
        font-size: 0.85rem;
        padding-left: 16px;
    }
    
    .important-notes li {
        margin-bottom: 6px;
    }
    
    /* Ensure full viewport usage without overflow */
    html, body {
        overflow-x: hidden;
    }
    
    .container {
        min-height: 100vh;
        display: flex;
        flex-direction: column;
    }
    
    main {
        flex: 1;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    .container {
        padding: 8px;
    }
    
    header h1 {
        font-size: 1.6rem;
    }
    
    .card {
        padding: 12px;
        margin-bottom: 8px;
    }
    
    .card h2 {
        font-size: 1.2rem;
        margin-bottom: 8px;
    }
    
    .category-btn {
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    .primary-amount .value,
    .secondary-amount .value {
        font-size: 1.2rem;
    }
    
    .calculator-main {
        gap: 8px;
    }
}

/* Index page specific styles */
.calculator-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
}

.calculator-card h2 {
    color: white;
}

.calculator-features {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 16px 0;
}

.feature {
    background: rgba(255, 255, 255, 0.2);
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    backdrop-filter: blur(10px);
}

.primary-btn {
    display: inline-block;
    background: white;
    color: #667eea;
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    margin-top: 8px;
}

.primary-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.country-calculators {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 20px;
}

.country-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
    transition: all 0.2s ease;
}

.country-item:hover {
    background: #e9ecef;
    transform: translateX(2px);
}

.country-info {
    display: flex;
    align-items: center;
    gap: 16px;
}

.flag {
    font-size: 2rem;
    flex-shrink: 0;
}

.country-details h3 {
    margin: 0 0 4px 0;
    font-size: 1.1rem;
    color: #333;
    font-weight: 500;
}

.country-details p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
}

.country-btn {
    background: #2563eb !important;
    color: white !important;
    padding: 10px 20px !important;
    border-radius: 8px !important;
    text-decoration: none !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    transition: all 0.2s ease !important;
    flex-shrink: 0 !important;
    border: 2px solid #2563eb !important;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1) !important;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.2) !important;
    display: inline-block !important;
    cursor: pointer !important;
    line-height: 1.2 !important;
    vertical-align: middle !important;
}

/* Force button visibility and prevent inheritance issues */
.country-calculators .country-item .country-btn {
    background-color: #2563eb !important;
    color: white !important;
    border: 2px solid #2563eb !important;
}

.country-btn:hover {
    background: #1d4ed8 !important;
    border-color: #1e40af !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3) !important;
}

.info-card {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.info-item .icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 2px;
}

.info-item h4 {
    margin: 0 0 6px 0;
    font-size: 1rem;
    color: #333;
}

.info-item p {
    margin: 0;
    font-size: 0.9rem;
    color: #666;
    line-height: 1.4;
}

/* Mobile responsive for index page */
@media (max-width: 768px) {
    .country-item {
        flex-direction: row;
        align-items: center;
        gap: 12px;
        text-align: left;
        flex-wrap: wrap;
    }
    
    .country-info {
        flex: 1;
        min-width: 0;
    }
    
    .country-btn {
        flex-shrink: 0;
        padding: 10px 16px;
        font-size: 0.9rem;
        font-weight: 600;
        white-space: nowrap;
    }
    
    .info-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .calculator-features {
        justify-content: center;
    }
    
    .feature {
        font-size: 0.8rem;
        padding: 4px 10px;
    }
}

/* Extra small mobile devices - stack vertically when needed */
@media (max-width: 480px) {
    .country-item {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        gap: 16px;
    }
    
    .country-info {
        justify-content: center;
    }
    
    .country-btn {
        align-self: center;
        width: 100%;
        max-width: 200px;
    }
}

/* Ad placeholder styles */
.ad-placeholder {
    background: #f8f9fa;
    border: 2px dashed #dee2e6;
    text-align: center;
    padding: 16px;
}

.ad-placeholder h2 {
    color: #6c757d;
    margin-bottom: 8px;
    font-size: 1.1rem;
}

.ad-content p {
    font-size: 0.9rem;
    color: #6c757d;
    margin-bottom: 4px;
}

.ad-content small {
    color: #adb5bd;
    font-style: italic;
    font-size: 0.8rem;
}

/* Main calculator page styles */
.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 12px;
    margin: 16px 0;
}

.country-btn {
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    padding: 16px 12px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    text-align: center;
}

.country-btn:hover {
    border-color: #007bff;
    background: #e3f2fd;
}

.country-btn.active {
    border-color: #007bff;
    background: #007bff;
    color: white;
}

.exchange-rate-info {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-top: 16px;
    text-align: center;
}

.exchange-rate-info p {
    margin: 0 0 4px 0;
    font-weight: 500;
}

.exchange-rate-info small {
    color: #666;
    font-size: 0.85rem;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.form-group select,
.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.form-group select:focus,
.form-group input:focus {
    outline: none;
    border-color: #007bff;
}

.price-input {
    position: relative;
    display: flex;
    align-items: center;
}

.price-input input {
    padding-right: 60px;
}

.currency {
    position: absolute;
    right: 12px;
    color: #666;
    font-weight: 500;
    pointer-events: none;
}

.calculate-btn {
    width: 100%;
    background: #28a745;
    color: white;
    border: none;
    padding: 16px;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin: 24px 0;
}

.calculate-btn:hover {
    background: #218838;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.result-grid {
    display: grid;
    gap: 16px;
    margin-bottom: 24px;
}

.result-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #007bff;
}

.result-item.total {
    background: #e3f2fd;
    border-left-color: #28a745;
    font-weight: 600;
    font-size: 1.1rem;
}

.result-item .label {
    color: #333;
}

.result-item .value {
    font-weight: 600;
    color: #007bff;
}

.result-item.total .value {
    color: #28a745;
}

.tax-note {
    display: block;
    margin-top: 4px;
    font-size: 0.85rem;
    color: #666;
    font-weight: normal;
}

.customs-limits {
    background: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 8px;
    padding: 16px;
    margin-top: 20px;
}

.customs-limits h3 {
    margin: 0 0 16px 0;
    color: #856404;
}

.limits-info {
    display: grid;
    gap: 12px;
    margin-bottom: 16px;
}

.limit-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #ffeaa7;
}

.limit-item:last-child {
    border-bottom: none;
}

.limit-item .label {
    color: #856404;
    font-weight: 500;
}

.limit-item .value {
    color: #856404;
    font-weight: 600;
}

.customs-note {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 6px;
    padding: 12px;
    margin: 16px 0;
}

.customs-warning {
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 16px;
}

.warning-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.warning-text {
    color: #721c24;
    font-weight: 500;
}

.tax-rates {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 20px;
}

.country-rates {
    background: #f8f9fa;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.country-rates h3 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 1.1rem;
}

.country-rates p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.swiss-info {
    background: #e3f2fd;
    border: 1px solid #bbdefb;
    border-radius: 8px;
    padding: 16px;
    text-align: center;
}

.swiss-info h3 {
    margin: 0 0 8px 0;
    color: #1976d2;
}

.swiss-info p {
    margin: 0;
    color: #1976d2;
    font-weight: 500;
}

/* Mobile responsive for main calculator */
@media (max-width: 768px) {
    .country-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .country-btn {
        padding: 12px 8px;
        font-size: 0.85rem;
    }
    
    .tax-rates {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .result-item {
        flex-direction: column;
        align-items: stretch;
        gap: 8px;
        text-align: center;
    }
    
    .limit-item {
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        text-align: center;
    }
}
