/* Delade kontakter på Familj (ContactsSection, ContactRow, ContactDetailView, ContactFormView). */

.contact-search {
    min-height: 40px;
    margin-bottom: 10px;
    border-radius: 12px;
}

/* Raden: namnet och numret öppnar kontakten, den gröna knappen ringer. */
.contact-row {
    min-height: 54px;
    gap: 6px;
}

.contact-link {
    flex: 1;
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 44px;
    color: inherit;
    text-decoration: none;
}

.contact-link .grow {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.contact-link .title {
    font: var(--subheadline);
    font-weight: 600;
}

.contact-link .detail {
    font: var(--footnote);
    color: var(--secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Numret visas alltid helt; namnet får ge vika. */
.contact-link .phone {
    flex: none;
    font: var(--footnote);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: color-mix(in srgb, var(--label) 80%, transparent);
    white-space: nowrap;
}

.call-button {
    flex: none;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    margin-right: -6px;
    color: var(--positive-text);
}

.call-button .icon {
    box-sizing: content-box;
    width: 15px;
    height: 15px;
    padding: 8.5px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--green) 15%, transparent);
    stroke-width: 2.4;
}

.call-button:hover .icon {
    background: color-mix(in srgb, var(--green) 26%, transparent);
}

.removed-contact .title {
    font: var(--subheadline);
    font-weight: 600;
    color: var(--secondary);
}

/* ---------- Kontaktkortet ---------- */

.detail-back.with-actions {
    display: flex;
    align-items: center;
}

.contact-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 8px 0 18px;
    text-align: center;
}

.contact-head h1 {
    font: var(--title2);
    font-weight: 800;
    overflow-wrap: anywhere;
}

.contact-head p {
    font: var(--subheadline);
    color: var(--secondary);
}

.contact-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding-bottom: 16px;
}

.contact-action {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    min-height: 58px;
    padding: 8px 4px;
    border-radius: 14px;
    background: var(--card);
    box-shadow: 0 1px 1.5px rgba(0, 0, 0, 0.05);
    color: var(--accent);
    font: var(--caption);
    font-weight: 600;
    text-decoration: none;
}

.contact-action .icon {
    font-size: 17px;
    stroke-width: 2.4;
}

.contact-action.disabled {
    color: var(--tertiary);
}

a.contact-action:hover {
    background: color-mix(in srgb, var(--card) 92%, var(--label));
}

.contact-field {
    min-height: 0;
    padding: 10px 0;
}

.contact-field .detail {
    font: var(--footnote);
    color: var(--secondary);
}

.contact-field .value-text {
    margin-top: 2px;
    font: var(--callout);
    white-space: pre-wrap;
    overflow-wrap: anywhere;
    user-select: text;
}

.end-actions.centered {
    align-items: center;
    padding-top: 16px;
}
