/* BestMO Calculator Styles */
.bestmo-calculator {
    max-width: 800px;
    margin: 20px auto;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    line-height: 1.6;
}

.bestmo-header {
    background: linear-gradient(135deg, #ffffff 0%, #ffffff 100%);
    color: white;
    padding: 25px;
    text-align: center;
}

.bestmo-title {
    margin: 0 0 10px 0;
    font-size: 26px;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
    letter-spacing: 0.5px;
}

.bestmo-brand {
    font-size: 14px;
    opacity: 0.9;
}

.bestmo-calc-body {
    padding: 30px;
}

.bestmo-form {
    margin-bottom: 30px;
}

.bestmo-field {
    margin-bottom: 20px;
}

.bestmo-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 14px;
}

.bestmo-tooltip {
    display: inline-block;
    margin-left: 6px;
    color: #4299e1;
    cursor: help;
    font-weight: bold;
    position: relative;
}

.bestmo-tooltip:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: normal;
    width: 220px;
    z-index: 1000;
    text-align: center;
    line-height: 1.4;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    white-space: normal;
}

.bestmo-tooltip:hover::before {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #333;
    z-index: 1001;
}

.bestmo-input,
.bestmo-select {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
    background: white;
}

.bestmo-input:focus,
.bestmo-select:focus {
    outline: none;
    border-color: #4299e1;
    box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.1);
}

.bestmo-section {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border-left: 4px solid #2a5298;
}

.bestmo-section h4 {
    margin: 0 0 15px 0;
    color: #4299e1;
    font-size: 16px;
    font-weight: 600;
}

.bestmo-btn {
    width: 100%;
    background: linear-gradient(135deg, #4299e1 0%, #2a5298 100%);
    color: white;
    border: none;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.bestmo-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(42, 82, 152, 0.3);
}

.bestmo-btn:active {
    transform: translateY(0);
}

.bestmo-results {
    background: #f8f9fa;
    border-radius: 12px;
    padding: 25px;
    margin-top: 20px;
}

.bestmo-results h3 {
    margin: 0 0 20px 0;
    color: #4299e1;
    font-size: 22px;
    text-align: center;
    font-weight: 700;
}

.bestmo-hero-result {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    text-align: center;
    margin-bottom: 25px;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.3);
    position: relative;
}

.bestmo-hero-result::before {
    content: '★';
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 20px;
    opacity: 0.7;
}

.bestmo-hero-label {
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bestmo-hero-value {
    font-size: 32px;
    font-weight: 800;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
    line-height: 1.1;
}

.bestmo-hero-note {
    font-size: 12px;
    margin-top: 5px;
    opacity: 0.9;
    font-weight: 400;
}

.bestmo-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.bestmo-result-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.bestmo-result-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.bestmo-result-card.highlight {
    background: linear-gradient(135deg, #e8f5e8 0%, #d4edda 100%);
    border-color: #28a745;
    border-width: 2px;
}

.bestmo-result-label {
    font-size: 13px;
    color: #ffffff;
    margin-bottom: 8px;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.bestmo-result-value {
    font-size: 20px;
    font-weight: 700;
    color: #4299e1;
}

.bestmo-ratios {
    margin: 25px 0;
}

.bestmo-ratios h4 {
    margin: 0 0 15px 0;
    color: #4299e1;
    text-align: center;
    font-weight: 600;
}

.bestmo-ratio-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.bestmo-ratio-card {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.bestmo-ratio-card.pass {
    border-color: #28a745;
    background: linear-gradient(135deg, #f8fff9 0%, #e8f5e8 100%);
}

.bestmo-ratio-card.warning {
    border-color: #ffc107;
    background: linear-gradient(135deg, #fffef7 0%, #fff8dc 100%);
}

    border-color: #dc3545;
    background: linear-gradient(135deg, #fff8f8 0%, #ffe6e6 100%);
}

.bestmo-ratio-title {
    font-size: 14px;
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 8px;
}

.bestmo-ratio-value {
    font-size: 24px;
    font-weight: 700;
    color: #1e3c72;
    margin-bottom: 5px;
}

.bestmo-ratio-limit {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.bestmo-ratio-status {
    font-size: 11px;
    font-weight: 600;
    padding: 4px 8px;
    border-radius: 12px;
    display: inline-block;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.bestmo-ratio-status.pass {
    background: #d4edda;
    color: #155724;
}

.bestmo-ratio-status.warning {
    background: #fff3cd;
    color: #856404;
}

.bestmo-ratio-status.fail {
    background: #f8d7da;
    color: #721c24;
}

.bestmo-status {
    margin-top: 20px;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 16px;
    position: relative;
}

.bestmo-status.pass {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    color: #155724;
    border: 2px solid #28a745;
}

.bestmo-status.pass::before {
    content: '✓ ';
    font-size: 20px;
    font-weight: bold;
}

.bestmo-status.warning {
    background: linear-gradient(135deg, #fff3cd 0%, #ffeaa7 100%);
    color: #856404;
    border: 2px solid #ffc107;
}

.bestmo-status.warning::before {
    content: '⚠ ';
    font-size: 20px;
    font-weight: bold;
}

.bestmo-status.fail {
    background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
    color: #721c24;
    border: 2px solid #dc3545;
}

.bestmo-status.fail::before {
    content: '✗ ';
    font-size: 20px;
    font-weight: bold;
}

.bestmo-comparison {
    margin: 25px 0;
}

.bestmo-comparison h4 {
    margin: 0 0 15px 0;
    color: #1e3c72;
    text-align: center;
    font-weight: 600;
}

.bestmo-comparison-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.bestmo-comparison-item {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.bestmo-comparison-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.bestmo-comparison-label {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
    font-weight: 500;
}

.bestmo-comparison-value {
    font-size: 18px;
    font-weight: 700;
    color: #1e3c72;
}

.bestmo-stress-comparison {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.bestmo-stress-column {
    background: white;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #e0e0e0;
}

.bestmo-stress-column h4 {
    margin: 0 0 15px 0;
    color: #1e3c72;
    text-align: center;
    font-size: 16px;
    font-weight: 600;
}

.bestmo-stress-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.bestmo-stress-item:last-child {
    border-bottom: none;
}

.bestmo-stress-item span:first-child {
    color: #666;
    font-weight: 500;
}

.bestmo-stress-item span:last-child {
    color: #1e3c72;
    font-weight: 700;
}

.bestmo-stress-guidelines {
    background: linear-gradient(135deg, #e8f2ff 0%, #f0f8ff 100%);
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #2a5298;
    margin: 20px 0;
}

.bestmo-stress-guidelines h4 {
    margin: 0 0 10px 0;
    color: #1e3c72;
    font-weight: 600;
}

.bestmo-stress-guidelines p {
    margin: 5px 0;
    font-size: 14px;
    color: #555;
}

.bestmo-scenarios {
    margin: 25px 0;
}

.bestmo-scenarios h4 {
    margin: 0 0 15px 0;
    color: #1e3c72;
    text-align: center;
    font-weight: 600;
}

.bestmo-scenario-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
}

.bestmo-scenario-card {
    background: white;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.bestmo-scenario-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.bestmo-scenario-title {
    font-size: 13px;
    font-weight: 600;
    color: #1e3c72;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.bestmo-scenario-amount {
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.bestmo-scenario-details {
    font-size: 12px;
    color: #666;
    line-height: 1.4;
}

.bestmo-ltt-breakdown {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 1px solid #e0e0e0;
}

.bestmo-ltt-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.bestmo-ltt-item:last-child {
    border-bottom: none;
}

.bestmo-ltt-item span:first-child {
    color: #666;
    font-weight: 500;
}

.bestmo-ltt-item span:last-child {
    color: #1e3c72;
    font-weight: 700;
}

.bestmo-total-result {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(30, 60, 114, 0.3);
}

.bestmo-total-label {
    font-size: 14px;
    margin-bottom: 8px;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.bestmo-total-value {
    font-size: 28px;
    font-weight: 800;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.2);
}

.bestmo-detailed-results {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin: 20px 0;
    border: 1px solid #e0e0e0;
}

.bestmo-detail-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    font-size: 14px;
}

.bestmo-detail-item:last-child {
    border-bottom: none;
}

.bestmo-detail-item span:first-child {
    color: #666;
    font-weight: 500;
}

.bestmo-detail-item span:last-child {
    color: #1e3c72;
    font-weight: 700;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .bestmo-calculator {
        margin: 10px;
        border-radius: 8px;
    }
    
    .bestmo-calc-body {
        padding: 20px;
    }
    
    .bestmo-title {
        font-size: 22px;
    }
    
    .bestmo-result-grid {
        grid-template-columns: 1fr;
    }
    
    .bestmo-ratio-grid {
        grid-template-columns: 1fr;
    }
    
    .bestmo-comparison-grid {
        grid-template-columns: 1fr;
    }
    
    .bestmo-stress-comparison {
        grid-template-columns: 1fr;
    }
    
    .bestmo-scenario-grid {
        grid-template-columns: 1fr;
    }
    
    .bestmo-hero-value {
        font-size: 28px;
    }
    
    .bestmo-tooltip:hover::after {
        width: 180px;
        font-size: 11px;
    }
    
    .bestmo-input,
    .bestmo-select {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Loading Animation */
.bestmo-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #2a5298;
    border-radius: 50%;
    animation: bestmo-spin 1s linear infinite;
}

@keyframes bestmo-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}