/* Custom account profile DOB picker, isolated from registration styles. */
.account-dob-trigger {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    width: 100%; min-height: 42px; padding: .5rem .75rem;
    border: 1px solid #ced4da; border-radius: .375rem;
    background: #fff; color: var(--theme-text); text-align: left; cursor: pointer;
}
.account-dob-trigger:hover { border-color: #078b54; }
.account-dob-trigger:focus-visible, .account-dob-dialog button:focus-visible {
    outline: 3px solid rgba(7,139,84,.24); outline-offset: 2px;
}
.account-dob-trigger i { color: #078b54; }
.account-dob-placeholder { color: var(--theme-muted); }
.account-dob-overlay[hidden], .account-dob-toolbar [hidden] { display: none !important; }
.account-dob-overlay {
    position: fixed; inset: 0; z-index: 2100;
    display: flex; align-items: center; justify-content: center;
    background: rgba(15, 30, 24, .5); padding: 16px;
}
.account-dob-dialog {
    width: min(420px, 100%); max-height: calc(100vh - 32px);
    max-height: calc(100dvh - 32px); overflow-y: auto;
    background: #fff; border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2); padding: 20px; color: var(--theme-text);
}
.account-dob-header { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.account-dob-kicker { color: #078b54; font-size: .75rem; font-weight: 700; letter-spacing: .03em; }
.account-dob-header h3 { font-size: 1.2rem; font-weight: 700; margin: 4px 0 0; }
.account-dob-close {
    background: #f2f5f3; border: 0; border-radius: 50%; color: var(--theme-text);
    width: 36px; height: 36px; font-size: 1.45rem; line-height: 1;
}
.account-dob-toolbar { display: flex; justify-content: space-between; align-items: center; min-height: 48px; margin-top: 12px; }
.account-dob-year-nav { display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; }
.account-dob-year-nav strong { min-width: 116px; text-align: center; font-size: .92rem; }
.account-dob-year-nav button, .account-dob-back, .account-dob-clear {
    border: 0; background: transparent; color: #087b4c; border-radius: 8px; padding: 7px 10px;
}
.account-dob-year-nav button { font-size: 1.5rem; min-width: 40px; }
.account-dob-year-nav button:disabled { color: #adb5bd; cursor: not-allowed; }
.account-dob-options { display: grid; gap: 8px; margin-top: 12px; }
.account-dob-years { grid-template-columns: repeat(4,minmax(0,1fr)); }
.account-dob-months { grid-template-columns: repeat(3,minmax(0,1fr)); }
.account-dob-days { grid-template-columns: repeat(7,minmax(0,1fr)); gap: 5px; }
.account-dob-option {
    border: 1px solid #e4ebe6; border-radius: 9px; min-height: 44px;
    background: #f7faf8; color: var(--theme-text); font-size: .92rem; cursor: pointer;
}
.account-dob-option:hover { background: #e4f5ec; border-color: #078b54; }
.account-dob-option[aria-pressed="true"] { background: #078b54; border-color: #078b54; color: #fff; }
.account-dob-option:disabled { opacity: .3; cursor: not-allowed; }
.account-dob-days .account-dob-option { min-height: 40px; }
.account-dob-footer {
    border-top: 1px solid #edf1ee; margin-top: 18px; padding-top: 10px;
    display: flex; justify-content: space-between; align-items: center; gap: 12px;
    font-size: .8rem; color: var(--theme-muted);
}
@media (max-width: 575.98px) {
    .account-dob-overlay { align-items: flex-end; padding: 0; }
    .account-dob-dialog {
        width: 100%; max-height: calc(100vh - 20px); max-height: calc(100dvh - 20px);
        border-radius: 20px 20px 0 0; padding: 20px 16px 24px;
    }
    .account-dob-option { min-height: 46px; }
}

/* Keep the DOB trigger consistent with other profile inputs. */
#profile-section .profile-input-wrap .account-dob-trigger {
    display: flex;
    width: 100%;
    min-height: 46px;
    align-items: center;
    justify-content: space-between;
    gap: 9px;
    padding: 9px 13px 9px 40px;
    border: 1px solid #dce6e0;
    border-radius: 12px;
    background: #fff;
    color: var(--theme-text);
    text-align: left;
    font-weight: 400;
    font-size: inherit;
    line-height: 1.5;
    cursor: pointer;
}
#profile-section .profile-input-wrap .account-dob-trigger:hover { border-color: #66b691; }
#profile-section .profile-input-wrap .account-dob-trigger:focus-visible {
    outline: 0;
    border-color: #66b691;
    box-shadow: 0 0 0 3px rgba(7, 139, 84, .09);
}
#profile-section .profile-input-wrap .account-dob-trigger > span { min-width: 0; }

/* Swipeable year selection with visible vertical scrollbar. */
.account-dob-year-nav {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 3px;
    min-width: 0;
}
.account-dob-year-hint {
    color: var(--theme-muted);
    font-size: .78rem;
    text-align: center;
}
.account-dob-years {
    position: relative;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-content: start;
    max-height: 300px;
    overflow-y: scroll;
    overscroll-behavior-y: contain;
    touch-action: pan-y;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    scrollbar-width: auto;
    scrollbar-color: #078b54 #e9f3ed;
    padding: 3px 5px 3px 1px;
}
.account-dob-years::-webkit-scrollbar { width: 10px; }
.account-dob-years::-webkit-scrollbar-track {
    background: #e9f3ed;
    border-radius: 10px;
}
.account-dob-years::-webkit-scrollbar-thumb {
    background: #078b54;
    border: 2px solid #e9f3ed;
    border-radius: 10px;
}
@media (max-width: 575.98px) {
    .account-dob-years { max-height: min(310px, 42vh); max-height: min(310px, 42dvh); }
}
