/* =========================================================
   MEMBER — PROFILE SETTINGS / PROFILE
   ========================================================= */

.member-profile-mobile {
    display: none;
}

@media (max-width: 767px) {

    body.member-mobile .member-profile-mobile {
        display: block;
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
        padding: 0 10px 24px;
        box-sizing: border-box;
        background: #f5f5f7;
    }

    body.member-mobile .legacy-profile-page {
        display: none !important;
    }

    /* TABS */

    .member-profile-tabs {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        margin: 0 -10px 12px;
        background: #fff;
        border-bottom: 1px solid #e5e5e5;
    }

    .member-profile-tabs a {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 48px;
        padding: 0 4px;
        box-sizing: border-box;
        color: #777;
        font-size: 12px;
        font-weight: 600;
        text-decoration: none;
        text-transform: uppercase;
        border-bottom: 3px solid transparent;
    }

    .member-profile-tabs a.active {
        color: #ff2f8b;
        border-bottom-color: #ff2f8b;
    }

    /* MAIN CARD */

    .member-profile-card {
        margin: 0;
        padding: 16px;
        overflow: hidden;
        background: #fff;
        border-radius: 15px;
        box-shadow: 0 3px 14px rgba(0,0,0,.05);
    }

    .member-profile-section-title {
        margin: 0 0 14px;
        color: #222;
        font-size: 15px;
        line-height: 20px;
        font-weight: 700;
    }

    /* PHOTO + MAIN INFO */

    .member-profile-summary {
        display: grid;
        grid-template-columns: 42% 58%;
        align-items: start;
        gap: 0;
    }

    .member-profile-photo {
        width: 100%;
        aspect-ratio: 3 / 4;
        overflow: hidden;
        background: #e5e5e5;
        border-radius: 10px;
    }

    .member-profile-photo img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
    }

    .member-profile-summary-info {
        min-width: 0;
        padding-left: 14px;
    }

    .member-profile-summary-info > div {
        padding: 5px 0 7px;
        border-bottom: 1px solid #ededed;
    }

    .member-profile-summary-info span,
    .member-profile-details span {
        display: block;
        margin-bottom: 1px;
        color: #999;
        font-size: 10px;
        line-height: 13px;
    }

    .member-profile-summary-info strong,
    .member-profile-details strong {
        display: block;
        color: #333;
        font-size: 13px;
        line-height: 17px;
        font-weight: 500;
        overflow-wrap: anywhere;
    }

    /* SECONDARY INFO */

    .member-profile-details {
        display: grid;
        grid-template-columns: 1fr 1fr;
        margin-top: 15px;
        border-top: 1px solid #ededed;
    }

    .member-profile-details > div {
        min-width: 0;
        padding: 9px 8px 9px 0;
        border-bottom: 1px solid #ededed;
    }

    .member-profile-details > div:nth-child(even) {
        padding-left: 12px;
        padding-right: 0;
        border-left: 1px solid #ededed;
    }

    /* TEXT CARDS */

    .member-profile-text-section {
        margin: 12px 0 0;
        padding: 17px 16px;
        min-height: 100px;
        box-sizing: border-box;
        background: #fff;
        border-radius: 15px;
        box-shadow: 0 3px 14px rgba(0,0,0,.05);
    }

    .member-profile-text-section h2 {
        margin: 0 0 13px;
        color: #222;
        font-size: 15px;
        line-height: 20px;
        font-weight: 700;
    }

    .member-profile-text {
        color: #555;
        font-size: 13px;
        line-height: 20px;
        white-space: pre-line;
        overflow-wrap: anywhere;
    }
}

/* SMALL PHONES */

@media (max-width: 380px) {

    .member-profile-summary {
        grid-template-columns: 40% 60%;
    }

    .member-profile-summary-info {
        padding-left: 10px;
    }

    .member-profile-card {
        padding: 13px;
    }

    .member-profile-summary-info > div {
        padding: 3px 0 5px;
    }

    .member-profile-summary-info strong,
    .member-profile-details strong {
        font-size: 12px;
    }
}

/* =========================================================
   PROFILE SETTINGS — EDIT PHOTO
   ========================================================= */

.member-gallery-mobile {
    display: none;
}

@media (max-width: 767px) {

    body.member-mobile .member-gallery-mobile {
        display: block;
        width: 100%;
        max-width: 600px;
        margin: 0 auto;
        padding: 0 10px 24px;
        box-sizing: border-box;
        background: #f5f5f7;
    }

    body.member-mobile .legacy-gallery-page {
        display: none !important;
    }

    .member-gallery-mobile .member-profile-tabs {
        margin: 0 -10px 12px;
    }

    .member-gallery-card {
        margin: 0 0 12px;
        padding: 16px;
        box-sizing: border-box;
        background: #fff;
        border-radius: 15px;
        box-shadow: 0 3px 14px rgba(0,0,0,.05);
    }

    .member-gallery-card h2 {
        margin: 0 0 15px;
        color: #222;
        font-size: 15px;
        line-height: 20px;
        font-weight: 700;
    }

    /* PRIMARY PHOTO */

    .member-gallery-primary {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .member-gallery-primary-photo {
        width: 170px;
        aspect-ratio: 3 / 4;
        overflow: hidden;
        background: #eee;
        border-radius: 10px;
    }

    .member-gallery-primary-photo img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
        object-position: center top;
    }

    /* BUTTONS */

    .member-gallery-button {
        display: block;
        width: 100%;
        min-height: 44px;
        margin-top: 14px;
        padding: 0 16px;
        border: 0;
        border-radius: 8px;
        background: #ff2f8b;
        color: #fff;
        font-family: inherit;
        font-size: 13px;
        font-weight: 700;
        line-height: 44px;
        text-align: center;
        cursor: pointer;
    }

    /* ADDITIONAL PHOTOS */

    .member-gallery-grid {
        display: grid;
        grid-template-columns: repeat(3, 1fr);
        gap: 10px;
    }

    .member-gallery-slot {
        position: relative;
        width: 100%;
        aspect-ratio: 1 / 1;
        padding: 0;
        overflow: hidden;
        box-sizing: border-box;
        border-radius: 10px;
    }

    .member-gallery-slot-empty {
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px dashed #d7d7d7;
        background: #fafafa;
        cursor: pointer;
    }

    .member-gallery-slot-empty span {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: #f0f0f0;
        color: #999;
        font-size: 25px;
        font-weight: 300;
        line-height: 34px;
    }

    .member-gallery-slot-filled {
        background: #eee;
    }

    .member-gallery-slot-filled img {
        display: block;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    .member-gallery-delete {
        position: absolute;
        top: 5px;
        right: 5px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 28px;
        height: 28px;
        min-width: 0;
        padding: 0;
        border: 0;
        border-radius: 50%;
        background: rgba(0,0,0,.65);
        color: #fff;
        font-size: 20px;
        line-height: 28px;
        cursor: pointer;
    }

    .member-gallery-add-button {
        margin-top: 15px;
    }
}

@media (max-width: 380px) {

    .member-gallery-grid {
        gap: 7px;
    }

    .member-gallery-card {
        padding: 13px;
    }

    .member-gallery-primary-photo {
        width: 150px;
    }
}
