/* [min-profil] — cover + rundt profilfoto (halvt over cover-bund) */

.minprofil-widget {
    margin-bottom: 1.15rem;
}

.minprofil-widget__cover {
    margin: 0;
    line-height: 0;
    border-radius: 8px;
    overflow: hidden;
}

.site-main .minprofil-widget__cover-img {
    display: block;
    width: 100%;
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* Halvdelen af cirklen (96px) ligger over cover-billedets nederste kant */
.minprofil-widget__cover + .minprofil-widget__identity {
    margin-top: -3rem;
    margin-bottom: 0.35rem;
    position: relative;
    z-index: 2;
    padding-left: 0.75rem;
}

.minprofil-widget__identity {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    justify-content: flex-start;
    gap: 0;
}

/* Redigér (admin): højre, mellem avatar/cover-række og «Personlige information» */
.minprofil-widget__editbar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    margin: 0.15rem 0 0;
    padding: 0 0.35rem 0 0.75rem;
    position: relative;
    z-index: 2;
}

.minprofil-widget__edit-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 8px;
    border: 1px solid #c5cdd8;
    background: #fff;
    color: var(--brand-primary, #1e5fbf);
    text-decoration: none;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
    transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.minprofil-widget__edit-link:hover {
    background: #f0f5fb;
    border-color: var(--brand-primary, #1e5fbf);
    color: var(--brand-primary, #1e5fbf);
}

.minprofil-widget__edit-link:focus-visible {
    outline: 2px solid var(--brand-primary, #1e5fbf);
    outline-offset: 2px;
}

.minprofil-widget__edit-icon-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    line-height: 1;
}

.minprofil-widget__edit-svg {
    display: block;
    flex-shrink: 0;
}

.minprofil-widget__avatar-wrap {
    flex-shrink: 0;
    display: inline-block;
    width: 96px;
    height: 96px;
    margin: 0 1rem 0 0;
}

.minprofil-widget__avatar-wrap--placeholder .minprofil-widget__avatar--ph {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 96px;
    height: 96px;
    box-sizing: border-box;
    border-radius: 50%;
    margin: 0;
    padding: 0;
    border: 3px solid rgba(221, 227, 234, 0.95);
    background: linear-gradient(145deg, #e8ecf2 0%, #d4dbe6 100%);
    color: #445566;
    font-size: 1.65rem;
    font-weight: 800;
    line-height: 1;
}

.minprofil-widget .minprofil-widget__avatar-wrap .minprofil-widget__avatar {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    display: block;
    margin: 0;
    flex-shrink: 0;
    border: 3px solid #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.minprofil-widget__personal {
    margin-top: 0.85rem;
    padding: 0.75rem 0.95rem;
    border: 1px solid #d9dee6;
    border-radius: 8px;
    background: #fafbfc;
}

.minprofil-widget__personal.minprofil-widget__forening {
    margin-top: 1rem;
}

.minprofil-widget__personal.minprofil-widget__billede-id {
    margin-top: 1rem;
}

.minprofil-widget__idbillede-dl.minprofil-widget__personal-dl {
    grid-template-columns: minmax(5rem, max-content) 1fr;
    align-items: start;
}

.minprofil-widget__idbillede-frame {
    margin: 0;
    max-width: 100%;
    line-height: 0;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #d9dee6;
    background: #fff;
}

.minprofil-widget__idbillede-img-link {
    display: block;
    line-height: 0;
}

.minprofil-widget__idbillede-img-link:focus-visible {
    outline: 2px solid var(--brand-primary, #1e5fbf);
    outline-offset: 2px;
    border-radius: 6px;
}

.minprofil-widget__idbillede-img {
    display: block;
    width: 100%;
    max-width: 320px;
    height: auto;
    max-height: 360px;
    object-fit: contain;
    vertical-align: middle;
}

.minprofil-widget__idbillede-img--idkort {
    max-height: 280px;
}

.minprofil-widget__idbillede-ph {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 7rem;
    max-width: 320px;
    padding: 0.75rem 0.5rem;
    font-size: 0.9rem;
    color: #6b7280;
    text-align: center;
    border: 1px dashed #c5cdd8;
    border-radius: 8px;
    background: #f1f4f8;
    box-sizing: border-box;
}

.minprofil-widget__sect-title {
    margin: 0 0 0.65rem;
    padding: 0;
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.25;
    color: var(--brand-primary, #1e5fbf);
}

.minprofil-widget__personal-cols {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.5rem;
    align-items: start;
}

.minprofil-widget__personal-cols--single {
    grid-template-columns: 1fr;
}

.minprofil-widget__personal-col {
    min-width: 0;
}

@media (max-width: 700px) {
    .minprofil-widget__personal-cols:not(.minprofil-widget__personal-cols--single) {
        grid-template-columns: 1fr;
    }

    /* Tekstfelter: etiket over indhold på mobil; afkrydsninger forbliver side om side (pair--chk) */
    .minprofil-widget__personal-dl {
        grid-template-columns: 1fr;
        column-gap: 0;
        row-gap: 0.15rem;
    }

    .minprofil-widget__idbillede-dl.minprofil-widget__personal-dl {
        grid-template-columns: 1fr;
    }

    .minprofil-widget__personal-dl > .minprofil-widget__personal-dt {
        grid-column: 1;
    }

    .minprofil-widget__personal-dl > .minprofil-widget__personal-dd {
        grid-column: 1;
        margin-bottom: 0.65rem;
    }

    .minprofil-widget__personal-pair--chk {
        display: grid;
        grid-template-columns: minmax(7rem, 44%) 1fr;
        column-gap: 0.65rem;
        align-items: center;
        margin-bottom: 0.65rem;
    }

    .minprofil-widget__personal-pair--chk .minprofil-widget__personal-dt,
    .minprofil-widget__personal-pair--chk .minprofil-widget__personal-dd {
        margin: 0;
    }
}

.minprofil-widget__personal-dl {
    margin: 0;
    padding: 0;
    display: grid;
    grid-template-columns: minmax(12.5rem, max-content) 1fr;
    column-gap: 0.75rem;
    row-gap: 0.4rem;
    align-items: baseline;
}

/* Checkbox-rækker (redigér): deltager i samme grid som øvrige dt/dd på desktop */
.minprofil-widget__personal-pair--chk {
    display: contents;
}

.minprofil-widget__personal-dt {
    margin: 0;
    font-weight: 600;
    font-size: 0.92rem;
    color: #3d4757;
}

.minprofil-widget__personal-dd {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.35;
    color: #101820;
    word-break: break-word;
}

.minprofil-widget__personal-dd a {
    color: var(--brand-primary, #1e5fbf);
    text-decoration: none;
}

.minprofil-widget__personal-dd a:hover {
    text-decoration: underline;
}

/* Hemmelige felter: Ja = grønt flueben, Nej = rødt kryds (Font Awesome .fa) */
.minprofil-widget__secret {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    vertical-align: middle;
}

.minprofil-widget__secret .fa {
    font-size: 1.1em;
}

.minprofil-widget__secret--ja {
    color: #16a34a;
}

.minprofil-widget__secret--nej {
    color: #dc2626;
}

/* Redigér profil (min-konto ?id=…) */
.minprofil-widget__flash {
    margin: 0 0 0.85rem;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    font-size: 0.95rem;
}

.minprofil-widget__flash--ok {
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

.minprofil-widget__flash--err {
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.minprofil-widget__edit-form .minprofil-widget__personal-dd {
    align-self: center;
}

.minprofil-widget__input,
.minprofil-widget__select {
    width: 100%;
    max-width: 26rem;
    box-sizing: border-box;
    padding: 0.4rem 0.55rem;
    border: 1px solid #c5cdd8;
    border-radius: 6px;
    font: inherit;
    font-size: 0.95rem;
    background: #fff;
}

.minprofil-widget__input:focus,
.minprofil-widget__select:focus {
    outline: none;
    border-color: var(--brand-primary, #1e5fbf);
    box-shadow: 0 0 0 2px rgba(30, 95, 191, 0.15);
}

.minprofil-widget__check {
    font-size: 0.95rem;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.minprofil-widget__personal-dd--readonly {
    color: #4b5563;
    background: #f3f4f6;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
}

.minprofil-widget__edit-actions {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
}

.minprofil-widget__btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font: inherit;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid transparent;
}

.minprofil-widget__btn--primary {
    background: var(--brand-primary, #1e5fbf);
    color: #fff;
    border-color: var(--brand-primary, #1e5fbf);
}

.minprofil-widget__btn--primary:hover {
    filter: brightness(1.05);
}

.minprofil-widget__btn--ghost {
    background: #fff;
    color: var(--brand-primary, #1e5fbf);
    border-color: #c5cdd8;
}

.minprofil-widget__btn--ghost:hover {
    background: #f9fafb;
}

.minprofil-widget__edit-link--outline {
    border-style: dashed;
    background: #fafbfc;
}

.minprofil-widget__edit-link--outline:hover {
    background: #f0f5fb;
}

.minprofil-widget__upload-bundle {
    margin-top: 0.75rem;
}

.minprofil-widget__upload-label {
    display: block;
    margin: 0 0 0.35rem;
    font-weight: 600;
    font-size: 0.88rem;
    color: #3d4757;
}

.minprofil-widget__file-input {
    display: block;
    max-width: 100%;
    font-size: 0.85rem;
}
