
.amm-directory,.amm-profile-form,.amm-login{max-width:1200px;margin:20px auto}.amm-directory-filters{display:grid;grid-template-columns:2fr 1fr 1fr 1fr auto auto;gap:10px;margin-bottom:20px}.amm-directory-filters input,.amm-directory-filters select,.amm-directory-filters button,.amm-directory-filters a,.amm-profile-form input,.amm-profile-form button,.amm-login input{padding:10px}.amm-directory-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.amm-member-card{border:1px solid #ddd;border-radius:8px;padding:18px;background:#fff}.amm-card-head{display:flex;gap:18px;align-items:center;margin-bottom:15px}.amm-card-head h3{margin:0}.amm-member-photo{width:110px;height:110px;object-fit:cover;border-radius:6px}.amm-member-details p{margin:7px 0}.amm-profile-form .amm-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:15px}.amm-profile-form label{display:block;font-weight:600;margin-bottom:5px}.amm-profile-form input{width:100%;box-sizing:border-box}.amm-children-table{width:100%;border-collapse:collapse}.amm-children-table th,.amm-children-table td{padding:8px;border:1px solid #ddd}.amm-children-table input{width:100%;box-sizing:border-box}.amm-notice,.amm-success{padding:14px;border:1px solid #ddd;background:#f7f7f7}.amm-success{margin-bottom:15px}@media(max-width:900px){.amm-directory-filters,.amm-directory-grid,.amm-profile-form .amm-grid{grid-template-columns:1fr}}

/* Theme compatibility: Evolv/dark theme can inherit white text into the white member card. */
.amm-directory .amm-member-card,
.amm-directory .amm-member-card * {
    color: #333 !important;
}
.amm-directory .amm-member-card h3 {
    color: #d9b24c !important;
}
.amm-directory .amm-member-card strong {
    color: #222 !important;
}
.amm-directory .amm-member-card a {
    color: #1b5fa7 !important;
}
.amm-directory .amm-member-details {
    color: #333 !important;
    line-height: 1.55;
}
.amm-directory .amm-member-details p {
    color: #333 !important;
}
.amm-directory .amm-member-details ul,
.amm-directory .amm-member-details li {
    color: #333 !important;
}

/* v2.6 - Force readable black text on profile action buttons and update messages.
   Evolv/dark-theme styles can otherwise inherit white button text. */
.amm-profile-form button,
.amm-profile-form input[type="submit"],
.amm-profile-form .button,
.amm-profile-form a.button,
.amm-profile-form .amm-remove-child,
.amm-profile-form #amm-front-add-child {
    color: #000000 !important;
    text-shadow: none !important;
}

.amm-profile-form button:hover,
.amm-profile-form input[type="submit"]:hover,
.amm-profile-form .button:hover,
.amm-profile-form a.button:hover,
.amm-profile-form .amm-remove-child:hover,
.amm-profile-form #amm-front-add-child:hover {
    color: #000000 !important;
}

.amm-profile-form .amm-success {
    color: #000000 !important;
    background: #f7f7f7 !important;
}

.amm-profile-form .amm-success *,
.amm-profile-form .amm-notice,
.amm-profile-form .amm-notice * {
    color: #000000 !important;
}

/* v2.7 - Member area navigation */
.amm-member-nav{
    display:flex;
    align-items:center;
    gap:28px;
    margin:0 0 28px;
    padding:0 0 10px;
    border-bottom:1px solid rgba(255,255,255,.35);
    flex-wrap:wrap;
}
.amm-member-nav a{
    color:#ffffff !important;
    text-decoration:none !important;
    font-weight:600;
    font-size:15px;
    letter-spacing:.3px;
    padding:5px 0;
}
.amm-member-nav a:hover,
.amm-member-nav a.amm-active{
    color:#e5c35a !important;
}
.amm-member-nav a.amm-active{
    border-bottom:2px solid #e5c35a;
}
.amm-member-nav a.amm-logout{
    margin-left:auto;
}
@media(max-width:700px){
    .amm-member-nav{gap:16px}
    .amm-member-nav a{font-size:13px}
    .amm-member-nav a.amm-logout{margin-left:0}
}

/* v3.0 - Front-end Add Member for linked administrators */
.amm-directory-admin-actions{margin:0 0 20px}
.amm-add-button{display:inline-block;box-sizing:border-box;padding:10px 18px;border:1px solid #c9a83e;background:#e5c35a;color:#000000 !important;text-decoration:none !important;font-weight:700;cursor:pointer;text-shadow:none !important}
.amm-add-button:hover,.amm-add-button:focus{color:#000000 !important;text-decoration:none !important}
.amm-directory-success{color:#000000 !important;margin-bottom:18px}
.amm-front-add-member{max-width:1000px;margin:0 auto}
.amm-front-add-header{display:flex;justify-content:space-between;align-items:center;gap:20px;margin-bottom:25px}
.amm-front-add-header h2{margin:0}
.amm-front-add-header a{color:#e5c35a !important}
.amm-add-member-form h3{margin:25px 0 12px;padding-bottom:7px;border-bottom:1px solid rgba(255,255,255,.3)}
.amm-add-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px}
.amm-add-grid p{margin:0}
.amm-add-member-form label{display:block;margin-bottom:6px;font-weight:600}
.amm-add-member-form label span{color:#e5c35a}
.amm-add-member-form input:not([type="checkbox"]),.amm-add-member-form select{width:100%;box-sizing:border-box;padding:10px}
.amm-add-member-form .amm-checkbox{display:flex;align-items:center;gap:8px}
.amm-add-member-form .amm-checkbox input[type="checkbox"]{width:auto}
.amm-add-photo{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
#amm-front-add-photo-preview{width:110px;height:110px;border:1px solid #ccc;background:#fff;display:flex;align-items:center;justify-content:center;overflow:hidden}
#amm-front-add-photo-preview img{max-width:100%;max-height:100%}
.amm-add-children-table{width:100%;border-collapse:collapse}
.amm-add-children-table th,.amm-add-children-table td{padding:8px;border:1px solid rgba(255,255,255,.25)}
.amm-add-children-table input{width:100%;box-sizing:border-box;padding:8px}
.amm-add-actions{display:flex;gap:12px;margin-top:30px}
.amm-add-error{padding:14px;margin-bottom:18px;background:#f7f7f7;border:1px solid #ddd;color:#000000 !important}
.amm-add-error *{color:#000000 !important}
.amm-cancel-member{background:#f7f7f7;border-color:#bbb}
@media(max-width:700px){.amm-add-grid{grid-template-columns:1fr}.amm-front-add-header{align-items:flex-start;flex-direction:column}}

.amm-directory-admin-actions{display:flex;gap:10px;flex-wrap:wrap;margin:0 0 20px}
.amm-member-selector{display:flex;align-items:end;gap:12px;flex-wrap:wrap;margin-bottom:25px;padding:18px;background:rgba(255,255,255,.08)}
.amm-member-selector label{display:block;margin-bottom:6px}
.amm-member-selector select{min-width:320px;padding:10px}
.amm-front-edit-member{max-width:1000px;margin:0 auto}
.amm-edit-member-form{margin-top:10px}

.amm-front-edit-member .amm-add-error{color:#000000 !important;background:#fff4f4;border-color:#d6aaaa}


/* v3.7.1 - Directory card layout fix.
   The site theme applies generic article/layout rules that can override the
   plugin grid after the family/emergency fields were added. Reset those rules
   inside the directory and explicitly size each card as a grid item. */
.amm-directory .amm-directory-grid{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:20px !important;
    width:100% !important;
    align-items:start !important;
}
.amm-directory .amm-member-card{
    display:block !important;
    position:relative !important;
    float:none !important;
    clear:none !important;
    width:auto !important;
    min-width:0 !important;
    max-width:none !important;
    height:auto !important;
    min-height:0 !important;
    margin:0 !important;
    padding:18px !important;
    box-sizing:border-box !important;
    overflow:hidden !important;
    grid-column:auto !important;
    grid-row:auto !important;
}
.amm-directory .amm-card-head{
    display:flex !important;
    width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
    margin:0 0 15px !important;
    padding:0 !important;
    align-items:center !important;
    gap:14px !important;
}
.amm-directory .amm-card-head h3{
    min-width:0 !important;
    margin:0 !important;
    padding:0 !important;
    overflow-wrap:anywhere !important;
}
.amm-directory .amm-member-photo{
    flex:0 0 90px !important;
    width:90px !important;
    height:90px !important;
    max-width:90px !important;
    object-fit:cover !important;
}
.amm-directory .amm-member-details{
    display:block !important;
    width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
    margin:0 !important;
    padding:0 !important;
    overflow-wrap:anywhere !important;
    word-break:normal !important;
}
.amm-directory .amm-member-details p{
    margin:6px 0 !important;
    padding:0 !important;
}
.amm-directory .amm-member-details ul{
    margin:5px 0 8px 18px !important;
    padding:0 !important;
}
.amm-directory .amm-member-details li{
    margin:3px 0 !important;
    padding:0 !important;
}
@media(max-width:900px){
    .amm-directory .amm-directory-grid{grid-template-columns:1fr !important}
}


/* v3.7.3 - Member self-service profile photo upload */
.amm-profile-photo-section{margin:0 0 28px;padding:20px;border:1px solid rgba(255,255,255,.25);border-radius:6px;background:rgba(255,255,255,.05)}
.amm-profile-photo-wrap{display:flex;align-items:center;gap:24px;flex-wrap:wrap}
.amm-profile-photo-preview{width:150px;height:150px;display:flex;align-items:center;justify-content:center;overflow:hidden;background:#fff;border-radius:6px}
.amm-profile-photo-preview img{display:block;width:100%;height:100%;object-fit:cover}
.amm-profile-photo-controls{display:flex;flex-direction:column;gap:8px;max-width:520px}
.amm-profile-photo-controls input[type=file]{background:#fff;color:#000;padding:8px;border-radius:3px}
.amm-profile-photo-controls small{font-size:12px;line-height:1.4}
.amm-remove-profile-photo{display:flex!important;align-items:center;gap:6px}
.amm-remove-profile-photo input{width:auto!important}


/* v3.7.4 - Profile layout correction.
   The profile's main personal-information grid must contain only its fields.
   Section headings and family tables are full-width blocks outside that grid. */
.amm-profile-form{box-sizing:border-box}
.amm-profile-form>.amm-grid{
    display:grid !important;
    grid-template-columns:repeat(2,minmax(0,1fr)) !important;
    gap:16px !important;
    width:100% !important;
    margin:0 !important;
    padding:0 !important;
    align-items:start !important;
}
.amm-profile-form>.amm-grid>p{
    width:auto !important;
    min-width:0 !important;
    margin:0 !important;
    padding:0 !important;
    float:none !important;
    clear:none !important;
}
.amm-profile-form>h3{
    display:block !important;
    width:100% !important;
    clear:both !important;
    float:none !important;
    box-sizing:border-box !important;
    margin:28px 0 12px !important;
}
.amm-profile-form>.amm-children-table,
.amm-profile-form>p{
    box-sizing:border-box;
}
.amm-profile-form .amm-children-table{
    width:100% !important;
    table-layout:auto !important;
    clear:both !important;
}
.amm-profile-form .amm-children-table th,
.amm-profile-form .amm-children-table td{
    vertical-align:middle !important;
}
.amm-profile-form .amm-grid input:not([type="checkbox"]),
.amm-profile-form .amm-grid select{
    width:100% !important;
    max-width:100% !important;
    box-sizing:border-box !important;
}
@media(max-width:700px){
    .amm-profile-form>.amm-grid{grid-template-columns:1fr !important}
    .amm-profile-form .amm-children-table{display:block;overflow-x:auto}
    .amm-profile-form .amm-children-table table{min-width:620px}
}


/* v3.8.0 - Profile section hierarchy */
.amm-profile-form>h3{
    font-size:20px !important;
    line-height:1.3 !important;
    margin-top:30px !important;
    margin-bottom:14px !important;
}
.amm-profile-form>h4{
    display:block !important;
    width:100% !important;
    clear:both !important;
    margin:18px 0 10px !important;
    font-size:16px !important;
    line-height:1.3 !important;
}
.amm-profile-form .amm-grid + h3{
    margin-top:30px !important;
}
.amm-profile-form .amm-profile-photo-section h3{
    margin-top:0 !important;
}
.amm-profile-form button:disabled{
    opacity:.55 !important;
    cursor:not-allowed !important;
}

/* v3.9.0 - Compact Member Directory cards and dedicated member details view */
.amm-directory .amm-directory-grid{
    grid-template-columns:repeat(3,minmax(0,1fr)) !important;
    gap:18px !important;
    align-items:stretch !important;
}
.amm-directory .amm-member-card{
    display:flex !important;
    flex-direction:column !important;
    min-height:0 !important;
    padding:16px !important;
    border-radius:8px !important;
    box-shadow:0 2px 8px rgba(0,0,0,.08) !important;
}
.amm-directory .amm-card-head{
    align-items:center !important;
    gap:14px !important;
    margin-bottom:14px !important;
}
.amm-directory .amm-card-photo-wrap{
    flex:0 0 92px !important;
}
.amm-directory .amm-member-photo,
.amm-directory .amm-member-photo-placeholder{
    width:92px !important;
    height:92px !important;
    max-width:92px !important;
    border-radius:50% !important;
    object-fit:cover !important;
}
.amm-directory .amm-member-photo-placeholder{
    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    background:#eeeeee !important;
    color:#555555 !important;
    font-size:12px !important;
    text-align:center !important;
}
.amm-directory .amm-card-title{
    min-width:0 !important;
}
.amm-directory .amm-card-title h3{
    margin:0 !important;
    font-size:19px !important;
    line-height:1.25 !important;
    overflow-wrap:anywhere !important;
}
.amm-directory .amm-member-summary{
    flex:1 1 auto !important;
    padding-top:2px !important;
}
.amm-directory .amm-member-summary p{
    margin:7px 0 !important;
    line-height:1.4 !important;
    overflow-wrap:anywhere !important;
}
.amm-directory .amm-member-summary a{
    color:#1b5fa7 !important;
    text-decoration:none !important;
}
.amm-directory .amm-member-summary a:hover{
    text-decoration:underline !important;
}
.amm-directory .amm-card-actions{
    margin-top:14px !important;
    padding-top:12px !important;
    border-top:1px solid #e3e3e3 !important;
}
.amm-directory .amm-more-details-button{
    display:block !important;
    width:100% !important;
    box-sizing:border-box !important;
    padding:10px 14px !important;
    text-align:center !important;
    background:#e5c35a !important;
    border:1px solid #c9a83e !important;
    border-radius:4px !important;
    color:#000000 !important;
    font-weight:700 !important;
    text-decoration:none !important;
}
.amm-directory .amm-more-details-button:hover,
.amm-directory .amm-more-details-button:focus{
    color:#000000 !important;
    text-decoration:none !important;
}

.amm-member-details-page{
    max-width:1050px;
    margin:20px auto;
}
.amm-details-header{
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:20px;
    margin:0 0 22px;
}
.amm-details-header h2{
    margin:0 0 4px !important;
}
.amm-details-header p{
    margin:0 !important;
}
.amm-back-directory-button{
    display:inline-block;
    padding:10px 15px;
    background:#e5c35a;
    border:1px solid #c9a83e;
    border-radius:4px;
    color:#000000 !important;
    font-weight:700;
    text-decoration:none !important;
    white-space:nowrap;
}
.amm-back-directory-button:hover,
.amm-back-directory-button:focus{
    color:#000000 !important;
    text-decoration:none !important;
}
.amm-detail-section{
    margin:0 0 20px;
    padding:20px;
    background:#ffffff;
    border:1px solid #dddddd;
    border-radius:8px;
    color:#333333 !important;
}
.amm-detail-section *{
    color:#333333 !important;
}
.amm-detail-section h3{
    margin:0 0 16px !important;
    padding-bottom:8px !important;
    border-bottom:1px solid #dddddd !important;
    color:#222222 !important;
    font-size:19px !important;
}
.amm-detail-grid{
    display:grid;
    grid-template-columns:repeat(2,minmax(0,1fr));
    gap:12px 20px;
}
.amm-detail-grid>div{
    display:flex;
    flex-direction:column;
    gap:3px;
    min-width:0;
    padding:5px 0;
}
.amm-detail-grid strong{
    font-size:13px;
    color:#555555 !important;
}
.amm-detail-grid span{
    font-size:15px;
    overflow-wrap:anywhere;
}
.amm-detail-photo{
    width:160px;
    height:160px;
    display:flex;
    align-items:center;
    justify-content:center;
    overflow:hidden;
    background:#eeeeee;
    border-radius:8px;
}
.amm-detail-photo img{
    display:block;
    width:100%;
    height:100%;
    object-fit:cover;
}
.amm-detail-photo-placeholder{
    font-size:13px;
}
.amm-child-detail{
    padding:14px 0;
    border-bottom:1px solid #e5e5e5;
}
.amm-child-detail:last-child{
    border-bottom:0;
    padding-bottom:0;
}
.amm-child-detail h4{
    margin:0 0 8px !important;
    color:#222222 !important;
}
.amm-detail-empty{
    margin:0;
}
.amm-details-footer{
    margin:24px 0 10px;
}
@media(max-width:1050px){
    .amm-directory .amm-directory-grid{grid-template-columns:repeat(2,minmax(0,1fr)) !important}
}
@media(max-width:700px){
    .amm-directory .amm-directory-grid{grid-template-columns:1fr !important}
    .amm-details-header{align-items:flex-start;flex-direction:column}
    .amm-detail-grid{grid-template-columns:1fr}
    .amm-detail-photo{width:130px;height:130px}
}


/* v3.9.1 - Family Details table */
.amm-family-details-section .amm-family-table-wrap{
    width:100%;
    max-width:100%;
    overflow-x:auto;
}
.amm-family-details-section .amm-family-table{
    width:100%;
    max-width:100%;
    border-collapse:collapse;
    table-layout:fixed;
    margin:0;
    color:#333 !important;
    background:#fff;
}
.amm-family-details-section .amm-family-table th,
.amm-family-details-section .amm-family-table td{
    padding:10px 12px !important;
    border:1px solid #d9d9d9 !important;
    text-align:left !important;
    vertical-align:middle !important;
    color:#333 !important;
    font-size:14px !important;
    line-height:1.35 !important;
    overflow-wrap:anywhere;
}
.amm-family-details-section .amm-family-table th{
    font-weight:600 !important;
    background:#f7f7f7 !important;
}
.amm-family-details-section .amm-family-table .amm-family-number{
    width:6% !important;
    text-align:center !important;
}
.amm-family-details-section .amm-family-table th:nth-child(2),
.amm-family-details-section .amm-family-table td:nth-child(2){width:35% !important;}
.amm-family-details-section .amm-family-table th:nth-child(3),
.amm-family-details-section .amm-family-table td:nth-child(3){width:22% !important;}
.amm-family-details-section .amm-family-table th:nth-child(4),
.amm-family-details-section .amm-family-table td:nth-child(4){width:22% !important;}
.amm-family-details-section .amm-family-table th:nth-child(5),
.amm-family-details-section .amm-family-table td:nth-child(5){width:15% !important;}

@media(max-width:700px){
    .amm-family-details-section .amm-family-table{
        min-width:560px;
    }
}


/* v3.9.2 - Standardize profile input/select field dimensions and detail labels */
.amm-profile-form .amm-grid > p > input:not([type="checkbox"]),
.amm-profile-form .amm-grid > p > select,
.amm-profile-form .amm-grid > p > textarea,
.amm-profile-form .amm-grid > p .amm-area-code-select,
.amm-profile-form .amm-grid > p .amm-emergency-area-code,
.amm-profile-form .amm-grid > p .amm-country-select,
.amm-profile-form .amm-grid > p .amm-phone-field {
    display:block !important;
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    height:42px !important;
    min-height:42px !important;
    box-sizing:border-box !important;
    margin:0 !important;
}

.amm-profile-form .amm-grid > p {
    width:100% !important;
    min-width:0 !important;
    box-sizing:border-box !important;
}

.amm-profile-form .amm-grid > p > label {
    display:block !important;
    width:100% !important;
    box-sizing:border-box !important;
    margin:0 0 6px !important;
    line-height:1.25 !important;
}

.amm-profile-form .amm-grid > p > select,
.amm-profile-form .amm-grid > p > input[type="date"],
.amm-profile-form .amm-grid > p > input[type="number"],
.amm-profile-form .amm-grid > p > input[type="text"],
.amm-profile-form .amm-grid > p > input[type="email"] {
    padding:10px !important;
}

.amm-profile-form .amm-grid > p > select {
    appearance:auto !important;
    -webkit-appearance:auto !important;
}

.amm-profile-form .amm-children-table input,
.amm-profile-form .amm-children-table select {
    box-sizing:border-box !important;
    width:100% !important;
    max-width:100% !important;
}

.amm-member-details-page .amm-detail-grid strong {
    display:block !important;
    font-weight:700 !important;
    color:#333333 !important;
    margin:0 !important;
    line-height:1.3 !important;
}

.amm-member-details-page .amm-detail-grid span {
    display:block !important;
    font-weight:400 !important;
    color:#333333 !important;
    line-height:1.45 !important;
}

/* Keep front-end admin add/edit forms visually consistent as well. */
.amm-add-grid > p > input:not([type="checkbox"]),
.amm-add-grid > p > select,
.amm-edit-member-form .amm-add-grid > p > input:not([type="checkbox"]),
.amm-edit-member-form .amm-add-grid > p > select {
    width:100% !important;
    max-width:100% !important;
    min-width:0 !important;
    height:42px !important;
    min-height:42px !important;
    box-sizing:border-box !important;
}
