/* Hurpedia Elräkningssimulator v1.0.0 */
/* Använder .entry-content.entry-content-prefix för Mercia-tema-kompatibilitet */

.entry-content.entry-content .hp-elsim {
    margin: 24px 0;
    padding: 24px;
    background: #faf9f7;
    border-left: 4px solid #3377bb;
    border-radius: 0 12px 12px 0;
    font-size: 1rem;
    line-height: 1.5;
}

.entry-content.entry-content .hp-elsim * {
    box-sizing: border-box;
}

.entry-content.entry-content .hp-elsim h2 {
    margin: 0 0 4px;
    font-size: 1.3rem;
    color: #1f2937;
}

.entry-content.entry-content .hp-elsim h3 {
    margin: 24px 0 12px;
    font-size: 1.1rem;
    color: #1f2937;
    border: none;
    padding: 0;
}

.entry-content.entry-content .hp-elsim h4 {
    margin: 0 0 10px;
    font-size: 0.95rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    border: none;
    padding: 0;
}

.entry-content.entry-content .hp-elsim-intro {
    margin: 0 0 18px;
    color: #6b7280;
    font-size: 0.95rem;
}

.entry-content.entry-content .hp-elsim-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 24px;
}

@media (min-width: 680px) {
    .entry-content.entry-content .hp-elsim-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.entry-content.entry-content .hp-elsim-field {
    margin-bottom: 14px;
}

.entry-content.entry-content .hp-elsim-field label,
.entry-content.entry-content .hp-elsim-label {
    display: block;
    font-weight: 600;
    font-size: 0.9rem;
    color: #1f2937;
    margin-bottom: 6px;
}

.entry-content.entry-content .hp-elsim-field small {
    display: block;
    color: #6b7280;
    font-size: 0.8rem;
    margin-top: 4px;
}

.entry-content.entry-content .hp-elsim-field input[type=number] {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    background: #fff;
    color: #1f2937;
    font-family: inherit;
}

.entry-content.entry-content .hp-elsim-field input[type=number]:focus {
    outline: 2px solid #3377bb;
    outline-offset: 1px;
    border-color: #3377bb;
}

.entry-content.entry-content .hp-elsim-areas {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
}

.entry-content.entry-content .hp-elsim-areas button {
    padding: 10px 8px;
    border: 1px solid #d1d5db;
    background: #fff;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    font-family: inherit;
    color: #1f2937;
    transition: all 0.15s;
    font-weight: 500;
}

.entry-content.entry-content .hp-elsim-areas button:hover {
    border-color: #3377bb;
    background: #eef5fc;
}

.entry-content.entry-content .hp-elsim-areas button.active {
    background: #3377bb;
    color: #fff;
    border-color: #2a5f93;
}

.entry-content.entry-content .hp-elsim-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 400;
    color: #1f2937;
}

.entry-content.entry-content .hp-elsim-checkbox input {
    margin: 0;
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: #3377bb;
}

.entry-content.entry-content .hp-elsim-advanced {
    margin-top: 14px;
    border-top: 1px solid #e5e7eb;
    padding-top: 14px;
}

.entry-content.entry-content .hp-elsim-advanced summary {
    cursor: pointer;
    font-size: 0.9rem;
    color: #3377bb;
    font-weight: 500;
    margin-bottom: 14px;
    list-style: none;
    user-select: none;
}

.entry-content.entry-content .hp-elsim-advanced summary::before {
    content: "▶ ";
    font-size: 0.7em;
    display: inline-block;
    transition: transform 0.15s;
}

.entry-content.entry-content .hp-elsim-advanced[open] summary::before {
    transform: rotate(90deg);
}

.entry-content.entry-content .hp-elsim-result {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.entry-content.entry-content .hp-elsim-total {
    text-align: center;
    padding: 16px 0 20px;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 20px;
}

.entry-content.entry-content .hp-elsim-total-label {
    font-size: 0.85rem;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
    margin-bottom: 6px;
}

.entry-content.entry-content .hp-elsim-total-amount {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2a5f93;
    line-height: 1;
    margin-bottom: 6px;
}

.entry-content.entry-content .hp-elsim-total-month {
    font-size: 0.9rem;
    color: #6b7280;
}

.entry-content.entry-content .hp-elsim-bar {
    margin-bottom: 14px;
}

.entry-content.entry-content .hp-elsim-bar-head {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-bottom: 5px;
    color: #1f2937;
}

.entry-content.entry-content .hp-elsim-bar-label {
    font-weight: 500;
}

.entry-content.entry-content .hp-elsim-bar-amount {
    font-weight: 600;
    color: #2a5f93;
    font-variant-numeric: tabular-nums;
}

.entry-content.entry-content .hp-elsim-bar-track {
    height: 8px;
    background: #f3f4f6;
    border-radius: 4px;
    overflow: hidden;
}

.entry-content.entry-content .hp-elsim-bar-fill {
    display: block;
    height: 100%;
    background: #3377bb;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.entry-content.entry-content .hp-elsim-bar[data-type=elhandel] .hp-elsim-bar-fill {
    background: #3377bb;
}

.entry-content.entry-content .hp-elsim-bar[data-type=elnat] .hp-elsim-bar-fill {
    background: #5b8db5;
}

.entry-content.entry-content .hp-elsim-bar[data-type=skatt] .hp-elsim-bar-fill {
    background: #f59e0b;
}

.entry-content.entry-content .hp-elsim-bar[data-type=moms] .hp-elsim-bar-fill {
    background: #8b9aa8;
}

.entry-content.entry-content .hp-elsim-compare {
    margin-top: 8px;
}

.entry-content.entry-content .hp-elsim-compare th {
    background: #f3f4f6;
    padding: 8px 12px;
    text-align: left;
    font-size: 0.85rem;
    font-weight: 600;
    color: #1f2937;
}

.entry-content.entry-content .hp-elsim-compare td {
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
    font-variant-numeric: tabular-nums;
}

.entry-content.entry-content .hp-elsim-compare tr.current {
    background: #eef5fc;
    font-weight: 600;
}

.entry-content.entry-content .hp-elsim-compare tr.current td:first-child::before {
    content: "→ ";
}

.entry-content.entry-content .hp-elsim-compare .diff-pos {
    color: #dc2626;
}

.entry-content.entry-content .hp-elsim-compare .diff-neg {
    color: #059669;
}

.entry-content.entry-content .hp-elsim-disclaimer {
    margin-top: 18px;
    padding: 12px;
    background: #fffbeb;
    border-left: 3px solid #f59e0b;
    border-radius: 0 6px 6px 0;
    font-size: 0.85rem;
    color: #78350f;
    line-height: 1.5;
}

@media (max-width: 600px) {
    .entry-content.entry-content .hp-elsim {
        padding: 18px;
    }
    .entry-content.entry-content .hp-elsim-total-amount {
        font-size: 2rem;
    }
    .entry-content.entry-content .hp-elsim-compare table {
        font-size: 0.85rem;
    }
}
