/**
 * Salar Module Styles
 * Page-specific styles for the salary calculator
 */


/* ============================================
   BODY & LAYOUT OVERRIDES
   ============================================ */

body {
    line-height: 1.4;
    padding: 10px;
}

/* ============================================
   HEADER
   ============================================ */

header {
    display: flex;
    flex-direction: column;
    margin-bottom: 15px;
    padding-top: 10px;
    gap: 8px;
}

.header-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

h1 {
    margin: 0;
    flex-shrink: 0;
}

/* ============================================
   LANGUAGE SWITCHER
   ============================================ */

.lang-switcher {
    display: flex;
    align-items: center;
    gap: 2px;
    flex-wrap: wrap;
    justify-content: flex-start;
}

.lang-switcher a {
    color: var(--accent);
    text-decoration: none;
    padding: 5px 6px;
    font-size: 0.85rem;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 3px;
}

.lang-switcher a:hover {
    text-decoration: underline;
}

.lang-switcher a.active {
    color: var(--text-secondary);
    font-weight: bold;
}

.lang-switcher .flag {
    font-size: 1.1rem;
    line-height: 1;
}

.lang-switcher .separator {
    color: var(--text-secondary);
    margin: 0;
}

/* ============================================
   FORM CARD
   ============================================ */

.form-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 15px;
}

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

.form-group {
    margin-bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group.half-width {
    grid-column: span 1;
}

/* ============================================
   FORM ELEMENTS
   ============================================ */

label {
    display: block;
    margin-bottom: 4px;
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 0.7rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.form-group label {
    font-weight: 400;
    margin-bottom: 4px;
    color: var(--text-secondary);
    font-size: 0.7rem;
}

select,
input[type="number"] {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.85rem;
    cursor: pointer;
    box-sizing: border-box;
}

input[type="number"] {
    cursor: text;
}

select:hover,
input[type="number"]:hover {
    border-color: var(--border-color);
}

select:focus,
input:focus {
    outline: none;
    border-color: var(--accent);
}

/* ============================================
   CHECKBOX / TOGGLE SWITCH
   ============================================ */

.checkbox-group {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    padding: 0;
    margin-top: 20px;
    box-sizing: border-box;
}

/* Hide default checkbox */
input[type="checkbox"] {
    display: none;
}

/* Toggle switch */
.toggle-switch {
    position: relative;
    width: 44px;
    height: 24px;
    background: var(--bg-hover);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.toggle-switch::after {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    width: 18px;
    height: 18px;
    background: var(--text-secondary);
    border-radius: 50%;
    transition: all 0.3s ease;
}

input[type="checkbox"]:checked + .toggle-switch {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
}

input[type="checkbox"]:checked + .toggle-switch::after {
    left: 22px;
    background: #ffffff;
}

.toggle-switch:hover {
    border-color: var(--accent);
}

.checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
    font-size: 0.85rem;
    display: inline !important;
    color: var(--text-primary);
    white-space: normal;
    user-select: none;
}

/* ============================================
   BUTTONS
   ============================================ */

.button-group {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

button {
    flex: 1;
    padding: 12px 24px;
    font-size: 0.9rem;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-secondary-hover) 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(15, 157, 88, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15, 157, 88, 0.4);
    background: linear-gradient(135deg, var(--accent-secondary-hover) 0%, var(--accent-secondary) 100%);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(15, 157, 88, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--accent);
}

.btn-secondary:active {
    background: var(--bg-card);
}

/* ============================================
   ERROR MESSAGE
   ============================================ */

.error {
    background: var(--color-error);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

/* ============================================
   RESULT BOX
   ============================================ */

.result-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 15px;
    margin-bottom: 15px;
}

.result-box h3 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--accent);
    font-size: 1.1rem;
    margin-bottom: 10px;
}

.result-content {
    display: grid;
    grid-template-columns: 1fr 1px 1fr 1px 1fr;
    gap: 15px;
    align-items: start;
}

.result-divider {
    background: var(--border-color);
    height: 100%;
    min-height: 120px;
}

.result-info {
    padding: 0;
}

.info-item {
    margin-bottom: 12px;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-bottom: 3px;
    font-weight: 500;
}

.info-value {
    display: block;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-weight: 600;
}

/* ============================================
   SALARY RANGES
   ============================================ */

.salary-ranges {
    padding: 0;
}

.salary-item {
    margin-bottom: 12px;
}

.salary-item:last-child {
    margin-bottom: 0;
}

.salary-label {
    display: block;
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-bottom: 3px;
    font-weight: 500;
}

.salary-value {
    display: block;
    color: var(--accent);
    font-size: 0.85rem;
    font-weight: 600;
}

.salary-item.ai-native-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.salary-item.ai-native-item .salary-label {
    display: inline;
    margin-bottom: 0;
}

.salary-item.ai-native-item .salary-value {
    display: inline;
}

/* ============================================
   SOURCES
   ============================================ */

.sources {
    padding-top: 10px;
    color: var(--text-secondary);
    font-size: 0.7rem;
    line-height: 1.3;
}

.sources small {
    display: block;
    margin-bottom: 3px;
}

/* ============================================
   INFO BOX
   ============================================ */

.info-box {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 12px;
    margin-bottom: 10px;
}

.info-box h3 {
    color: var(--accent);
    font-size: 0.9rem;
    margin-bottom: 6px;
}

.info-box p {
    color: var(--text-secondary);
    line-height: 1.3;
    margin-bottom: 6px;
    font-size: 0.75rem;
}

.info-box a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.info-box a:hover {
    text-decoration: underline;
}

/* ============================================
   AI BADGE
   ============================================ */

.ai-badge {
    display: inline-block;
    background: var(--accent-secondary);
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: 600;
    margin-left: 6px;
}

/* ============================================
   FEEDBACK SECTION
   ============================================ */

.feedback-section {
    padding: 0;
}

.feedback-section h4 {
    color: var(--accent);
    font-size: 0.8rem;
    margin-bottom: 8px;
    font-weight: 600;
}

.feedback-buttons {
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.btn-feedback {
    flex: 1;
    padding: 4px 8px;
    font-size: 0.75rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.2s;
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-feedback:hover {
    background: var(--border-color);
}

.feedback-section textarea {
    width: 100%;
    padding: 6px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-primary);
    font-size: 0.75rem;
    font-family: inherit;
    resize: vertical;
    min-height: 50px;
}

.feedback-section textarea:focus {
    outline: none;
    border-color: var(--accent);
}

.feedback-success {
    background: var(--accent-secondary);
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    margin-bottom: 12px;
    font-size: 0.85rem;
}

/* ============================================
   SOCIAL BUTTONS
   ============================================ */

.social-buttons {
    display: flex;
    gap: 6px;
    align-items: center;
}

.btn-social {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    width: 28px;
    height: 28px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-hover);
    color: var(--text-primary);
}

.btn-social svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.btn-social:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-twitter:hover {
    background: #1da1f2;
    border-color: #1da1f2;
    color: white;
}

.btn-linkedin:hover {
    background: #0077b5;
    border-color: #0077b5;
    color: white;
}

.btn-facebook:hover {
    background: #1877f2;
    border-color: #1877f2;
    color: white;
}

.btn-email:hover {
    background: #ea4335;
    border-color: #ea4335;
    color: white;
}

.btn-whatsapp:hover {
    background: #25d366;
    border-color: #25d366;
    color: white;
}

.btn-reddit:hover {
    background: #ff4500;
    border-color: #ff4500;
    color: white;
}

.btn-telegram:hover {
    background: #0088cc;
    border-color: #0088cc;
    color: white;
}

.btn-copy:hover {
    background: var(--accent-secondary);
    border-color: var(--accent-secondary);
    color: white;
}

/* ============================================
   CAREER PROGRESSION CHART
   ============================================ */

.info-box-content {
    display: grid;
    grid-template-columns: 1fr 1px 1fr;
    gap: 24px;
    align-items: start;
}

.chart-section {
    min-height: 150px;
}

.chart-header {
    display: flex;
    align-items: center;
    gap: 4px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.chart-section h4 {
    font-size: 0.8rem;
    margin: 0;
    color: var(--text-primary);
    font-weight: 600;
}

.info-text-section h4 {
    font-size: 0.85rem;
    margin-bottom: 16px;
    color: var(--text-primary);
    font-weight: 600;
}

.chart-container {
    position: relative;
    height: 150px;
    margin: 0;
    padding: 0;
    background: transparent;
    border-radius: 0;
}

.chart-toggle {
    display: flex;
    gap: 3px;
}

.chart-toggle button {
    padding: 2px 8px;
    border: 1px solid var(--border-color);
    border-radius: 3px;
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 0.55rem;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.chart-toggle button.active {
    background: var(--accent-secondary);
    color: white;
    border-color: var(--accent-secondary);
}

.chart-toggle button:hover {
    border-color: var(--accent);
}

.info-divider {
    width: 1px;
    background: var(--border-color);
    height: 100%;
}

.info-text-section p {
    margin: 0;
}

.info-text-section {
    display: flex;
    flex-direction: column;
    height: 100%;
}

/* ============================================
   AFFILIATE BANNER
   ============================================ */

.affiliate-banner-inline {
    margin-top: auto;
    padding-top: 16px;
    text-align: left;
}

.affiliate-banner-inline a {
    display: inline-block;
    transition: opacity 0.2s;
}

.affiliate-banner-inline a:hover {
    opacity: 0.85;
}

.affiliate-banner-inline img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0;
    border-radius: 4px;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media (max-width: 600px) {
    header {
        gap: 8px;
    }

    .header-top {
        flex-wrap: wrap;
    }

    .lang-switcher {
        justify-content: flex-start;
    }

    .tool-links {
        gap: 8px;
    }

    .tool-circle {
        width: 32px;
        height: 32px;
        font-size: 0.85rem;
    }

    .form-card,
    .result-box {
        padding: 12px;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .button-group {
        flex-direction: column;
    }

    .result-content {
        grid-template-columns: 1fr;
        gap: 12px;
    }

    .result-divider {
        display: none;
    }

    .result-info,
    .salary-ranges,
    .feedback-section {
        padding-bottom: 12px;
        border-bottom: 1px solid var(--border-color);
    }

    .feedback-section:last-child {
        border-bottom: none;
        padding-bottom: 0;
    }
}

@media (max-width: 768px) {
    .info-box-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .info-divider {
        display: none;
    }

    .chart-container {
        height: 120px;
    }
}
