/* Cloud Migration Estimator - Frontend Styles */

.cme-calculator-wrapper {
    max-width: 1200px;
    margin: 40px auto;
    padding: 0 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

.cme-calculator-container {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

/* Header */
.cme-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 50px 40px;
    text-align: center;
}

.cme-header h2 {
    margin: 0 0 10px 0;
    font-size: 36px;
    font-weight: 700;
}

.cme-subtitle {
    margin: 0;
    font-size: 18px;
    opacity: 0.95;
}

/* Form Section */
.cme-form-section {
    padding: 40px;
    background: #f8f9fa;
}

.cme-input-group {
    margin-bottom: 25px;
}

.cme-input-group label {
    display: block;
    margin-bottom: 8px;
}

.cme-label-text {
    display: block;
    font-weight: 600;
    font-size: 16px;
    color: #333;
    margin-bottom: 4px;
}

.cme-label-help {
    display: block;
    font-size: 14px;
    color: #666;
}

.cme-input-group input {
    width: 100%;
    padding: 14px 18px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

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

.cme-calculate-btn {
    width: 100%;
    padding: 16px 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 18px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

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

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

/* Results Section */
.cme-results-section {
    padding: 40px;
}

.cme-results-header h3 {
    margin: 0 0 30px 0;
    font-size: 28px;
    color: #333;
    text-align: center;
}

/* Cost Cards */
.cme-cost-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.cme-cost-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.cme-cost-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.cme-card-xaccel {
    border-color: #28a745;
    background: linear-gradient(135deg, #f0fff4 0%, #ffffff 100%);
}

.cme-card-aws {
    border-color: #ff9900;
}

.cme-card-azure {
    border-color: #0078d4;
}

.cme-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.cme-card-header h4 {
    margin: 0;
    font-size: 20px;
    color: #333;
}

.cme-badge {
    background: #28a745;
    color: white;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.cme-card-body {
    text-align: center;
    padding: 20px 0;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 20px;
}

.cme-cost-amount {
    font-size: 42px;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.cme-cost-period {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

.cme-cost-yearly {
    font-size: 16px;
    color: #667eea;
    font-weight: 600;
}

.cme-card-breakdown {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cme-breakdown-item {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
    color: #666;
}

.cme-breakdown-item span:last-child {
    font-weight: 600;
    color: #333;
}

/* Savings Section */
.cme-savings-section {
    background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
    padding: 40px;
    border-radius: 12px;
    margin-bottom: 40px;
}

.cme-savings-section h3 {
    margin: 0 0 30px 0;
    font-size: 28px;
    color: #155724;
    text-align: center;
}

.cme-savings-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
}

.cme-savings-card {
    background: white;
    padding: 30px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.cme-savings-vs {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.cme-savings-amount {
    font-size: 48px;
    font-weight: 700;
    color: #28a745;
    margin-bottom: 5px;
}

.cme-savings-period {
    font-size: 14px;
    color: #666;
    margin-bottom: 15px;
}

.cme-savings-percent {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 15px;
}

.cme-savings-yearly {
    font-size: 16px;
    color: #155724;
    font-weight: 600;
}

.cme-savings-yearly span {
    color: #28a745;
}

/* Chart Section */
.cme-chart-section {
    margin-bottom: 40px;
}

.cme-chart-section h3 {
    margin: 0 0 30px 0;
    font-size: 24px;
    color: #333;
    text-align: center;
}

#cme-comparison-chart {
    max-height: 400px;
}

/* Actions Section */
.cme-actions-section {
    display: flex;
    gap: 15px;
    justify-content: center;
    flex-wrap: wrap;
}

.cme-action-btn {
    padding: 14px 28px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cme-btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.cme-btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.cme-action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.15);
}

/* Modal */
.cme-modal {
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
}

.cme-modal-content {
    background-color: white;
    padding: 40px;
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.cme-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    transition: color 0.3s ease;
}

.cme-modal-close:hover {
    color: #333;
}

.cme-modal-content h3 {
    margin: 0 0 25px 0;
    font-size: 24px;
    color: #333;
}

/* Responsive Design */
@media (max-width: 768px) {
    .cme-header {
        padding: 30px 20px;
    }
    
    .cme-header h2 {
        font-size: 28px;
    }
    
    .cme-subtitle {
        font-size: 16px;
    }
    
    .cme-form-section,
    .cme-results-section {
        padding: 25px 20px;
    }
    
    .cme-cost-cards {
        grid-template-columns: 1fr;
    }
    
    .cme-cost-amount {
        font-size: 36px;
    }
    
    .cme-savings-amount {
        font-size: 38px;
    }
    
    .cme-actions-section {
        flex-direction: column;
    }
    
    .cme-action-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Loading State */
.cme-loading {
    opacity: 0.6;
    pointer-events: none;
}

.cme-calculate-btn.loading::after {
    content: '';
    width: 16px;
    height: 16px;
    border: 2px solid white;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}