.dam-account-menu,
.dam-account-menu * {
    box-sizing: border-box;
}

.dam-account-menu {
    position: relative;
    display: inline-flex;
    align-items: center;
    z-index: 120;
}

.dam-account-trigger {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-width: 52px;
    min-height: 46px;
    margin: 0;
    padding: 2px 5px;
    color: #171527;
    background: transparent;
    border: 0;
    border-radius: 999px;
    cursor: pointer;
}

.dam-account-trigger:hover,
.dam-account-trigger:focus-visible {
    background: #f2f0ff;
    outline: none;
}

.dam-account-avatar-image,
.dam-account-summary img {
    display: block;
    width: 42px;
    height: 42px;
    margin: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 1px #dcd8f8, 0 4px 12px rgba(42, 31, 120, .14);
}

.dam-account-chevron {
    width: 7px;
    height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .2s ease;
}

.dam-account-menu.is-open .dam-account-chevron {
    transform: rotate(225deg) translate(-1px, -1px);
}

.dam-account-dropdown {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    display: none;
    width: 270px;
    padding: 8px;
    color: #171527;
    text-align: left;
    background: #fff;
    border: 1px solid #e6e4ef;
    border-radius: 14px;
    box-shadow: 0 18px 55px rgba(29, 24, 65, .18);
}

.dam-account-menu.is-open .dam-account-dropdown {
    display: block;
    animation: dam-account-dropdown-in .16s ease-out;
}

@keyframes dam-account-dropdown-in {
    from { opacity: 0; transform: translateY(-5px); }
    to { opacity: 1; transform: translateY(0); }
}

.dam-account-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    margin: 0 0 5px;
    padding: 10px 9px 13px;
    border-bottom: 1px solid #eeecf5;
}

.dam-account-summary img {
    width: 36px;
    height: 36px;
    flex: 0 0 36px;
}

.dam-account-summary span {
    display: flex;
    min-width: 0;
    flex-direction: column;
    line-height: 1.25;
}

.dam-account-summary strong,
.dam-account-summary small {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dam-account-summary strong { font-size: 13px; }
.dam-account-summary small { margin-top: 2px; color: #777386; font-size: 11px; }

.dam-account-dropdown > a {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 42px;
    padding: 9px 11px;
    color: #242033 !important;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none !important;
    border-radius: 9px;
}

.dam-account-dropdown > a:hover,
.dam-account-dropdown > a:focus-visible {
    color: #3924d6 !important;
    background: #f3f1ff;
    outline: none;
}

.dam-account-dropdown > a > span {
    display: grid;
    width: 22px;
    height: 22px;
    place-items: center;
    color: #5540dc;
    background: #ebe8ff;
    border-radius: 6px;
}

.dam-account-dropdown .dam-account-message-count {
    display: inline-grid;
    min-width: 21px;
    height: 21px;
    margin-left: auto;
    padding: 0 6px;
    place-items: center;
    color: #fff;
    font-size: 10px;
    line-height: 1;
    background: #d63638;
    border-radius: 999px;
}

.dam-account-dropdown > .dam-account-logout {
    margin-top: 4px;
    color: #b52d3c !important;
    border-top: 1px solid #eeecf5;
    border-radius: 0 0 9px 9px;
}

.dam-account-dropdown > .dam-account-logout > span {
    color: #b52d3c;
    background: #fff0f1;
}

.site-header-item[data-section="kadence_customizer_header_button"] {
    display: flex;
    align-items: center;
    gap: 9px;
}

/* Favorite controls on the existing marketplace cards. */
.dam-seller-favorite {
    cursor: pointer;
    transition: transform .18s ease, color .18s ease, background .18s ease, border-color .18s ease;
}

.dam-seller-favorite-card {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 4;
    display: grid;
    width: 38px;
    height: 38px;
    margin: 0;
    padding: 0;
    place-items: center;
    color: #302a43;
    font-size: 22px;
    line-height: 1;
    background: rgba(255, 255, 255, .94);
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 50%;
    box-shadow: 0 5px 18px rgba(19, 15, 46, .18);
    backdrop-filter: blur(6px);
}

.dam-seller-favorite-card:hover,
.dam-seller-favorite-card:focus-visible {
    color: #4430d9;
    transform: scale(1.06);
    outline: none;
}

.dam-seller-favorite.is-favorite {
    color: #fff;
    background: #4933df;
    border-color: #4933df;
}

.dam-seller-favorite[disabled] { cursor: wait; opacity: .65; }

.dam-seller-favorite-profile {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 7px;
}

.dam-seller-favorite-profile > span:first-child { font-size: 17px; }

/* Front-end account pages. */
.dam-account-page,
.dam-account-page * { box-sizing: border-box; }

.dam-account-page {
    width: min(1180px, calc(100% - 36px));
    margin: 52px auto 70px;
    color: #181525;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.dam-account-page a { color: inherit; }

.dam-account-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 30px;
    padding-bottom: 24px;
    border-bottom: 1px solid #e7e5ee;
}

.dam-account-page-header h1 {
    margin: 3px 0 5px;
    color: #161321;
    font-size: clamp(30px, 4vw, 44px);
    line-height: 1.08;
    letter-spacing: -.035em;
}

.dam-account-page-header p {
    margin: 0;
    color: #6e697c;
    font-size: 15px;
}

.dam-account-page-header > div > span,
.dam-account-kicker,
.dam-account-page-user > div > span {
    color: #4a34de;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.dam-account-page-user {
    display: flex;
    align-items: center;
    gap: 18px;
}

.dam-account-page-user > img {
    width: 72px;
    height: 72px;
    margin: 0;
    border: 3px solid #fff;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 1px #dcd8f5, 0 10px 26px rgba(46, 35, 126, .15);
}

.dam-account-primary-button,
.dam-account-secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 11px 20px;
    font-size: 13px;
    font-weight: 700;
    line-height: 1;
    text-decoration: none !important;
    border-radius: 8px;
    cursor: pointer;
}

.dam-account-primary-button {
    color: #fff !important;
    background: linear-gradient(135deg, #5638ef, #3520c5);
    border: 0;
    box-shadow: 0 8px 20px rgba(63, 43, 208, .18);
}

.dam-account-primary-button:hover { color: #fff !important; filter: brightness(1.06); }

.dam-account-secondary-button {
    color: #3425b8 !important;
    background: #fff;
    border: 1px solid #cfc9f0;
}

.dam-account-secondary-button:hover { background: #f5f3ff; }

.dam-favorite-seller-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 22px;
}

.dam-favorite-seller-card {
    overflow: hidden;
    background: #fff;
    border: 1px solid #e5e3eb;
    border-radius: 12px;
    box-shadow: 0 9px 28px rgba(34, 29, 66, .07);
    transition: transform .2s ease, box-shadow .2s ease;
}

.dam-favorite-seller-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 36px rgba(34, 29, 66, .12);
}

.dam-favorite-seller-cover {
    display: block;
    height: 190px;
    background: #e8e6ef;
}

.dam-favorite-seller-cover img {
    display: block;
    width: 100%;
    height: 100%;
    margin: 0;
    object-fit: cover;
}

.dam-favorite-seller-content {
    display: grid;
    grid-template-columns: 46px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    padding: 16px;
}

.dam-favorite-seller-avatar {
    width: 46px;
    height: 46px;
    margin: 0;
    border: 2px solid #fff;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 1px #ddd9eb;
}

.dam-favorite-seller-content h2 {
    margin: 0 0 3px;
    font-size: 15px;
    line-height: 1.25;
}

.dam-favorite-seller-content h2 a { text-decoration: none; }
.dam-favorite-seller-content p { margin: 0; color: #777182; font-size: 11px; }
.dam-favorite-seller-rating { color: #f09b2b; font-size: 11px; font-weight: 800; white-space: nowrap; }

.dam-favorite-seller-actions {
    display: grid;
    grid-template-columns: 1fr auto;
    border-top: 1px solid #eceaf1;
}

.dam-favorite-seller-actions a,
.dam-favorite-seller-actions button {
    min-height: 44px;
    margin: 0;
    padding: 12px 14px;
    color: #3324ba;
    font-size: 11px;
    font-weight: 700;
    text-align: center;
    text-decoration: none;
    background: #fff;
    border: 0;
    cursor: pointer;
}

.dam-favorite-seller-actions button {
    color: #8e8898;
    border-left: 1px solid #eceaf1;
}

.dam-favorite-seller-actions a:hover { background: #f6f4ff; }
.dam-favorite-seller-actions button:hover { color: #b82d3d; background: #fff5f6; }

.dam-account-empty {
    display: grid;
    min-height: 310px;
    padding: 48px 25px;
    place-items: center;
    align-content: center;
    text-align: center;
    background: #faf9fd;
    border: 1px dashed #d6d1e5;
    border-radius: 14px;
}

.dam-account-empty[hidden] { display: none !important; }
.dam-account-empty > span { color: #4d37df; font-size: 42px; line-height: 1; }
.dam-account-empty h2 { margin: 14px 0 5px; font-size: 21px; }
.dam-account-empty p { max-width: 540px; margin: 0 0 20px; color: #716c7b; font-size: 14px; }

.dam-settings-form { display: grid; gap: 22px; }

.dam-settings-card {
    display: grid;
    grid-template-columns: minmax(210px, .65fr) minmax(0, 1.6fr);
    gap: 34px;
    padding: 28px;
    background: #fff;
    border: 1px solid #e5e3eb;
    border-radius: 12px;
    box-shadow: 0 8px 28px rgba(34, 29, 66, .05);
}

.dam-settings-card-heading { grid-row: 1 / span 3; }
.dam-settings-card-heading h2 { margin: 0 0 6px; font-size: 19px; }
.dam-settings-card-heading p { margin: 0; color: #777181; font-size: 13px; line-height: 1.5; }

.dam-avatar-setting {
    display: flex;
    align-items: center;
    gap: 20px;
}

.dam-avatar-setting > img {
    width: 84px;
    height: 84px;
    margin: 0;
    flex: 0 0 84px;
    border: 3px solid #fff;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 0 0 1px #d9d5ea;
}

.dam-avatar-setting label,
.dam-settings-field {
    display: grid;
    gap: 7px;
    color: #282433;
    font-size: 12px;
    font-weight: 700;
}

.dam-avatar-setting input[type="file"] {
    max-width: 100%;
    color: #696474;
    font-size: 12px;
}

.dam-avatar-setting small { color: #898492; font-size: 10px; font-weight: 400; }

.dam-settings-field input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    color: #201d29;
    background: #fff;
    border: 1px solid #d9d6e1;
    border-radius: 7px;
    outline: none;
}

.dam-settings-field input:focus { border-color: #5842df; box-shadow: 0 0 0 3px rgba(88, 66, 223, .1); }

.dam-subscription-list { display: grid; gap: 8px; }

.dam-subscription-row {
    display: grid;
    grid-template-columns: auto 40px minmax(0, 1fr) auto;
    align-items: center;
    gap: 11px;
    margin: 0;
    padding: 10px 12px;
    border: 1px solid #e5e2ec;
    border-radius: 8px;
    cursor: pointer;
}

.dam-subscription-row:hover { background: #faf9ff; border-color: #d4cef4; }
.dam-subscription-row input { width: 16px; height: 16px; accent-color: #4933da; }
.dam-subscription-row img { width: 40px; height: 40px; margin: 0; border-radius: 50%; object-fit: cover; }
.dam-subscription-row span { display: grid; line-height: 1.35; }
.dam-subscription-row strong { font-size: 12px; }
.dam-subscription-row small { color: #817b89; font-size: 10px; }
.dam-subscription-row em { color: #4933da; font-size: 10px; font-style: normal; font-weight: 700; }

.dam-notification-option {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-top: 10px;
    padding: 14px;
    background: #f6f4ff;
    border-radius: 8px;
    cursor: pointer;
}

.dam-notification-option input { width: 17px; height: 17px; margin-top: 2px; accent-color: #4933da; }
.dam-notification-option span { display: grid; gap: 2px; }
.dam-notification-option strong { font-size: 12px; }
.dam-notification-option small { color: #746e82; font-size: 10px; }
.dam-settings-muted { margin: 0; color: #756f7d; font-size: 13px; }
.dam-settings-muted a { color: #402ccd; font-weight: 700; }

.dam-settings-form > .dam-account-primary-button {
    justify-self: end;
    min-width: 210px;
}

.dam-account-notice {
    margin: 0 0 20px;
    padding: 13px 15px;
    color: #332b61;
    background: #f2f0ff;
    border-left: 3px solid #5a43e5;
    border-radius: 5px;
    font-size: 13px;
}

.dam-account-notice.is-success { color: #176742; background: #effaf4; border-left-color: #2c9c68; }
.dam-account-notice.is-error { color: #8d2533; background: #fff2f3; border-left-color: #d74a5c; }
.dam-account-notice a { font-weight: 700; }

@media (max-width: 900px) {
    .dam-favorite-seller-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .dam-settings-card { grid-template-columns: 1fr; gap: 20px; }
    .dam-settings-card-heading { grid-row: auto; }
}

@media (max-width: 620px) {
    .dam-account-menu .dam-account-chevron { display: none; }
    .dam-account-trigger { min-width: 104px; min-height: 104px; padding: 1px; }
    .dam-account-avatar-image { width: 100px; height: 100px; }
    .dam-account-dropdown { position: fixed; top: 70px; right: 12px; width: min(290px, calc(100vw - 24px)); }
    .dam-account-page { width: min(100% - 24px, 1180px); margin: 30px auto 48px; }
    .dam-account-page-header { align-items: flex-start; flex-direction: column; }
    .dam-account-page-header h1 { font-size: 32px; }
    .dam-account-page-user { align-items: flex-start; }
    .dam-account-page-user > img { width: 58px; height: 58px; }
    .dam-favorite-seller-grid { grid-template-columns: 1fr; }
    .dam-favorite-seller-cover { height: 210px; }
    .dam-settings-card { padding: 20px; }
    .dam-avatar-setting { align-items: flex-start; flex-direction: column; }
    .dam-subscription-row { grid-template-columns: auto 36px minmax(0, 1fr); }
    .dam-subscription-row em { display: none; }
    .dam-settings-form > .dam-account-primary-button { width: 100%; justify-self: stretch; }
}
