/**
 * Salary Calculator Pro Styles
 * Version: 2.1.0
 */

/* Main Container */
.wscp-calculator-container {
    max-width: 1200px;
width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.wscp-calculator {
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 30px;
    transition: all 0.3s ease;
}

.wscp-calculator:hover {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.15);
}

.wscp-calculator h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 24px;
    text-align: center;
    font-weight: 600;
}

/* Language Switcher */
.wscp-language-switcher {
    display: flex;
    gap: 10px;
    margin-bottom: 25px;
    justify-content: flex-end;
    padding: 5px;
    background: #f8f9fa;
    border-radius: 8px;
}

.wscp-lang-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 8px 16px;
    border: 1px solid #dee2e6;
    background: white;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    color: #495057;
}

.wscp-lang-btn:hover:not(:disabled) {
    background: #e9ecef;
    border-color: #ced4da;
    transform: translateY(-1px);
}

.wscp-lang-btn.active {
    background: #007cba;
    color: white;
    border-color: #007cba;
}

.wscp-lang-btn.active:hover {
    background: #005a87;
}

.wscp-lang-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.wscp-flag {
    font-size: 16px;
    line-height: 1;
}

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

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

/* Input Fields */
.wscp-amount-input,
#wscp-country {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: white;
    color: #333;
}

.wscp-amount-input:focus,
#wscp-country:focus {
    outline: none;
    border-color: #007cba;
    box-shadow: 0 0 0 3px rgba(0, 124, 186, 0.1);
}

.wscp-amount-input.error,
#wscp-country.error {
    border-color: #dc3545;
    background-color: #fff8f8;
}

.wscp-amount-input.error:focus,
#wscp-country.error:focus {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}

/* Radio Buttons */
.wscp-radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
}

.wscp-radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: #495057;
    flex: 1;
}

.wscp-radio-label input[type="radio"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #007cba;
}

.wscp-radio-label span {
    line-height: 1.4;
}

/* Submit Button */
.wscp-submit-btn {
    width: 100%;
    padding: 15px 20px;
    background: #007cba;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.wscp-submit-btn:hover:not(:disabled) {
    background: #005a87;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 124, 186, 0.3);
}

.wscp-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.wscp-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    background: #6c757d;
}

.wscp-btn-loader {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

/* Results Section */
.wscp-results {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    animation: fadeIn 0.5s ease;
}

.wscp-results h4 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    text-align: center;
}

.wscp-result-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin-bottom: 25px;
}

.wscp-result-item {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 15px;
    border-radius: 10px;
    text-align: center;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
}

.wscp-result-item:hover {
    transform: translateY(-5px);
}

.wscp-result-item:nth-child(2) {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
}

.wscp-result-item:nth-child(3) {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
}

.wscp-result-item:nth-child(4) {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
}

.wscp-result-item:nth-child(5) {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
}

.wscp-result-label {
    display: block;
    color: rgba(255, 255, 255, 0.9);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 8px;
}

.wscp-result-value {
    display: block;
    color: white;
    font-size: 20px;
    font-weight: 700;
    word-break: break-word;
}

/* Chart Container */
.wscp-chart-container {
    position: relative;
    height: 250px;
    margin-top: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

/* Loading Spinner */
.wscp-loading {
    text-align: center;
    padding: 30px;
}

.wscp-spinner {
    display: inline-block;
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #007cba;
    border-right: 5px solid #007cba;
    border-radius: 50%;
    animation: spin 1s ease-in-out infinite;
    margin-bottom: 15px;
}

.wscp-loading p {
    color: #6c757d;
    font-size: 14px;
    margin: 0;
}

/* Error and Success Messages */
.wscp-error {
    background: #f8d7da;
    color: #721c24;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
    border: 1px solid #f5c6cb;
    animation: slideDown 0.3s ease;
}

.wscp-success {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-top: 20px;
    text-align: center;
    border: 1px solid #c3e6cb;
    animation: slideDown 0.3s ease;
}

/* Validation Messages */
.wscp-validation-message {
    color: #dc3545;
    font-size: 12px;
    margin-top: 5px;
    padding: 8px 12px;
    background: #fff8f8;
    border-radius: 6px;
    border: 1px solid #ffd7d7;
    display: none;
    animation: slideDown 0.3s ease;
}

/* Animations */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .wscp-calculator {
        padding: 20px;
    }
    
    .wscp-calculator h3 {
        font-size: 20px;
    }
    
    .wscp-language-switcher {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    .wscp-lang-btn {
        flex: 1;
        justify-content: center;
        padding: 8px 12px;
        font-size: 13px;
    }
    
    .wscp-radio-group {
        flex-direction: column;
        gap: 10px;
    }
    
    .wscp-radio-label {
        width: 100%;
    }
    
    .wscp-result-grid {
        grid-template-columns: 1fr;
    }
    
    .wscp-result-item {
        padding: 15px;
    }
    
    .wscp-result-value {
        font-size: 18px;
    }
    
    .wscp-chart-container {
        height: 200px;
    }
}

/* Small mobile devices */
@media (max-width: 480px) {
    .wscp-calculator {
        padding: 15px;
    }
    
    .wscp-lang-btn {
        font-size: 12px;
        padding: 6px 8px;
    }
    
    .wscp-amount-input,
    #wscp-country {
        padding: 10px;
        font-size: 14px;
    }
    
    .wscp-submit-btn {
        padding: 12px;
        font-size: 14px;
    }
    
    .wscp-result-label {
        font-size: 12px;
    }
    
    .wscp-result-value {
        font-size: 16px;
    }
}

/* Print styles */
@media print {
    .wscp-language-switcher,
    .wscp-submit-btn,
    .wscp-loading {
        display: none !important;
    }
    
    .wscp-calculator {
        box-shadow: none;
        padding: 0;
    }
    
    .wscp-result-item {
        break-inside: avoid;
        background: #f8f9fa !important;
        color: #333 !important;
        border: 1px solid #dee2e6;
    }
    
    .wscp-result-label,
    .wscp-result-value {
        color: #333 !important;
    }
}

/* RTL Support */
.rtl .wscp-language-switcher {
    justify-content: flex-start;
}

.rtl .wscp-radio-label {
    flex-direction: row-reverse;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .wscp-calculator {
        background: #2d2d2d;
        color: #e0e0e0;
    }
    
    .wscp-calculator h3 {
        color: #e0e0e0;
    }
    
    .wscp-language-switcher {
        background: #3d3d3d;
    }
    
    .wscp-lang-btn {
        background: #4d4d4d;
        border-color: #5d5d5d;
        color: #e0e0e0;
    }
    
    .wscp-amount-input,
    #wscp-country {
        background: #3d3d3d;
        border-color: #5d5d5d;
        color: #e0e0e0;
    }
    
    .wscp-radio-group {
        background: #3d3d3d;
    }
    
    .wscp-radio-label {
        color: #e0e0e0;
    }
}