
/*
==========================================================
MANAGE ACCOUNT
==========================================================

Styles for the logged-in member account management page.

Owns:
- Account form
- Password section
- Avatar upload
- Biography
- Paddling Experience
- Profile update button

Does NOT own:
- Public profile
- Forum pages
- Shared button definitions
- Global typography
*/

/* ==========================================================
   ACCOUNT SECTION HEADINGS
   ========================================================== */

.allagash-profile-edit-page #bbpress-forums #bbp-your-profile > h2 {
    margin: 52px 0 10px !important;

    color: var(--pine) !important;
    font-family: "Alegreya", serif !important;
    font-size: 32px !important;
    line-height: 1.15;
}

/* ==========================================================
   UPDATE PROFILE AREA
   ========================================================== */

.allagash-profile-edit-page
#bbpress-forums
#bbp-your-profile
fieldset.submit > legend {
    display: none !important;
}

/* Hide the unused Contact Info section. */
.allagash-profile-edit-page
#bbpress-forums
#bbp-your-profile
> fieldset.bbp-form:nth-of-type(2) {
    display: none !important;
}

.allagash-profile-edit-page
#bbpress-forums
#bbp-your-profile
> h2:first-of-type {
    margin-top: 0 !important;
}

/* Display Name dropdown */
.allagash-profile-edit-page
#bbpress-forums
#bbp-your-profile
select#display_name {
    font-size: 20px;
    line-height: 1.3;
    height: 46px;
    padding: 0 14px;
}

/* ==========================================================
   ACCOUNT INFORMATION
   ========================================================== */

.allagash-profile-edit-page
#bbpress-forums
#bbp-your-profile
> fieldset:not(.submit) {
    margin-bottom: 30px;

    padding: 24px 28px;

    background: var(--birch);
    border: 1px solid rgba(34, 81, 58, .15);
    border-radius: 8px;
}

/* ==========================================================
   ACCOUNT FORM CONTROLS
   ========================================================== */

.allagash-profile-edit-page #bbpress-forums #bbp-your-profile input[type="text"],
.allagash-profile-edit-page #bbpress-forums #bbp-your-profile input[type="email"],
.allagash-profile-edit-page #bbpress-forums #bbp-your-profile input[type="url"],
.allagash-profile-edit-page #bbpress-forums #bbp-your-profile input[type="password"],
.allagash-profile-edit-page #bbpress-forums #bbp-your-profile select,
.allagash-profile-edit-page #bbpress-forums #bbp-your-profile textarea {
    box-sizing: border-box;

    background: #fff !important;
    border: 1px solid rgba(34, 81, 58, .30) !important;
    border-radius: 5px !important;

    color: var(--dark-spruce);
    font-family: "Alegreya", serif;
}

/* Focus state */
.allagash-profile-edit-page #bbpress-forums #bbp-your-profile input[type="text"]:focus,
.allagash-profile-edit-page #bbpress-forums #bbp-your-profile input[type="email"]:focus,
.allagash-profile-edit-page #bbpress-forums #bbp-your-profile input[type="url"]:focus,
.allagash-profile-edit-page #bbpress-forums #bbp-your-profile input[type="password"]:focus,
.allagash-profile-edit-page #bbpress-forums #bbp-your-profile select:focus,
.allagash-profile-edit-page #bbpress-forums #bbp-your-profile textarea:focus {
    border-color: var(--pine) !important;
    box-shadow: 0 0 0 2px rgba(34, 81, 58, .14) !important;
    outline: none !important;
}

/* Larger writing areas */
.allagash-profile-edit-page #bbpress-forums #bbp-your-profile textarea {
    min-height: 280px !important;
    resize: vertical;
}

/* Update Profile button spans the form width */
.allagash-profile-edit-page
#bbpress-forums
#bbp_user_edit_submit {
    width: 100%;
}

/* Remove the inherited “(cannot be changed)” text from the
   Password label. The password can be changed with the button. */
.allagash-profile-edit-page
#password > label::after {
    content: "" !important;
}

/* Password-specific submit button */
.allagash-profile-edit-page
#bbpress-forums
#bbp-your-profile
.allagash-save-password-wrapper {
    width: 100%;
    margin-top: 24px;
}

.allagash-profile-edit-page
#bbpress-forums
#bbp-your-profile
.allagash-save-password-wrapper button {
    display: block;
    width: 100%;
}

/* ==========================================================
   SIMPLE LOCAL AVATAR — MANAGE ACCOUNT PAGE
   ========================================================== */

/*
 * Hide the Simple Local Avatar content-rating field.
 * We always use local avatars and do not fall back to Gravatar.
 */
#simple-local-avatar-section .ratings-row {
    display: none !important;
}

/* ==========================================================
   AVATAR CARD
   ========================================================== */

#simple-local-avatar-section {
    margin-top: 0;
}

#simple-local-avatar-section .form-table {
    padding: 24px 28px;

    background: var(--birch) !important;
    border: 1px solid rgba(34, 81, 58, .15) !important;
    border-radius: 8px;
}

#simple-local-avatar-section table,
#simple-local-avatar-section tbody,
#simple-local-avatar-section tr,
#simple-local-avatar-section th,
#simple-local-avatar-section td {
    background: transparent !important;
    border: 0 !important;
}

/* ==========================================================
   AVATAR SECTION HEADING
   ========================================================== */

#simple-local-avatar-section > h3 {
    margin: 52px 0 10px !important;

    color: var(--pine) !important;
    font-family: "Alegreya", serif !important;
    font-size: 32px !important;
    font-weight: 700;
    line-height: 1.15;
}

/*
 * Simple Local Avatars renders this section as a table.
 * Convert only this plugin component to a normal block layout.
 */
#simple-local-avatar-section .form-table,
#simple-local-avatar-section .form-table tbody,
#simple-local-avatar-section .upload-avatar-row {
    display: block;
    width: 100%;
}

#simple-local-avatar-section .upload-avatar-row th,
#simple-local-avatar-section .upload-avatar-row td {
    display: block;
    width: 100%;
    padding: 0;
}

#simple-local-avatar-section .upload-avatar-row th {
    text-align: left;
}

/* Upload Avatar label */
#simple-local-avatar-section .upload-avatar-row th > label {
    display: block;
    margin: 0;
    padding: 10px 0 10px 5px;

    color: var(--dark-spruce);
    font-family: "Alegreya", serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    text-align: left;
}

/* Avatar preview and file-control layout */
#simple-local-avatar-section .right-wrapper {
    display: grid !important;
    grid-template-columns: 150px minmax(220px, 330px);
    justify-content: start !important;
    justify-items: start;
    align-items: center !important;

    gap: 36px;
    width: 100%;
}

/* Avatar preview */
#simple-local-avatar-section #simple-local-avatar-photo {
    width: 150px !important;
    height: 150px !important;

    margin: 0 !important;
    justify-self: start;
}

#simple-local-avatar-section #simple-local-avatar-photo img {
    display: block;

    width: 150px !important;
    height: 150px !important;

    object-fit: cover;
}

/* Upload field container */
#simple-local-avatar-section .button-containet {
    width: 100%;
    padding-left: 0 !important;
}

/* Override the plugin's inline paragraph width */
#simple-local-avatar-section .button-containet p {
    display: block !important;

    width: auto !important;
    max-width: 100% !important;

    margin: 0 !important;
}

/* Upload instructions */
#simple-local-avatar-section .button-containet .description {
    display: block;

    margin-bottom: 8px;
    line-height: 1.4;
}

/* File chooser */
#simple-local-avatar-section .button-containet input[type="file"] {
    display: block;

    width: 100%;
    max-width: 330px;

    padding: 8px;

    background: #fff;
    border: 1px solid rgba(34, 81, 58, .35);
    border-radius: 4px;

    font-family: "Alegreya", serif;
    font-size: 17px;
}

/* ==========================================================
   ACCOUNT SECTIONS
   ========================================================== */

.allagash-profile-edit-page #bbpress-forums .bbp-submit-wrapper {
    margin-top: 30px;
}

/* ==========================================================
   UPDATE PROFILE
   ========================================================== */

.allagash-profile-edit-page
#bbpress-forums
#bbp-your-profile
fieldset.submit {
    margin-top: 50px !important;
    padding: 0 !important;

    background: transparent !important;
    border: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
}

.allagash-profile-edit-page
#bbpress-forums
#bbp-your-profile
fieldset.submit > div {
    display: flex;
    justify-content: flex-start;
    margin: 0;
    padding: 0;
}

.allagash-profile-edit-page
#bbpress-forums
#bbp-your-profile
#bbp_user_edit_submit {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* ==========================================================
   MANAGE ACCOUNT PAGE CLEANUP
   ========================================================== */

/* Remove the duplicate bbPress avatar and account navigation */
.allagash-profile-edit-page #bbpress-forums #bbp-single-user-details {
    display: none !important;
}

/* Let the account editor use the full available width */
.allagash-profile-edit-page #bbpress-forums #bbp-user-body {
    width: 100% !important;
    margin-left: 0 !important;
}

/* Return to public profile */
.allagash-view-profile-link {
    margin: 0 0 24px;
}

.allagash-view-profile-link a {
    color: var(--canoe-red) !important;
    font-weight: 700;

    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Added Paddling & Wilderness Experience field */
.allagash-profile-edit-field {
    margin-top: 26px;
}

.allagash-profile-edit-field label {
    display: block;

    margin-bottom: 8px;
}

.allagash-profile-edit-field textarea {
    display: block;

    width: 100%;
    max-width: none;
}

/* ==========================================================
   ACCOUNT FIELD LABELS
   ========================================================== */

.allagash-profile-edit-page #bbpress-forums #bbp-your-profile > fieldset label,
.allagash-profile-edit-field > label {
    color: var(--dark-spruce);
    font-family: "Alegreya", serif;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
}

/* ==========================================================
   ACCOUNT FIELD DESCRIPTIONS
   ========================================================== */

.allagash-profile-edit-page #bbpress-forums #bbp-your-profile .description {
    color: var(--dark-spruce);
    font-family: "Alegreya", serif;
    font-size: 16px;
    font-style: italic;
    line-height: 1.45;

    margin-top: 8px !important;
    padding: 0 !important;

    background: transparent !important;
    border: 0 !important;
}

/* ==========================================================
   MOBILE
   ========================================================== */

@media (max-width: 768px) {

    /* Section headings */
    .allagash-profile-edit-page
    #bbpress-forums
    #bbp-your-profile
    > h2 {
        margin: 24px 0 8px !important;
        font-size: 28px !important;
    }

    /* Tighter account cards on phones */
    .allagash-profile-edit-page
    #bbpress-forums
    #bbp-your-profile
    > fieldset:not(.submit) {
        padding: 18px;
    }

    /* Let the expanded password controls use the full card width. */
    .allagash-profile-edit-page
    #bbpress-forums
    #bbp-your-profile
    fieldset fieldset.password {
        width: 100% !important;
        margin-left: 0 !important;
    }

    /* Let custom profile help text use the full card width. */
    .allagash-profile-edit-page
    #bbpress-forums
    #bbp-your-profile
    .allagash-profile-edit-field > p.description {
        width: 100% !important;
        margin-left: 0 !important;
    }

    /* Stack bbPress table-based form rows */
    .allagash-profile-edit-page #bbpress-forums #bbp-your-profile table,
    .allagash-profile-edit-page #bbpress-forums #bbp-your-profile tbody,
    .allagash-profile-edit-page #bbpress-forums #bbp-your-profile tr,
    .allagash-profile-edit-page #bbpress-forums #bbp-your-profile th,
    .allagash-profile-edit-page #bbpress-forums #bbp-your-profile td {
        display: block;
        width: 100% !important;
    }

    .allagash-profile-edit-page
    #bbpress-forums
    #bbp-your-profile
    th {
        padding: 0 0 8px;
        text-align: left;
        vertical-align: top;
    }

    .allagash-profile-edit-page
    #bbpress-forums
    #bbp-your-profile
    td {
        padding: 0 0 16px;
    }

    /* Stack all labels above their fields */
    .allagash-profile-edit-page
    #bbpress-forums
    #bbp-your-profile
    > fieldset label,
    .allagash-profile-edit-field > label {
        display: block !important;
        float: none !important;

        width: 100% !important;
        max-width: none !important;

        margin: 0 0 8px !important;
        padding: 0 !important;

        text-align: left !important;
        white-space: normal !important;
        word-break: normal !important;
        overflow-wrap: normal !important;
    }

    /* Custom profile fields */
    .allagash-profile-edit-field {
        display: block;
        clear: both;

        width: 100%;
        margin: 0 0 16px;
    }

    /* Full-width form controls */
    .allagash-profile-edit-page #bbpress-forums #bbp-your-profile input[type="text"],
    .allagash-profile-edit-page #bbpress-forums #bbp-your-profile input[type="email"],
    .allagash-profile-edit-page #bbpress-forums #bbp-your-profile input[type="url"],
    .allagash-profile-edit-page #bbpress-forums #bbp-your-profile input[type="password"],
    .allagash-profile-edit-page #bbpress-forums #bbp-your-profile select,
    .allagash-profile-edit-page #bbpress-forums #bbp-your-profile textarea {
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box;
    }

    /* More manageable writing areas */
    .allagash-profile-edit-page
    #bbpress-forums
    #bbp-your-profile
    textarea {
        min-height: 140px !important;
    }

    /* Hide the entire Language field */
    .allagash-profile-edit-page
    #bbpress-forums
    #bbp-your-profile
    div:has(> label[for="locale"]) {
        display: none !important;
    }

    /* Full-width Change Password button */
    .allagash-profile-edit-page
    #bbpress-forums
    #bbp-your-profile
    .wp-generate-pw {
        display: block;
        width: 100%;

        margin: 8px 0 0;
        box-sizing: border-box;
        text-align: center;
    }

    /* Keep password controls within the card */
    .allagash-profile-edit-page
    #bbpress-forums
    #bbp-your-profile
    .password-input-wrapper,
    .allagash-profile-edit-page
    #bbpress-forums
    #bbp-your-profile
    .password-button-wrapper {
        display: block;
        width: 100%;
    }

    /* Avatar section */
    #simple-local-avatar-section .upload-avatar-row th {
        text-align: center;
    }

    #simple-local-avatar-section .right-wrapper {
        grid-template-columns: 1fr;
        justify-items: center;

        gap: 20px;
    }

    #simple-local-avatar-section .button-containet {
        width: 100%;
        text-align: center;
    }

    #simple-local-avatar-section
    .button-containet
    input[type="file"] {
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    /* Update Profile area */
    .allagash-profile-edit-page
    #bbpress-forums
    .bbp-submit-wrapper {
        text-align: center;
    }
}