/* Common styles for Simple Membership forms in Twenty Twenty-Five theme */

/* General Container */
.swpm-loggedin-widget,
.swpm-login-widget-form,
.swpm-pw-reset-widget-form,
.swpm-registration-widget-form,
.swpm-edit-profile-form {
    background-color: #333333;
    text-align: center;
    border: 4px solid #348c8b;
    border-radius: 10px;
    padding: 20px;
    margin: 0 auto;
    color: white;
    font-family: inherit;
    box-sizing: border-box;
}

.swpm-loggedin-widget,
.swpm-login-widget-form,
.swpm-pw-reset-widget-form {
    max-width: 400px;
}

.swpm-registration-widget-form,
.swpm-edit-profile-form {
    max-width: 500px;
}

/* Input fields */
.swpm-login-widget-form .swpm-text-field,
.swpm-pw-reset-widget-form .swpm-text-field,
.swpm-registration-widget-form .swpm-form-field,
.swpm-edit-profile-form .swpm-form-field {
    width: 100%;
    box-sizing: border-box;
    padding: 10px;
    margin-bottom: 10px;
    display: block;
}

/* Labels */
.swpm-login-widget-form label,
.swpm-pw-reset-widget-form label,
.swpm-registration-widget-form label,
.swpm-edit-profile-form label {
    display: block;
    text-align: left;
    margin-bottom: 5px;
    width: 100%;
    padding: 0;
    margin: 0 0 5px 0;
    float: none;
    clear: both;
    box-sizing: border-box;
}

/* Inline labels (checkboxes) */
.swpm-login-widget-form .swpm-remember-me label,
.swpm-login-widget-form .swpm-password-input-visibility label,
.swpm-registration-widget-form .swpm-terms-row label,
.swpm-registration-widget-form .swpm-pp-row label {
    display: inline;
}

.swpm-login-widget-form .swpm-remember-me,
.swpm-login-widget-form .swpm-password-input-visibility,
.swpm-registration-widget-form .swpm-terms-row,
.swpm-registration-widget-form .swpm-pp-row {
    text-align: left;
    margin-bottom: 10px;
}

/* Submit Section */
.swpm-login-widget-form .swpm-login-submit,
.swpm-pw-reset-widget-form .swpm-pw-reset-submit-button,
.swpm-registration-widget-form .swpm-registration-submit-section,
.swpm-edit-profile-form .swpm-edit-profile-submit-section {
    margin-top: 25px;
    margin-bottom: 15px;
    text-align: center;
}

/* Buttons */
.swpm-login-widget-form .swpm-login-submit input,
.swpm-pw-reset-widget-form .swpm-pw-reset-submit-button input,
.swpm-registration-widget-form .swpm-registration-submit-button,
.swpm-edit-profile-form .swpm-profile-submit-button,
.swpm-loggedin-widget a {
    display: inline-block;
    box-sizing: border-box;
    width: 50%;
    padding: 12px;
    cursor: pointer;
    background-color: #348c8b;
    color: white;
    border: none;
    border-radius: 25px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    transition: background-color 0.3s ease;
}

.swpm-loggedin-widget a {
    margin: 10px auto;
}

.swpm-login-widget-form .swpm-login-submit input:hover,
.swpm-pw-reset-widget-form .swpm-pw-reset-submit-button input:hover,
.swpm-registration-widget-form .swpm-registration-submit-button:hover,
.swpm-edit-profile-form .swpm-profile-submit-button:hover,
.swpm-loggedin-widget a:hover {
    background-color: #2a706f;
}

/* Logged In Widget Specifics */
.swpm-loggedin-widget .swpm-logged-username,
.swpm-loggedin-widget .swpm-logged-status,
.swpm-loggedin-widget .swpm-logged-membership,
.swpm-loggedin-widget .swpm-logged-expiry,
.swpm-loggedin-widget .swpm-logged-subs-status {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 5px;
    align-items: center;
}

.swpm-loggedin-widget .swpm-logged-label {
    text-align: right;
    margin-bottom: 0;
    font-weight: bold;
    color: #ddd;
}

.swpm-loggedin-widget .swpm-logged-value {
    text-align: left;
    margin-bottom: 0;
    padding-left: 0;
    font-size: 1.1em;
}

.swpm-loggedin-widget .swpm-logged-subs-status-description {
    grid-column: 1 / -1;
    text-align: center;
    margin-top: 5px;
    margin-bottom: 15px;
    font-size: 0.9em;
    color: #ccc;
}

.swpm-loggedin-widget .swpm-logged-logout-link {
    margin-top: 10px;
}

/* Static values in edit/registration forms */
.swpm-edit-profile-form .swpm-form-username-input-wrap,
.swpm-edit-profile-form .swpm-form-membership-level-input-wrap,
.swpm-registration-widget-form .swpm-form-membership-level-value {
    text-align: left;
    margin-bottom: 10px;
    font-weight: bold;
}

/* Form Row Spacing & Error Styles */
.swpm-form .swpm-form-row {
    margin-bottom: 0.8rem;
}

.swpm-form .swpm-form-row.error .swpm-form-field {
    border-color: #cc0000 !important;
    outline-color: #cc0000 !important;
}

.swpm-form .swpm-form-row.error .swpm-form-desc {
    color: #cc0000 !important;
    font-size: smaller !important;
}

.swpm-form .swpm-form-row.error .swpm-form-desc>ul {
    list-style: none !important;
    padding: 0 !important;
    margin: 4px 0 0 !important;
}
