/* levealder-specific.css - Levealder 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, #6366f1 0%, #4f46e5 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(99, 102, 241, 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;
}

@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-text a {
    color: #a5b4fc;
    text-decoration: underline;
}

.tooltip-text a:hover {
    color: #c7d2fe;
}

.tooltip-text strong {
    color: #a5b4fc;
}

.label-with-tooltip {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
}

.label-with-tooltip label {
    margin-bottom: 0;
}

/* Levealder-spesifikk gradient (lilla/blå for helse/livsstil-tema) */
body {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 25%, #7c3aed 75%, #8b5cf6 100%);
}

.calculator-card {
    border: 2px solid rgba(99, 102, 241, 0.3);
}

/* Levealder-spesifikke resultat-bokser */
.results {
    background: linear-gradient(135deg, #eef2ff 0%, #e0e7ff 100%);
    border-left: 5px solid #6366f1;
}

.breakdown {
    background: rgba(99, 102, 241, 0.05);
    border: 1px solid rgba(99, 102, 241, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-top: 20px;
}

.breakdown h3 {
    color: #4f46e5;
    margin-bottom: 15px;
    font-size: 1.2em;
    border-bottom: 2px solid rgba(99, 102, 241, 0.2);
    padding-bottom: 10px;
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid rgba(99, 102, 241, 0.08);
}

.breakdown-item:last-child {
    border-bottom: none;
}

.breakdown-label {
    color: #374151;
    font-weight: 500;
}

.breakdown-value {
    font-weight: 600;
}

.breakdown-value.positive {
    color: #059669;
}

.breakdown-value.negative {
    color: #dc2626;
}

.breakdown-value.neutral {
    color: #6b7280;
}

.section-header {
    background: rgba(99, 102, 241, 0.1);
    padding: 12px 15px;
    border-radius: 8px;
    margin: 25px 0 15px 0;
    font-weight: 600;
    color: #4f46e5;
    border-left: 4px solid #6366f1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.section-header .section-icon {
    font-size: 1.2em;
}

/* Levealder-spesifikke knapper */
.calculate-btn {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
}

.calculate-btn:hover {
    box-shadow: 0 15px 30px rgba(99, 102, 241, 0.4);
}

input[type="number"]:focus, select:focus {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.info-note {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
}

/* Checkbox styling */
.checkbox-group {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 15px;
    background: rgba(99, 102, 241, 0.05);
    border-radius: 10px;
    margin-bottom: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

.checkbox-group:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: rgba(99, 102, 241, 0.2);
}

.checkbox-group input[type="checkbox"] {
    width: 20px;
    height: 20px;
    accent-color: #6366f1;
    cursor: pointer;
    margin-top: 2px;
    flex-shrink: 0;
}

.checkbox-group label {
    margin-bottom: 0;
    cursor: pointer;
    font-weight: 500;
    line-height: 1.4;
}

.checkbox-description {
    font-size: 13px;
    color: #6b7280;
    margin-left: 32px;
    margin-top: 4px;
}

/* Checkbox grid for conditions */
.checkbox-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 10px;
}

@media (max-width: 768px) {
    .checkbox-grid {
        grid-template-columns: 1fr;
    }
}

/* Main result display */
.result-display {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin: 25px 0;
}

@media (max-width: 768px) {
    .result-display {
        grid-template-columns: 1fr;
    }
}

.result-card {
    background: rgba(255, 255, 255, 0.9);
    padding: 25px;
    border-radius: 15px;
    text-align: center;
    border: 2px solid rgba(99, 102, 241, 0.2);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

.result-card.primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border: none;
    grid-column: 1 / -1;
}

.result-card.primary .result-label {
    color: rgba(255, 255, 255, 0.9);
}

.result-card.primary .result-value {
    color: white;
}

.result-label {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 10px;
    font-weight: 500;
}

.result-value {
    font-size: 2.5em;
    font-weight: 700;
    color: #4f46e5;
    line-height: 1.2;
}

.result-value .years-text {
    font-size: 0.4em;
    font-weight: 500;
    opacity: 0.8;
}

.result-sub {
    font-size: 13px;
    color: #9ca3af;
    margin-top: 8px;
}

.result-card.primary .result-sub {
    color: rgba(255, 255, 255, 0.75);
}

/* Range display */
.range-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
    margin-top: 15px;
    padding: 15px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.range-value {
    font-size: 1.3em;
    font-weight: 600;
}

.range-separator {
    color: rgba(255, 255, 255, 0.6);
    font-size: 1.2em;
}

/* Life visualization bar */
.life-bar-container {
    margin: 30px 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
}

.life-bar-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 14px;
    color: #6b7280;
}

.life-bar {
    height: 30px;
    background: #e5e7eb;
    border-radius: 15px;
    overflow: hidden;
    position: relative;
}

.life-bar-lived {
    height: 100%;
    background: linear-gradient(90deg, #6366f1 0%, #8b5cf6 100%);
    border-radius: 15px 0 0 15px;
    transition: width 0.8s ease;
}

.life-bar-remaining {
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    background: repeating-linear-gradient(
        45deg,
        transparent,
        transparent 10px,
        rgba(99, 102, 241, 0.1) 10px,
        rgba(99, 102, 241, 0.1) 20px
    );
}

.life-bar-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 13px;
}

.life-bar-labels .lived {
    color: #6366f1;
    font-weight: 600;
}

.life-bar-labels .remaining {
    color: #059669;
    font-weight: 600;
}

/* Summary stats */
.summary-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

@media (max-width: 768px) {
    .summary-stats {
        grid-template-columns: 1fr;
    }
}

.stat-card {
    background: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    border: 1px solid rgba(99, 102, 241, 0.15);
}

.stat-value {
    font-size: 1.5em;
    font-weight: 700;
    color: #4f46e5;
}

.stat-label {
    font-size: 12px;
    color: #6b7280;
    margin-top: 5px;
}

/* Disclaimer styling */
.disclaimer {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 12px;
    padding: 20px;
    margin: 25px 0;
    font-size: 14px;
    color: #92400e;
}

.disclaimer-title {
    font-weight: 700;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.disclaimer-title::before {
    content: "⚠️";
}

.disclaimer ul {
    margin: 10px 0 0 20px;
    line-height: 1.6;
}

/* Factor impact indicators */
.impact-indicator {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.impact-indicator.positive {
    background: rgba(5, 150, 105, 0.15);
    color: #059669;
}

.impact-indicator.negative {
    background: rgba(220, 38, 38, 0.15);
    color: #dc2626;
}

.impact-indicator.neutral {
    background: rgba(107, 114, 128, 0.15);
    color: #6b7280;
}

/* Progress steps indicator */
.progress-indicator {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 30px;
}

.progress-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.2);
    transition: all 0.3s ease;
}

.progress-dot.active {
    background: #6366f1;
    transform: scale(1.2);
}

.progress-dot.completed {
    background: #059669;
}

/* Input with unit */
.input-with-unit {
    position: relative;
}

.input-with-unit input {
    padding-right: 50px;
}

.input-unit {
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-weight: 500;
    pointer-events: none;
}

/* BMI display */
.bmi-display {
    margin-top: 10px;
    padding: 12px 15px;
    background: rgba(99, 102, 241, 0.1);
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bmi-value {
    font-weight: 700;
    color: #4f46e5;
}

.bmi-category {
    font-size: 13px;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
}

.bmi-category.underweight {
    background: rgba(59, 130, 246, 0.15);
    color: #2563eb;
}

.bmi-category.normal {
    background: rgba(5, 150, 105, 0.15);
    color: #059669;
}

.bmi-category.overweight {
    background: rgba(245, 158, 11, 0.15);
    color: #d97706;
}

.bmi-category.obese {
    background: rgba(220, 38, 38, 0.15);
    color: #dc2626;
}

/* Loader */
.loader {
    display: none;
    text-align: center;
    padding: 30px;
}

.loader-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(99, 102, 241, 0.2);
    border-top-color: #6366f1;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 15px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.loader-text {
    color: #6b7280;
    font-size: 14px;
}

/* Hide results initially */
#results {
    display: none;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .result-value {
        font-size: 2em;
    }
    
    .range-display {
        flex-direction: column;
        gap: 5px;
    }
    
    .range-separator {
        transform: rotate(90deg);
    }
}

/* Comparison to average */
.comparison-box {
    background: rgba(255, 255, 255, 0.9);
    padding: 20px;
    border-radius: 12px;
    margin-top: 20px;
    text-align: center;
}

.comparison-text {
    font-size: 15px;
    color: #374151;
    line-height: 1.6;
}

.comparison-highlight {
    font-weight: 700;
    font-size: 1.1em;
}

.comparison-highlight.above {
    color: #059669;
}

.comparison-highlight.below {
    color: #dc2626;
}

.comparison-highlight.equal {
    color: #6366f1;
}

/* Tips section */
.tips-section {
    margin-top: 25px;
    padding: 20px;
    background: rgba(5, 150, 105, 0.08);
    border: 1px solid rgba(5, 150, 105, 0.2);
    border-radius: 12px;
}

.tips-title {
    font-weight: 700;
    color: #059669;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.tips-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.tips-list li {
    padding: 8px 0;
    padding-left: 25px;
    position: relative;
    color: #374151;
    font-size: 14px;
    line-height: 1.5;
}

.tips-list li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #059669;
    font-weight: bold;
}

/* Reset button */
.reset-btn {
    background: transparent;
    border: 2px solid rgba(99, 102, 241, 0.3);
    color: #6366f1;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 15px;
}

.reset-btn:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: #6366f1;
}

/* SEO Article Styling */
.seo-article {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    padding: 40px;
    margin-top: 30px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    border: 2px solid rgba(99, 102, 241, 0.3);
    line-height: 1.8;
    color: #374151;
}

.seo-article h2 {
    color: #4f46e5;
    font-size: 1.8em;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid rgba(99, 102, 241, 0.2);
    text-align: left;
}

.seo-article h3 {
    color: #4f46e5;
    font-size: 1.4em;
    margin-top: 35px;
    margin-bottom: 15px;
    padding-left: 15px;
    border-left: 4px solid #6366f1;
}

.seo-article h4 {
    color: #6366f1;
    font-size: 1.15em;
    margin-top: 25px;
    margin-bottom: 12px;
}

.seo-article p {
    margin-bottom: 18px;
    text-align: justify;
}

.seo-article p strong {
    color: #4f46e5;
}

.seo-article ul, .seo-article ol {
    margin: 20px 0;
    padding-left: 25px;
}

.seo-article li {
    margin-bottom: 10px;
}

.seo-article a {
    color: #6366f1;
    text-decoration: underline;
    transition: color 0.3s ease;
}

.seo-article a:hover {
    color: #4f46e5;
}

@media (max-width: 768px) {
    .seo-article {
        padding: 25px;
    }
    
    .seo-article h2 {
        font-size: 1.5em;
    }
    
    .seo-article h3 {
        font-size: 1.25em;
    }
    
    .seo-article p {
        text-align: left;
    }
}