/* MATÉZZ Frontend - Maté profil
 * Deliberately inherits the active theme/Elementor typography.
 */
.matezz-profile {
    --matezz-profile-accent: var(--theme-primary-color, var(--primary-color, #1f6a43));
    --matezz-profile-accent-soft: color-mix(in srgb, var(--matezz-profile-accent) 9%, transparent);
    --matezz-profile-border: rgba(18, 43, 31, .12);
    --matezz-profile-muted: rgba(18, 43, 31, .58);
    --matezz-profile-track: rgba(18, 43, 31, .10);
    --matezz-profile-info-size: 19px;

    position: relative;
    width: 100%;
    box-sizing: border-box;
    padding: 14px 15px 12px;
    border: 1px solid var(--matezz-profile-border);
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(31, 106, 67, .035), rgba(31, 106, 67, .012));
    color: inherit;
    font-family: inherit;
    font-size: inherit;
    line-height: 1.35;
}

.matezz-profile *,
.matezz-profile *::before,
.matezz-profile *::after {
    box-sizing: border-box;
}

.matezz-profile__header {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 10px;
    padding-right: 25px;
}

.matezz-profile__title-wrap {
    display: inline-flex;
    align-items: center;
    min-width: 0;
    gap: 7px;
}

.matezz-profile__brand-icon {
    display: inline-flex;
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    color: var(--matezz-profile-accent);
}

.matezz-profile__brand-icon svg,
.matezz-profile__row-icon svg,
.matezz-profile__chip-icon svg,
.matezz-profile__info-button svg {
    display: block;
    width: 100%;
    height: 100%;
}

.matezz-profile__title {
    margin: 0;
    padding: 0;
    color: inherit;
    font: inherit;
    font-size: 1em;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: .015em;
}

.matezz-profile__info-button {
    all: unset;
    box-sizing: border-box !important;
    position: absolute;
    top: -2px;
    right: -2px;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    width: 28px !important;
    height: 28px !important;
    min-width: 28px !important;
    min-height: 28px !important;
    max-width: 28px !important;
    max-height: 28px !important;
    aspect-ratio: 1 / 1;
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid var(--matezz-profile-border) !important;
    border-radius: 50% !important;
    background: var(--matezz-profile-accent-soft) !important;
    color: var(--matezz-profile-accent) !important;
    cursor: pointer;
    overflow: hidden;
    line-height: 1 !important;
    vertical-align: middle;
    box-shadow: none !important;
    appearance: none;
    -webkit-appearance: none;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease;
    -webkit-tap-highlight-color: transparent;
}

.matezz-profile__info-button::before,
.matezz-profile__info-button::after {
    content: none !important;
    display: none !important;
}

.matezz-profile__info-glyph {
    display: block;
    width: auto;
    height: auto;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    color: currentColor;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    transform: translateY(-.25px);
}

.matezz-profile__info-button:hover,
.matezz-profile__info-button:focus-visible,
.matezz-profile__info-button[aria-expanded="true"] {
    border-color: color-mix(in srgb, var(--matezz-profile-accent) 30%, transparent) !important;
    background: color-mix(in srgb, var(--matezz-profile-accent) 14%, transparent) !important;
    color: var(--matezz-profile-accent) !important;
    outline: none;
}

.matezz-profile__info-button:focus-visible {
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--matezz-profile-accent) 14%, transparent) !important;
}


.matezz-profile__popover {
    position: absolute;
    z-index: 30;
    top: calc(100% + 7px);
    right: 0;
    width: min(355px, calc(100vw - 40px));
    padding: 11px 12px;
    border: 1px solid var(--matezz-profile-border);
    border-radius: 9px;
    background: #fff;
    color: #26312b;
    box-shadow: 0 10px 28px rgba(18, 43, 31, .14);
    font-family: inherit;
    font-size: 12.5px;
    line-height: 1.45;
}

.matezz-profile__popover[hidden] {
    display: none !important;
}

.matezz-profile__popover strong,
.matezz-profile__popover span {
    display: block;
}

.matezz-profile__popover strong {
    margin-bottom: 4px;
    font-weight: 700;
    color: #14261c;
}

.matezz-profile__rows {
    display: grid;
    gap: 3px;
}

.matezz-profile__row {
    display: grid;
    grid-template-columns: minmax(122px, 1.35fr) minmax(120px, 1fr) minmax(84px, .72fr);
    align-items: center;
    gap: 11px;
    min-height: 28px;
}

.matezz-profile__label {
    display: flex;
    align-items: center;
    min-width: 0;
    gap: 7px;
    font-size: .88em;
    font-weight: 600;
    color: inherit;
    white-space: nowrap;
}

.matezz-profile__row-icon {
    display: inline-flex;
    width: 15px;
    height: 15px;
    flex: 0 0 15px;
    color: var(--matezz-profile-accent);
}

.matezz-profile__meter {
    display: grid;
    grid-template-columns: repeat(5, minmax(13px, 1fr));
    gap: 4px;
    width: 100%;
    max-width: 190px;
}

.matezz-profile__segment {
    display: block;
    height: 8px;
    border-radius: 99px;
    background: var(--matezz-profile-track);
}

.matezz-profile__segment.is-active {
    background: var(--matezz-profile-accent);
}

.matezz-profile__value {
    min-width: 0;
    color: var(--matezz-profile-muted);
    font-size: .82em;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.matezz-profile__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--matezz-profile-border);
}

.matezz-profile__chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    min-height: 28px;
    padding: 5px 10px;
    border: 1px solid rgba(31, 106, 67, .10);
    border-radius: 999px;
    background: var(--matezz-profile-accent-soft);
    color: inherit;
    font-family: inherit;
    font-size: .79em;
    font-weight: 600;
    line-height: 1.15;
    white-space: nowrap;
}

.matezz-profile__chip-icon {
    display: inline-flex;
    width: 14px;
    height: 14px;
    flex: 0 0 14px;
    color: var(--matezz-profile-accent);
}

.matezz-profile__quiz {
    margin-top: 8px;
    padding-top: 1px;
    text-align: left;
}

.matezz-profile__quiz-link,
.matezz-profile__quiz-link:visited {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    color: var(--matezz-profile-accent) !important;
    font-family: inherit;
    font-size: .76em;
    font-weight: 600;
    line-height: 1.3;
    text-decoration: none;
    text-underline-offset: 2px;
    transition: opacity .16s ease, text-decoration-color .16s ease;
}

.matezz-profile__quiz-link:hover,
.matezz-profile__quiz-link:focus-visible {
    color: var(--matezz-profile-accent) !important;
    text-decoration: underline;
    outline: none;
}

.matezz-profile__quiz-link::after {
    content: "→";
    font-size: 1em;
    line-height: 1;
    transform: translateY(-.5px);
}

/* Mobile: keep the profile visible and compact; no accordion/progressive disclosure. */
@media (max-width: 767px) {
    .matezz-profile {
        padding: 12px 12px 11px;
        border-radius: 9px;
    }

    .matezz-profile__header {
        margin-bottom: 8px;
    }

    .matezz-profile__row {
        grid-template-columns: minmax(108px, 1.22fr) minmax(88px, 1fr) minmax(62px, .68fr);
        gap: 7px;
        min-height: 27px;
    }

    .matezz-profile__label {
        gap: 5px;
        font-size: .82em;
    }

    .matezz-profile__row-icon {
        width: 14px;
        height: 14px;
        flex-basis: 14px;
    }

    .matezz-profile__meter {
        gap: 3px;
    }

    .matezz-profile__segment {
        height: 7px;
    }

    .matezz-profile__value {
        font-size: .76em;
    }

    .matezz-profile__chips {
        gap: 5px;
        margin-top: 8px;
        padding-top: 8px;
    }

    .matezz-profile__chip {
        min-height: 27px;
        padding: 5px 9px;
        font-size: .76em;
    }
}

@media (max-width: 430px) {
    .matezz-profile__row {
        grid-template-columns: minmax(104px, 1.18fr) minmax(80px, .92fr) minmax(55px, .62fr);
        gap: 6px;
    }

    .matezz-profile__label {
        font-size: .79em;
    }

    .matezz-profile__value {
        font-size: .72em;
    }
}

@media (prefers-reduced-motion: reduce) {
    .matezz-profile__info-button {
        transition: none;
    }
}
