/* timelonn-specific.css - Penger i timen kalkulator styling */

/* Info tooltip styling */
.info-tooltip {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 700;
    cursor: help;
    margin-left: 8px;
    vertical-align: middle;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.info-tooltip:hover {
    transform: scale(1.15);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.info-tooltip::before {
    content: "i";
}

.info-tooltip .tooltip-text {
    visibility: hidden;
    opacity: 0;
    position: absolute;
    bottom: calc(100% + 10px);
    left: 50%;
    transform: translateX(-50%);
    width: 280px;
    background: #1f2937;
    color: #f3f4f6;
    padding: 14px 16px;
    border-radius: 10px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    text-align: left;
    z-index: 1000;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    transition: all 0.3s ease;
}

.info-tooltip .tooltip-text::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border-width: 8px;
    border-style: solid;
    border-color: #1f2937 transparent transparent transparent;
}

.info-tooltip:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

/* Tooltip positioning adjustments for mobile */
@media (max-width: 768px) {
    .info-tooltip .tooltip-text {
        width: 220px;
        left: auto;
        right: -10px;
        transform: none;
    }
    
    .info-tooltip .tooltip-text::after {
        left: auto;
        right: 15px;
        transform: none;
    }
}

/* Tooltip with link styling */
.tooltip-text a {
    color: #93c5fd;
    text-decoration: underline;
}

.tooltip-text a:hover {
    color: #bfdbfe;
}

/* Tooltip highlight text */
.tooltip-text strong {
    color: #93c5fd;
}

/* Label with tooltip container */
.label-with-tooltip {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.label-with-tooltip label {
    margin-bottom: 0;
}

/* Timelønn-spesifikk gradient (blå for økonomi/penger-tema) */
body {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 25%, #3b82f6 75%, #60a5fa 100%);
}

.calculator-card {
    border: 2px solid rgba(37, 99, 235, 0.3);
}

/* Timelønn-spesifikke resultat-bokser */
.results {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border-left: 5px solid #2563eb;
}

.breakdown {
    background: rgba(37, 99, 235, 0.05);
    border: 1px solid rgba(37, 99, 235, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

.breakdown h3 {
    color: #1d4ed8;
    margin-bottom: 15px;
    font-size: 1.2em;
    border-bottom: 2px solid rgba(37, 99, 235, 0.2);
    padding-bottom: 10px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(37, 99, 235, 0.08);
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-label {
    color: #374151;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 6px;
}

.breakdown-label .info-tooltip {
    margin-left: 0;
}

.breakdown-value {
    color: #1d4ed8;
    font-weight: 600;
}

.section-header {
    background: rgba(37, 99, 235, 0.1);
    padding: 12px 15px;
    border-radius: 8px;
    margin: 20px 0 15px 0;
    font-weight: 600;
    color: #1d4ed8;
    border-left: 4px solid #2563eb;
}

/* Timelønn-spesifikke knapper */
.calculate-btn {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
}

.calculate-btn:hover {
    box-shadow: 0 15px 30px rgba(37, 99, 235, 0.4);
}

input[type="number"]:focus, select:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

.info-note {
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

/* Mode toggle styling */
.mode-toggle {
    display: flex;
    background: rgba(37, 99, 235, 0.1);
    border-radius: 12px;
    padding: 5px;
    margin-bottom: 25px;
    gap: 5px;
}

.mode-btn {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    background: transparent;
    color: #4b5563;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.mode-btn.active {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.mode-btn:hover:not(.active) {
    background: rgba(37, 99, 235, 0.15);
    color: #1d4ed8;
}

/* Salary input toggle */
.salary-toggle {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.salary-toggle-btn {
    padding: 8px 16px;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    background: white;
    color: #4b5563;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.salary-toggle-btn.active {
    border-color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
}

/* Tax display cards */
.wage-display {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    margin: 20px 0;
}

.wage-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 12px;
    text-align: center;
    border-left: 4px solid #2563eb;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.wage-card.highlight {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border-left: none;
}

.wage-card.highlight .wage-label {
    color: rgba(255, 255, 255, 0.9);
}

.wage-card.highlight .wage-value {
    color: white;
}

.wage-label {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 8px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.wage-label .info-tooltip {
    margin-left: 0;
}

.wage-value {
    font-size: 1.6em;
    font-weight: 700;
    color: #1d4ed8;
}

.wage-sub {
    font-size: 12px;
    color: #9ca3af;
    margin-top: 5px;
}

/* Summary box */
.summary-box {
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    color: white;
    padding: 25px;
    border-radius: 15px;
    margin-top: 25px;
    text-align: center;
}

.summary-box h4 {
    font-size: 1.1em;
    margin-bottom: 15px;
    opacity: 0.9;
}

.summary-box .big-number {
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 5px;
}

.summary-box .per-unit {
    opacity: 0.8;
    font-size: 0.95em;
}

/* Comparison mode styling */
.comparison-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 900px) {
    .comparison-container {
        grid-template-columns: 1fr;
    }
}

.job-column {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 15px;
    padding: 20px;
    border: 2px solid rgba(37, 99, 235, 0.15);
}

.job-column h3 {
    color: #1d4ed8;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid rgba(37, 99, 235, 0.2);
    font-size: 1.1em;
}

.job-column.job-a {
    border-color: rgba(37, 99, 235, 0.3);
}

.job-column.job-b {
    border-color: rgba(16, 185, 129, 0.3);
}

.job-column.job-b h3 {
    color: #059669;
}

/* Comparison results */
.comparison-results {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 15px;
    margin-top: 25px;
    align-items: start;
}

@media (max-width: 900px) {
    .comparison-results {
        grid-template-columns: 1fr;
    }
}

.comparison-card {
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
}

.comparison-card.job-a {
    border-left: 4px solid #2563eb;
}

.comparison-card.job-b {
    border-left: 4px solid #10b981;
}

.comparison-card h4 {
    font-size: 1em;
    color: #4b5563;
    margin-bottom: 15px;
}

.comparison-card .main-value {
    font-size: 1.8em;
    font-weight: 700;
    color: #1f2937;
    margin-bottom: 10px;
}

.comparison-card.job-a .main-value {
    color: #1d4ed8;
}

.comparison-card.job-b .main-value {
    color: #059669;
}

.comparison-card .sub-values {
    font-size: 13px;
    color: #6b7280;
    line-height: 1.8;
}

/* Difference box */
.difference-box {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-radius: 15px;
    padding: 25px 20px;
    text-align: center;
    border: 2px solid #f59e0b;
}

.difference-box h4 {
    font-size: 0.95em;
    color: #92400e;
    margin-bottom: 15px;
    font-weight: 600;
}

.difference-box .diff-value {
    font-size: 1.6em;
    font-weight: 700;
    margin-bottom: 8px;
}

.difference-box .diff-value.positive {
    color: #059669;
}

.difference-box .diff-value.negative {
    color: #dc2626;
}

.difference-box .diff-label {
    font-size: 13px;
    color: #92400e;
}

.winner-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    margin-top: 15px;
}

.winner-badge.job-a {
    background: rgba(37, 99, 235, 0.15);
    color: #1d4ed8;
}

.winner-badge.job-b {
    background: rgba(16, 185, 129, 0.15);
    color: #059669;
}

/* Quick presets */
.quick-presets {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
}

.preset-btn {
    padding: 6px 12px;
    border: 1px solid #e1e8ed;
    border-radius: 6px;
    background: white;
    color: #4b5563;
    font-size: 13px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.preset-btn:hover {
    border-color: #2563eb;
    background: rgba(37, 99, 235, 0.05);
    color: #1d4ed8;
}

.preset-btn.active {
    border-color: #2563eb;
    background: rgba(37, 99, 235, 0.1);
    color: #1d4ed8;
    font-weight: 500;
}

/* Optional fields styling */
.optional-section {
    background: rgba(37, 99, 235, 0.03);
    border: 1px dashed rgba(37, 99, 235, 0.2);
    border-radius: 12px;
    padding: 20px;
    margin-top: 20px;
}

.optional-section h4 {
    color: #4b5563;
    font-size: 0.95em;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.optional-section h4::before {
    content: "⚙️";
}

/* Collapsible section */
.collapsible-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    padding: 15px;
    background: rgba(37, 99, 235, 0.05);
    border-radius: 10px;
    margin-bottom: 15px;
    transition: all 0.2s ease;
}

.collapsible-header:hover {
    background: rgba(37, 99, 235, 0.1);
}

.collapsible-header h4 {
    margin: 0;
    color: #1d4ed8;
    font-size: 1em;
}

.collapsible-icon {
    font-size: 1.2em;
    transition: transform 0.3s ease;
}

.collapsible-icon.open {
    transform: rotate(180deg);
}

.collapsible-content {
    display: none;
    padding: 0 5px;
}

.collapsible-content.open {
    display: block;
}

/* Time icon styling */
.time-icon {
    font-size: 2.5em;
    display: block;
    text-align: center;
    margin-bottom: 10px;
}

/* Input unit suffix */
.input-with-unit {
    position: relative;
}

.input-with-unit input {
    padding-right: 60px;
}

.input-unit {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 14px;
    pointer-events: none;
}

/* Year info text */
.year-info {
    font-size: 12px;
    color: #6b7280;
    margin-top: 5px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .wage-display {
        grid-template-columns: 1fr 1fr;
    }
    
    .wage-card {
        padding: 15px;
    }
    
    .wage-value {
        font-size: 1.3em;
    }
    
    .summary-box .big-number {
        font-size: 2em;
    }
    
    .mode-toggle {
        flex-direction: column;
    }
    
    .mode-btn {
        padding: 10px 15px;
    }
}

/* Warning/info boxes */
.warning-box {
    background: rgba(245, 158, 11, 0.1);
    border: 1px solid rgba(245, 158, 11, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
    color: #92400e;
    font-size: 14px;
}

.tip-box {
    background: rgba(37, 99, 235, 0.1);
    border: 1px solid rgba(37, 99, 235, 0.3);
    border-radius: 10px;
    padding: 15px;
    margin-top: 15px;
    color: #1e40af;
    font-size: 14px;
}

/* Effective wage highlight */
.effective-highlight {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-color: #f59e0b;
}

.effective-highlight .wage-label {
    color: #92400e;
}

.effective-highlight .wage-value {
    color: #b45309;
}

/* Hidden class */
.hidden {
    display: none !important;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.results {
    animation: fadeIn 0.3s ease;
}

/* Inline small tooltips */
.sub-values .info-tooltip {
    vertical-align: middle;
}

/* Comparison card sub-values with tooltips */
.comparison-card .sub-values {
    text-align: left;
    padding: 0 10px;
}

.comparison-card .sub-values > div {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}