/* MVN domains group: what the domain pages need beyond mvn-ui.css.
   Tokens only; every rule is scoped to a class only these pages print. Each block says
   what it is for, so it can be folded into mvn-ui.css (section 7) as a component. */

/* --------------------------------------------------------------------------
   Records editor (clientareadomaindns.tpl, clientareadomainemailforwarding.tpl)
   A frame of record lines. Each record is a <details>: its summary is the line
   (its values and "עריכה"), its body holds the record's fields, which are sent
   with the form even while closed. A <details> cannot join the frame's subgrid,
   so every line is its own grid with the same fixed columns, and the column
   labels use them too. .is-dns: type, name, value; .is-fwd: address, target.
   Markup: .mvn-frame.mvn-recs.is-dns > .mvn-frame-cols.mvn-recs-cols + ul.mvn-recs-list >
           li.mvn-rec[.is-new|.is-deleted] > details > summary.mvn-rec-line + .mvn-rec-edit >
           .mvn-rec-fields > .mvn-field…, then .mvn-btns
   Line cells: bdi.mvn-rec-key (the record's name, strong), bdi (ink), bdi.mvn-rec-val (quieter).
   -------------------------------------------------------------------------- */
.mvn-recs {
    --mvn-recs-cols: minmax(0, 1fr) minmax(0, 1fr) var(--mvn-col-acts);
}
.mvn-recs.is-dns {
    --mvn-recs-cols: calc(var(--mvn-s-8) + var(--mvn-s-4)) minmax(0, 2fr) minmax(0, 5fr) var(--mvn-col-acts);
}
.mvn-recs > .mvn-recs-cols,
.mvn-rec-line {
    grid-template-columns: var(--mvn-recs-cols);
    column-gap: var(--mvn-col-gap);
}
html.mvn-ui .mvn-recs-list {
    margin: 0;
    padding: 0;
    list-style: none;
}
.mvn-rec + .mvn-rec {
    border-block-start: var(--mvn-hair) solid var(--mvn-rule-soft);
}
.mvn-rec-line {
    display: grid;
    align-items: center;
    min-height: var(--mvn-foot-min);
    padding: var(--mvn-s-2) var(--mvn-frame-pad);
    color: var(--mvn-ink);
    font-size: var(--mvn-t-small);
    line-height: var(--mvn-lh-ui);
    list-style: none;
    cursor: pointer;
    transition: background-color var(--mvn-dur) var(--mvn-ease);
}
/* The native marker: the line's "עריכה" says it opens. */
.mvn-rec-line::-webkit-details-marker {
    display: none;
}
.mvn-rec-line:hover {
    background: var(--mvn-row-hover);
}
/* The frame clips its children, so the ring is drawn inside the line. */
html.mvn-ui body.lagom .mvn-rec-line:focus-visible {
    outline-offset: calc(-1 * var(--mvn-ring));
}
/* Technical values on one line, from the column's start; long ones end in an ellipsis. */
.mvn-rec-line > bdi {
    display: block;
    min-width: 0;
    overflow: hidden;
    text-align: end;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.mvn-rec-key {
    font-weight: var(--mvn-w-strong);
}
.mvn-rec-val {
    color: var(--mvn-ink-2);
}
.mvn-rec-line > .mvn-act {
    justify-self: end;
}
.mvn-rec > details[open] > .mvn-rec-line .mvn-act {
    color: var(--mvn-accent);
    text-decoration-color: var(--mvn-accent-line);
}
/* The line that adds a record: one action word */
.mvn-rec-line.is-add {
    display: flex;
}
/* A record marked for deletion: struck through until it is restored or saved */
.mvn-rec.is-deleted .mvn-rec-line > bdi {
    color: var(--mvn-ink-3);
    text-decoration: line-through;
}
/* The record's fields on one line (DNS: name, type, value, priority) */
.mvn-rec-edit {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--mvn-s-3);
    padding: var(--mvn-s-2) var(--mvn-frame-pad) var(--mvn-s-5);
}
.mvn-rec-fields {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(0, 1fr));
    align-items: start;
    gap: var(--mvn-s-4);
    width: 100%;
}
.mvn-recs.is-dns .mvn-rec-fields {
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 4fr) minmax(0, 1fr);
}
.mvn-rec-fields > .mvn-field {
    max-width: none;
}

/* Phones: a line is its first values, then the last one on its own line; fields stack. */
@media (max-width: 599.98px) {
    .mvn-recs > .mvn-recs-cols {
        display: none;
    }
    .mvn-rec-line {
        grid-template-columns: minmax(0, 1fr) auto;
        grid-template-areas:
            "key act"
            "val val";
        row-gap: var(--mvn-s-1);
        padding-block: var(--mvn-s-3);
    }
    .mvn-rec-line > .mvn-rec-key {
        grid-area: key;
    }
    .mvn-rec-line > .mvn-rec-val {
        grid-area: val;
    }
    .mvn-rec-line > .mvn-act {
        grid-area: act;
    }
    .mvn-recs.is-dns .mvn-rec-line {
        grid-template-columns: auto minmax(0, 1fr) auto;
        grid-template-areas:
            "key name act"
            "val val val";
    }
    .mvn-recs.is-dns .mvn-rec-line > bdi:nth-child(2) {
        grid-area: name;
    }
    .mvn-recs .mvn-rec-fields,
    .mvn-recs.is-dns .mvn-rec-fields {
        grid-template-columns: minmax(0, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {
    .mvn-rec-line {
        transition: none;
    }
}

/* --------------------------------------------------------------------------
   A field with the domain beside it (.mvn-input-group in
   clientareadomainregisterns.tpl and clientareadomainemailforwarding.tpl):
   with a long domain the field keeps room to type, and the fixed part shortens
   with an ellipsis instead of pushing the page sideways on phones.
   -------------------------------------------------------------------------- */
html.mvn-ui body:is(.page-clientareadomainregisterns, .page-clientareadomainemailforwarding) .mvn-input-group > .mvn-input {
    min-width: 40%;
}
:is(.page-clientareadomainregisterns, .page-clientareadomainemailforwarding) .mvn-input-group > .mvn-input-addon {
    flex: 0 1 auto;
    min-width: 0;
    overflow: hidden;
}
:is(.page-clientareadomainregisterns, .page-clientareadomainemailforwarding) .mvn-input-addon > bdi {
    display: block;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
