/* Paisowala Brokerage Calculator Styles */
.paisowala-brokerage-calc {
    max-width: 800px;
    margin: 20px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.calc-header {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    padding: 24px 30px;
    text-align: center;
}

.calc-header h3 {
    margin: 0 0 8px 0;
    font-size: 26px;
    font-weight: 700;
    letter-spacing: -0.025em;
}

.calc-header p {
    margin: 0;
    opacity: 0.95;
    font-size: 15px;
    font-weight: 400;
}

.calc-form {
    padding: 30px;
    background: #f9fafb;
}

.form-section {
    margin-bottom: 24px;
}

.broker-selection, .plan-selection {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
}

.broker-select, .plan-select, .form-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    background: white;
    transition: all 0.2s ease;
    box-sizing: border-box;
    color: #1f2937;
}

.broker-select:focus, .plan-select:focus, .form-input:focus {
    outline: none;
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.1);
}

.trade-type-tabs {
    display: flex;
    gap: 4px;
    background: white;
    border-radius: 10px;
    padding: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.trade-tab {
    flex: 1;
    padding: 10px 8px;
    border: none;
    background: transparent;
    border-radius: 6px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #6b7280;
    font-size: 14px;
}

.trade-tab.active {
    background: #4f46e5;
    color: white;
    box-shadow: 0 1px 3px rgba(79, 70, 229, 0.3);
}

.trade-tab:hover:not(.active) {
    background: #f3f4f6;
    color: #374151;
}

.input-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    border: 1px solid #e5e7eb;
}

.price-inputs {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.price-group {
    position: relative;
}

.price-label {
    display: block;
    margin-bottom: 10px;
}

.price-type {
    display: block;
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 2px;
}

.price-desc {
    display: block;
    font-size: 12px;
    color: #6b7280;
    font-weight: 400;
}

.buy-label .price-type {
    color: #059669;
}

.sell-label .price-type {
    color: #dc2626;
}

.price-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.currency {
    position: absolute;
    left: 16px;
    font-weight: 600;
    color: #6b7280;
    z-index: 1;
}

.price-input {
    width: 100%;
    padding: 14px 40px 14px 40px;
    border: 2px solid #d1d5db;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    background: white;
    transition: all 0.2s ease;
    color: #1f2937;
    
    /* Remove spinners completely */
    -webkit-appearance: textfield;
    -moz-appearance: textfield;
    appearance: textfield;
}

/* Remove spinner arrows for all browsers */
.price-input::-webkit-outer-spin-button,
.price-input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
    display: none;
}

.price-input[type=number] {
    -moz-appearance: textfield;
}

.buy-input:focus {
    border-color: #059669;
    box-shadow: 0 0 0 3px rgba(5, 150, 105, 0.1);
    outline: none;
}

.sell-input:focus {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
    outline: none;
}

.quantity-exchange {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    margin-bottom: 20px;
}

.calculate-section {
    text-align: center;
}

.calculate-btn {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 100%);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(79, 70, 229, 0.3);
}

.calculate-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.4);
}

.calculate-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.calc-results {
    padding: 30px;
    background: white;
}

.loading-indicator {
    text-align: center;
    padding: 20px;
    color: #6b7280;
}

.metrics-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.metric-card {
    background: white;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    border-left: 4px solid;
    border: 1px solid #e5e7eb;
}

.profit-loss {
    border-left-color: #0ea5e9;
}

.charges {
    border-left-color: #f59e0b;
}

.breakeven {
    border-left-color: #8b5cf6;
}

.metric-header {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 500;
}

.metric-value {
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
}

.metric-value.profit {
    color: #059669 !important;
}

.metric-value.loss {
    color: #dc2626 !important;
}

.charges-value {
    color: #f59e0b !important;
}

.breakeven-value {
    color: #8b5cf6 !important;
}

.breakdown-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.breakdown-section h4 {
    margin: 0 0 20px 0;
    color: #1f2937;
    font-size: 18px;
    font-weight: 600;
}

.charges-grid {
    display: grid;
    gap: 12px;
}

.charge-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    border-left: 4px solid #e5e7eb;
}

.broker-charge {
    border-left-color: #059669;
    background: #f0fdf4;
}

.govt-charge {
    border-left-color: #dc2626;
    background: #fef2f2;
}

.exchange-charge {
    border-left-color: #2563eb;
    background: #eff6ff;
}

.charge-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.charge-destination {
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.charge-item.total-charge {
    background: #4f46e5;
    color: white;
    border-color: #4f46e5;
    font-weight: 600;
    margin-top: 8px;
}

.charge-label {
    color: #374151;
    font-weight: 500;
    font-size: 14px;
}

.total-charge .charge-label,
.total-charge .charge-destination {
    color: white;
}

.charge-amount {
    font-weight: 600;
    color: #1f2937;
    font-size: 14px;
}

.total-amount {
    color: white;
    font-size: 16px;
}

.breakeven-section {
    background: white;
    border-radius: 12px;
    padding: 24px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.08);
    border: 1px solid #e5e7eb;
}

.breakeven-section h4 {
    margin: 0 0 20px 0;
    color: #1f2937;
    font-size: 18px;
    font-weight: 600;
}

.breakeven-info {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.breakeven-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: #f3f4f6;
    border-radius: 8px;
    border-left: 4px solid #8b5cf6;
}

.breakeven-text {
    color: #374151;
    font-size: 14px;
    font-weight: 500;
}

.breakeven-price {
    font-weight: 700;
    font-size: 16px;
    color: #8b5cf6;
}

.calc-error {
    background: #fef2f2;
    color: #dc2626;
    padding: 16px;
    border-radius: 8px;
    margin: 20px 30px;
    text-align: center;
    border: 1px solid #fecaca;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .paisowala-brokerage-calc {
        margin: 10px;
        border-radius: 8px;
    }
    
    .calc-header {
        padding: 20px;
    }
    
    .calc-form, .calc-results {
        padding: 20px;
    }
    
    .price-inputs {
        grid-template-columns: 1fr;
    }
    
    .quantity-exchange {
        grid-template-columns: 1fr;
    }
    
    .metrics-cards {
        grid-template-columns: 1fr;
    }
    
    .breakeven-item {
        flex-direction: column;
        text-align: center;
        gap: 8px;
    }
    
    .trade-type-tabs {
        flex-wrap: wrap;
    }
    
    .trade-tab {
        min-width: calc(50% - 2px);
    }
}