/* Power Platform licensing calculator (power-platform-licensing-calculator.html). Loaded only by that page. */

.post-wrap--wide { max-width: 1180px; }
.post-wrap--wide .post-hero { max-width: 760px; margin-left: auto; margin-right: auto; }
.lc-prose { max-width: 760px; margin: 0 auto; }
.lc-checked { font-size: 0.92rem; color: var(--text-muted); margin: -10px 0 26px; }
.lc-small { font-size: 0.9rem; color: var(--text-muted); }

.lc-examples { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0 0 26px; font-size: 0.9rem; color: var(--text-muted); }
.lc-chip {
    font: inherit; font-size: 0.86rem; color: var(--text-2); cursor: pointer;
    padding: 7px 14px; border-radius: 999px; background: var(--card); border: 1px solid var(--border-2);
    transition: all var(--t-fast);
}
.lc-chip:hover, .lc-chip:focus-visible { color: var(--hover-ink); border-color: var(--accent); background: var(--accent-soft); outline: none; }

.lc-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; margin: 0 0 56px; align-items: start; }
.lc-grid > * { min-width: 0; }
@media (min-width: 1040px) {
    .lc-grid { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 36px; }
    .lc-result { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; }
}

/* form */
.lc-form { font-size: 0.95rem; line-height: 1.5; }
.lc-form fieldset { border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px 6px; margin: 0 0 16px; background: var(--card); min-width: 0; }
.lc-form legend { font-family: var(--font-display); font-weight: 600; color: var(--text); padding: 0 6px; font-size: 1rem; }
.lc-form [hidden] { display: none; }
.lc-field { display: grid; grid-template-columns: minmax(0, 1fr) 128px; align-items: center; gap: 6px 14px; margin: 0 0 12px; color: var(--text-2); }
.lc-field:has(select) { grid-template-columns: minmax(0, 1fr); }
.lc-field input, .lc-field select {
    width: 100%; min-width: 0; padding: 10px 12px; font: inherit; font-size: 0.95rem; color: var(--text);
    background: var(--input-bg); border: 1px solid var(--border-2); border-radius: var(--radius-sm); outline: none;
}
.lc-field select { cursor: pointer; }
.lc-field input:focus, .lc-field select:focus, .lc-check input:focus-visible, .lc-radios input:focus-visible { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.18); }
.lc-radios { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 2px 0 12px; color: var(--text-2); }
.lc-radios label, .lc-check { display: flex; align-items: flex-start; gap: 9px; cursor: pointer; }
.lc-check { margin: 0 0 12px; color: var(--text-2); }
.lc-radios input, .lc-check input { accent-color: var(--accent); width: 17px; height: 17px; margin-top: 2px; flex-shrink: 0; }
.lc-hint { font-size: 0.86rem; color: var(--text-muted); margin: 0 0 12px; }
.lc-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.lc-actions .btn { padding: 11px 18px; font-size: 0.88rem; white-space: normal; }
.lc-status { min-height: 1.4em; font-size: 0.88rem; color: var(--ok); margin: 10px 0 0; }
.lc-mini {
    position: sticky; bottom: 12px; z-index: 5; display: block; margin-top: 8px; padding: 12px 16px;
    border-radius: var(--radius-sm); background: var(--accent-grad); color: #fff; font-weight: 600; font-size: 0.92rem;
    text-align: center; text-decoration: none; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.45);
}
.post-body .lc-mini { color: #fff; text-decoration: none; }
.lc-form .lc-mini[hidden] { display: none; }
@media (min-width: 1040px) { .lc-form .lc-mini { display: none; } }

/* result */
.lc-result { font-size: 0.95rem; line-height: 1.6; color: var(--text-2); }
.lc-result h3 { font-size: 1.05rem; margin: 26px 0 10px; color: var(--text); }
.lc-result ul { margin: 0 0 8px 20px; list-style: disc; }
.lc-result li { margin-bottom: 6px; }
.lc-result li::marker { color: var(--accent-bright); }
.lc-total {
    display: flex; flex-direction: column; gap: 4px; padding: 20px 22px; border-radius: var(--radius);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.16), rgba(34, 211, 238, 0.08)); border: 1px solid var(--accent-line);
}
.lc-total-label { font-size: 0.76rem; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--accent-bright); }
.lc-total-figure { font-family: var(--font-display); font-size: 2.1rem; font-weight: 700; color: var(--text); line-height: 1.2; overflow-wrap: anywhere; }
.lc-total-figure small { font-size: 1rem; font-weight: 500; color: var(--text-2); }
.lc-total-sub { font-size: 0.88rem; color: var(--text-muted); }
.lc-note { font-size: 0.92rem; margin: 0 0 10px; }
.lc-result .table-scroll { margin: 8px 0 6px; }
.post-body .lc-table { min-width: 520px; font-size: 0.88rem; }
.post-body .lc-table th, .post-body .lc-table td { padding: 10px 12px; }
.post-body .lc-table td.lc-num, .post-body .lc-table th { white-space: nowrap; }
.lc-table td:first-child { min-width: 170px; }
.lc-chosen { background: var(--ok-soft); }
.post-body tbody tr.lc-chosen:hover { background: var(--ok-soft); }
.lc-invalid td { color: var(--text-muted); }
.lc-badge { display: inline-block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--on-ok); background: var(--ok); border-radius: 6px; padding: 1px 7px; margin-right: 4px; vertical-align: 1px; }
.lc-rule, .lc-alt { display: block; font-size: 0.8rem; color: var(--text-muted); margin-top: 4px; line-height: 1.45; white-space: normal; }

.post-body .lc-prices td:nth-child(2) { white-space: nowrap; }
.post-body .lc-prices td:first-child { min-width: 220px; }
.lc-next { margin-top: 36px; padding: 20px 22px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--card); }

/* phones and small tablets: every table row becomes a card, each value with its label above it */
@media (max-width: 720px) {
    .post-body .lc-result .table-scroll, .post-body .lc-prose .table-scroll { overflow: visible; border: none; border-radius: 0; }
    .post-body table.lc-table, .post-body table.lc-prices { min-width: 0; font-size: 0.92rem; }
    .lc-table thead, .lc-prices thead { display: none; }
    .lc-table tbody, .lc-table tr, .lc-table td, .lc-prices tbody, .lc-prices tr, .lc-prices td { display: block; width: 100%; }
    .post-body .lc-table tr, .post-body .lc-prices tr {
        border: 1px solid var(--border); border-radius: var(--radius); background: var(--card);
        padding: 12px 14px; margin: 0 0 12px;
    }
    .post-body .lc-table tr.lc-chosen { background: var(--ok-soft); border-color: var(--ok-line); }
    .post-body .lc-table td, .post-body .lc-prices td { padding: 4px 0; border: none; white-space: normal; min-width: 0; }
    .post-body .lc-table td.lc-num, .post-body .lc-prices td:nth-child(2) { white-space: normal; }
    .post-body .lc-table td.lc-head, .post-body .lc-prices td.lc-head { font-weight: 600; color: var(--text); padding-bottom: 6px; }
    .lc-table td[data-label]::before, .lc-prices td[data-label]::before {
        content: attr(data-label); display: block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.8px;
        text-transform: uppercase; color: var(--text-muted); margin-bottom: 1px;
    }
    .post-body .lc-table td.lc-num { font-family: var(--font-display); font-size: 1.15rem; font-weight: 600; color: var(--text); }
    .lc-invalid td.lc-num { color: var(--text-muted); }
    .post-body tbody tr:hover { background: var(--card); }

    /* compact cards: body line height off, labels inline, amounts side by side */
    .post-body .lc-table td, .post-body .lc-prices td { line-height: 1.45; }
    .post-body .lc-table tr, .post-body .lc-prices tr { padding: 10px 14px; margin-bottom: 10px; }
    .post-body .lc-table td.lc-head, .post-body .lc-prices td.lc-head { padding: 0 0 4px; }
    .lc-table td.lc-num[data-label]::before { display: inline; margin: 0 8px 0 0; vertical-align: 2px; }
    .post-body .lc-table td.lc-num { padding: 2px 0; }
    .lc-table td[data-label="Why"]::before, .lc-table td[data-label="Cheapest licence"]::before { display: none; }
    .post-body .lc-table td[data-label="Why"] { font-size: 0.86rem; color: var(--text-muted); padding-top: 2px; }

    .post-body .lc-prices tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 0 14px; }
    .post-body .lc-prices td { display: block; width: auto; padding: 1px 0; }
    .post-body .lc-prices td.lc-head { grid-column: 1 / -1; }
    .post-body .lc-prices td:nth-child(2), .post-body .lc-prices td:nth-child(3) { font-family: var(--font-display); font-weight: 600; color: var(--text); font-size: 1.02rem; }
    .lc-prices td:nth-child(2)::before, .lc-prices td:nth-child(3)::before { margin-bottom: 0; }
    .lc-prices td:nth-child(2)::before { content: "UK"; }
    .post-body .lc-prices td:nth-child(4), .post-body .lc-prices td:nth-child(5) { font-size: 0.8rem; color: var(--text-muted); padding-top: 4px; }
    .lc-prices td:nth-child(4)::before { display: inline; margin-right: 6px; }
    .lc-prices td:nth-child(5)::before { display: none; }
}

@media (max-width: 560px) {
    .lc-field { grid-template-columns: minmax(0, 1fr) 96px; }
    .lc-form fieldset { padding: 14px 14px 4px; }
    .lc-total-figure { font-size: 1.7rem; }
}
