.awcf-hm-account {
    max-width: 860px;
    margin: 2rem auto;
    padding: 2rem;
    background: #fff;
    border: 1px solid var(--hm-color-line);
    border-radius: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.05);
    font-family: inherit;
    color: var(--hm-color-navy);

    & .awcf-hm-account__greeting {
        margin: 0 0 1rem;
        font-size: 1.5rem;
        color: var(--hm-color-navy);
    }

    & .awcf-hm-account__message {
        padding: 0.75rem 1rem;
        margin-bottom: 1rem;
        border-radius: 4px;
        font-size: 0.9rem;
        line-height: 1.4;

        &.awcf-hm-account__message--error {
            background: #fdecea;
            color: #b3261e;
            border: 1px solid #f5c6c3;
        }

        &.awcf-hm-account__message--success {
            background: #e8f5e9;
            color: #1b5e20;
            border: 1px solid #b9dfbb;
        }
    }

    & .awcf-hm-account__tabs {
        display: flex;
        flex-wrap: wrap;
        gap: 0.25rem;
        margin-bottom: 1.5rem;
        border-bottom: 2px solid var(--hm-color-line);

        & .awcf-hm-account__tab {
            padding: 0.65rem 1.1rem;
            font-size: 0.95rem;
            font-weight: 600;
            color: #555;
            text-decoration: none;
            border-bottom: 3px solid transparent;
            margin-bottom: -2px;
            transition: color 0.15s ease, border-color 0.15s ease;

            &:hover {
                color: var(--hm-color-navy);
            }

            &.is-active {
                color: var(--hm-color-gold);
                border-bottom-color: var(--hm-color-gold);
            }
        }
    }

    & .awcf-hm-account__section {
        display: none;
        padding: 0.25rem 0 1rem;

        &.is-active {
            display: block;
        }

        & h3 {
            margin: 0 0 1rem;
            font-size: 1.2rem;
            color: var(--hm-color-navy);
        }

        & h4 {
            margin: 1.25rem 0 0.75rem;
            font-size: 1rem;
            color: var(--hm-color-navy);
        }
    }

    & .awcf-hm-account__intro {
        margin: 0 0 1rem;
        font-size: 0.9rem;
        color: #555;
        line-height: 1.5;
    }

    & .awcf-hm-account__kvk-block {
        padding: 1rem 1.2rem;
        background: #f5f7fb;
        border: 1px solid var(--hm-color-line);
        border-radius: 6px;
        margin-bottom: 1.5rem;

        & h4 {
            margin-top: 0;
        }
    }

    & .awcf-hm-account__kvk-list {
        display: grid;
        grid-template-columns: 180px 1fr;
        gap: 0.35rem 1rem;
        margin: 0;

        & dt {
            font-weight: 600;
            color: #555;
        }

        & dd {
            margin: 0;
            color: var(--hm-color-navy);
        }
    }

    & .awcf-hm-account__kvk-note {
        margin: 1rem 0 0;
        font-size: 0.8rem;
        color: #777;

        & a {
            color: var(--hm-color-navy);
            text-decoration: underline;
        }
    }

    & .awcf-hm-account__form {
        display: flex;
        flex-direction: column;
        gap: 1rem;
    }

    & .awcf-hm-account__form-row {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 1rem;

        @media (max-width: 620px) {
            grid-template-columns: 1fr;
        }
    }

    & .awcf-hm-account__form-group {
        display: flex;
        flex-direction: column;
        gap: 0.35rem;

        & label,
        & legend {
            font-size: 0.85rem;
            font-weight: 600;
            color: #333;
        }

        & input[type="text"],
        & input[type="email"],
        & input[type="tel"],
        & input[type="password"] {
            width: 100%;
            padding: 0.65rem 0.85rem;
            font-size: 1rem;
            border: 1px solid var(--hm-color-line);
            border-radius: 4px;
            background: #fcfcfd;
            transition: border-color 0.15s ease, box-shadow 0.15s ease;

            &:focus {
                border-color: var(--hm-color-gold);
                box-shadow: 0 0 0 3px rgba(157, 129, 0, 0.18);
                outline: none;
            }
        }

        &.awcf-hm-account__form-group--radios {
            border: none;
            padding: 0;
            display: flex;
            flex-wrap: wrap;
            gap: 0.85rem 1.25rem;
            align-items: center;

            & legend {
                width: 100%;
            }
        }

        &.awcf-hm-account__form-group--checkbox {
            flex-direction: row;
            align-items: center;
            gap: 0.5rem;

            & label {
                display: flex;
                gap: 0.5rem;
                align-items: center;
                font-weight: 500;
                cursor: pointer;
            }
        }
    }

    & .awcf-hm-account__radio {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        font-size: 0.9rem;
        color: #444;
        cursor: pointer;
    }

    & .awcf-hm-account__password {
        padding: 0.85rem 1rem;
        border: 1px dashed var(--hm-color-line);
        border-radius: 6px;
        background: #fafbfd;

        & summary {
            cursor: pointer;
            font-weight: 600;
            color: var(--hm-color-navy);
        }

        & .awcf-hm-account__form-group {
            margin-top: 0.75rem;
        }
    }

    & .awcf-hm-account__submit {
        align-self: flex-start;
        padding: 0.75rem 1.25rem;
        background: var(--hm-color-gold);
        color: #fff;
        border: none;
        border-radius: 4px;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        text-decoration: none;
        transition: background-color 0.15s ease;

        &:hover {
            background: var(--hm-color-navy);
        }

        &:disabled {
            opacity: 0.6;
            cursor: not-allowed;
        }

        &.awcf-hm-account__submit--secondary {
            background: var(--hm-color-navy);

            &:hover {
                background: var(--hm-color-gold);
            }
        }
    }

    & .awcf-hm-account__chips {
        display: flex;
        flex-wrap: wrap;
        gap: 0.75rem;
        margin-bottom: 1rem;
    }

    & .awcf-hm-account__chip-wrap {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        padding: 0.85rem;
        border: 1px solid var(--hm-color-line);
        border-radius: 8px;
        background: #fafbfd;
        min-width: 220px;
        flex: 1 1 220px;
        transition: border-color 0.15s ease, background 0.15s ease;

        & .awcf-hm-account__chip {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            padding: 0.5rem 0.9rem;
            font-size: 0.9rem;
            font-weight: 600;
            color: var(--hm-color-navy);
            background: var(--hm-color-line);
            border: 1px solid var(--hm-color-line);
            border-radius: 999px;
            cursor: pointer;
            transition: background 0.15s ease, color 0.15s ease;
        }

        &.is-selected {
            border-color: var(--hm-color-gold);
            background: #fff6f1;

            & .awcf-hm-account__chip {
                background: var(--hm-color-gold);
                color: #fff;
                border-color: var(--hm-color-gold);
            }
        }
    }

    & .awcf-hm-account__chip-details {
        display: flex;
        flex-direction: column;
        gap: 0.4rem;

        & label {
            display: flex;
            flex-direction: column;
            gap: 0.2rem;
            font-size: 0.8rem;
            color: #555;

            & input {
                padding: 0.45rem 0.6rem;
                font-size: 0.9rem;
                border: 1px solid var(--hm-color-line);
                border-radius: 4px;
                background: #fff;
            }
        }

        &[hidden] {
            display: none;
        }
    }

    & .awcf-hm-account__wholesaler-request {
        margin-top: 1.5rem;
        padding-top: 1rem;
        border-top: 1px solid var(--hm-color-line);

        & textarea {
            width: 100%;
            padding: 0.65rem 0.85rem;
            font-size: 0.95rem;
            border: 1px solid var(--hm-color-line);
            border-radius: 4px;
            background: #fcfcfd;
            min-height: 90px;
            margin-bottom: 0.75rem;

            &:focus {
                border-color: var(--hm-color-gold);
                outline: none;
                box-shadow: 0 0 0 3px rgba(157, 129, 0, 0.18);
            }
        }
    }

    & .awcf-hm-account__entries {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.9rem;

        & thead th {
            text-align: left;
            padding: 0.65rem 0.6rem;
            background: #f5f7fb;
            border-bottom: 2px solid var(--hm-color-line);
            color: #555;
            font-weight: 600;
        }

        & tbody td {
            padding: 0.7rem 0.6rem;
            border-bottom: 1px solid #eef0f4;
            vertical-align: middle;
        }
    }

    & .awcf-hm-account__badge {
        display: inline-block;
        padding: 0.2rem 0.55rem;
        font-size: 0.75rem;
        font-weight: 600;
        border-radius: 999px;

        &.awcf-hm-account__badge--new {
            background: #e8f5e9;
            color: #1b5e20;
        }

        &.awcf-hm-account__badge--resent {
            background: #fff6f1;
            color: var(--hm-color-gold);
        }
    }

    & .awcf-hm-account__resend-btn {
        padding: 0.45rem 0.75rem;
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--hm-color-navy);
        background: #fff;
        border: 1px solid var(--hm-color-line);
        border-radius: 4px;
        cursor: pointer;

        &:hover {
            color: var(--hm-color-gold);
            border-color: var(--hm-color-gold);
        }

        &:disabled {
            opacity: 0.5;
            cursor: not-allowed;
        }
    }

    & .awcf-hm-account__dash {
        color: #aaa;
    }

    & .awcf-hm-account__logout-link {
        display: inline-block;
    }

    &.awcf-hm-account--logged-out {
        padding: 1.5rem;
        text-align: center;

        & a {
            color: var(--hm-color-gold);
            font-weight: 600;
        }
    }
}

@media (max-width: 620px) {
    .awcf-hm-account {
        padding: 1.25rem;
        margin: 1rem 0;
        border-radius: 0;
        border-left: none;
        border-right: none;
        box-shadow: none;

        & .awcf-hm-account__kvk-list {
            grid-template-columns: 1fr;

            & dt {
                margin-top: 0.5rem;
            }
        }

        & .awcf-hm-account__entries {
            display: block;
            overflow-x: auto;
        }
    }
}

/* r17: groothandel-zoekfilter op mijn-account (alleen gekozen tonen, zoeken toont overige) */
.awcf-hm-account__ws-hint { margin: .25em 0 .5em; opacity: .8; font-size: .95rem; }
.awcf-hm-account__ws-search { width: 100%; max-width: 420px; padding: .6em .9em; margin: 0 0 1em; border: 1px solid var(--hm-color-lijn, #e7e3d4); border-radius: 8px; font: inherit; }
.awcf-hm-account__chips.is-searchable .awcf-hm-account__chip-wrap:not(.is-selected):not(.is-match) { display: none; }
