/* Norway ENK Tax Calculator v8 - Multilingual Edition
 * Base styles for modern, responsive tax calculation interface
 * Supports 4 languages: RU, UA, NO, EN
 */

/* Base styles and reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Main container */
.container {
    max-width: 90%;
    margin: 0 auto;
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.1);
    overflow: hidden;
}

/* Header section with language selector */
.header {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 30px;
    text-align: center;
}

.header-content {
    max-width: 90%;
    margin: 0 auto;
}

/* Language selector styles - buttons in a row */
.language-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.lang-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 8px 12px;
    font-size: 0.9em;
    cursor: pointer;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
    min-width: 100px;
}

.lang-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
    transform: translateY(-2px);
}

.lang-btn.active {
    background: rgba(255, 255, 255, 0.25);
    border-color: rgba(255, 255, 255, 0.6);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.lang-btn:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.3);
}

.header h1 {
    font-size: 2.2em;
    margin-bottom: 10px;
}

.header p {
    opacity: 0.9;
    font-size: 1.1em;
}

/* Form styles */
.form-container {
    padding: 40px;
}

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

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
    font-size: 1.1em;
}

/* Form inputs and selects */
select, input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 1.1em;
    transition: all 0.3s ease;
    background: white;
}

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

/* Currency input fields */
.currency-inputs {
    display: none;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 15px;
}

.currency-inputs.show {
    display: grid;
}

/* Main calculation button */
.btn {
    width: 100%;
    padding: 18px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 1.2em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 20px;
}

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

/* Radio button group styles */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.radio-option {
    position: relative;
}

.radio-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Custom radio button styling */
.radio-label {
    display: block;
    padding: 20px;
    background: #f8f9ff;
    border: 2px solid #e1e8ff;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    padding-left: 55px;
}

.radio-label::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    border: 2px solid #667eea;
    border-radius: 50%;
    background: white;
    transition: all 0.3s ease;
}

.radio-label::after {
    content: '';
    position: absolute;
    left: 26px;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #667eea;
    opacity: 0;
    transition: all 0.3s ease;
}

/* Selected radio button states */
.radio-option input[type="radio"]:checked + .radio-label {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-color: #667eea;
}

.radio-option input[type="radio"]:checked + .radio-label::before {
    background: white;
    border-color: white;
}

.radio-option input[type="radio"]:checked + .radio-label::after {
    opacity: 1;
    background: #667eea;
}

.radio-description {
    display: block;
    font-size: 0.9em;
    margin-top: 5px;
    opacity: 0.8;
}

/* Results section */
.results {
    display: none;
    margin-top: 40px;
    padding: 30px;
    background: linear-gradient(135deg, #f8f9ff 0%, #e8f0ff 100%);
    border-radius: 15px;
    border: 2px solid #e1e8ff;
}

.results.show {
    display: block;
}

/* Main result display */
.result-main {
    text-align: center;
    margin-bottom: 30px;
    padding: 25px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.result-main h3 {
    color: #1e3c72;
    font-size: 1.4em;
    margin-bottom: 10px;
}

.result-value {
    font-size: 2.5em;
    font-weight: bold;
    color: #2a5298;
    margin: 15px 0;
}

/* Period breakdown cards */
.period-breakdown {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 30px;
}

.period-card {
    background: white;
    padding: 20px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
    text-align: center;
}

.period-card h4 {
    color: #333;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.period-card .value {
    font-size: 1.8em;
    font-weight: bold;
    color: #667eea;
}

/* Tax breakdown section */
.tax-breakdown {
    background: white;
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.1);
}

.tax-breakdown h4 {
    color: #1e3c72;
    margin-bottom: 20px;
    font-size: 1.3em;
    text-align: center;
}

/* Individual tax items */
.tax-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #f0f0f0;
}

.tax-item:last-child {
    border-bottom: none;
    font-weight: bold;
    font-size: 1.1em;
    color: #1e3c72;
    border-top: 2px solid #e1e8ff;
    padding-top: 15px;
    margin-top: 10px;
}

.tax-label {
    font-weight: 500;
}

.tax-value {
    font-weight: 600;
    color: #2a5298;
}

/* Links to skatteetaten.no for tax types */
.tax-label a {
    color: #667eea;
    text-decoration: none;
    border-bottom: 1px dotted #667eea;
    transition: all 0.3s ease;
}

.tax-label a:hover {
    color: #2a5298;
    border-bottom-style: solid;
}

/* Stepped tax details */
.stepped-tax-details {
    margin-top: 15px;
    padding: 15px;
    background: #f8f9ff;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.stepped-item {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    font-size: 0.95em;
    color: #666;
}

/* Summary section styles */
.summary-section {
    margin-top: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    border-radius: 15px;
}

.summary-section h4 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 1.4em;
}

.summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}

.summary-item {
    background: rgba(255, 255, 255, 0.1);
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    backdrop-filter: blur(10px);
}

.summary-item .label {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 8px;
}

.summary-item .value {
    font-size: 1.3em;
    font-weight: bold;
}

.summary-item.highlight {
    background: rgba(255, 255, 255, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

/* Dual currency display */
.dual-currency {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.primary-currency {
    font-size: 1.3em;
    font-weight: bold;
}

.secondary-currency {
    font-size: 1em;
    opacity: 0.8;
}

/* Responsive design for mobile devices */
@media (max-width: 768px) {
    .form-row, .period-breakdown {
        grid-template-columns: 1fr;
    }
    
    .currency-inputs {
        grid-template-columns: 1fr;
    }
    
    .header h1 {
        font-size: 1.8em;
    }
    
    .form-container {
        padding: 25px;
    }
    
    /* Mobile language selector */
    .language-selector {
        gap: 8px;
        margin-bottom: 15px;
    }
    
    .lang-btn {
        font-size: 0.8em;
        padding: 6px 8px;
        min-width: 80px;
    }
}