/* ==========================================================================
   Fifth Academy — Profile & Change Password shortcodes
   ========================================================================== */

/* --------------------------------------------------------------------------
   Shared: login-required notice
   -------------------------------------------------------------------------- */
.fa-profile__login-required {
    padding: 0.75rem 1rem;
    background: #fff7ed;
    color: #9a3412;
    border: 1px solid #fed7aa;
    border-radius: 0.375rem;
    font-size: 0.9375rem;
}

/* --------------------------------------------------------------------------
   Shared: field rows — stacked (label above, full-width input)
   Specificity is raised by scoping inside the form wrapper so we reliably
   beat any theme rules that force inline / horizontal form layouts.
   -------------------------------------------------------------------------- */
.fa-profile__form .fa-profile__field,
.fa-change-password__form .fa-change-password__field {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.375rem;
}

.fa-profile__form .fa-profile__field label,
.fa-change-password__form .fa-change-password__field label {
    display: block;
    width: auto;
    float: none;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
    padding: 0;
    text-align: left;
}

.fa-profile__form .fa-profile__field input,
.fa-change-password__form .fa-change-password__field input {
    display: block;
    width: 100%;
    box-sizing: border-box;
    float: none;
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 1rem;
    line-height: 1.5;
    background: #fff;
    color: #111827;
    transition: border-color 0.15s, outline 0.15s;
    margin: 0;
}

.fa-profile__form .fa-profile__field input:focus,
.fa-change-password__form .fa-change-password__field input:focus {
    outline: 2px solid #2563eb;
    outline-offset: 1px;
    border-color: #2563eb;
}

/* --------------------------------------------------------------------------
   Shared: submit button + spinner
   -------------------------------------------------------------------------- */
.fa-profile__submit,
.fa-change-password__submit {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1.375rem;
    background: #2563eb;
    color: #fff;
    border: none;
    border-radius: 0.375rem;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.15s;
}

.fa-profile__submit:hover,
.fa-change-password__submit:hover {
    background: #1d4ed8;
}

.fa-profile__submit:disabled,
.fa-change-password__submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.fa-profile__spinner,
.fa-change-password__spinner {
    flex-shrink: 0;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: fa-profile-spin 0.65s linear infinite;
}

@keyframes fa-profile-spin {
    to { transform: rotate(360deg); }
}

/* --------------------------------------------------------------------------
   Shared: response messages
   -------------------------------------------------------------------------- */
.fa-profile__message,
.fa-change-password__message {
    font-size: 0.875rem;
    border-radius: 0.375rem;
    min-height: 1.25rem;
}

.fa-profile__message:not(:empty),
.fa-change-password__message:not(:empty) {
    padding: 0.5rem 0.75rem;
    border: 1px solid transparent;
}

.fa-profile__message--success,
.fa-change-password__message--success {
    background: #dcfce7;
    color: #166534;
    border-color: #bbf7d0;
}

.fa-profile__message--error,
.fa-change-password__message--error {
    background: #fef2f2;
    color: #991b1b;
    border-color: #fecaca;
}

/* --------------------------------------------------------------------------
   Profile edit form
   -------------------------------------------------------------------------- */
.fa-profile {
    max-width: 480px;
}

.fa-profile__form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Avatar section */
.fa-profile__avatar-section {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.625rem;
}

.fa-profile__avatar-preview {
    width: 96px;
    height: 96px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #e5e7eb;
    display: block;
}

.fa-profile__avatar-input {
    display: none;
}

.fa-profile__avatar-label {
    display: inline-block;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    color: #2563eb;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.fa-profile__avatar-label:hover {
    color: #1d4ed8;
}

.fa-profile__fields {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.fa-profile__actions {
    display: flex;
    align-items: center;
}

/* --------------------------------------------------------------------------
   Change-password form
   -------------------------------------------------------------------------- */
.fa-change-password {
    max-width: 480px;
}

.fa-change-password__form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.fa-change-password__actions {
    display: flex;
    align-items: center;
}
