@charset "utf-8";

/* ==========================================================
   Zwag Account Panels
   Reusable account settings, editable panels and moderation notices.
   ========================================================== */

.account-content {
    width: 100%;
}

.account-content__shell {
    width: min(920px, calc(100% - 32px));
    margin-inline: auto;
}

.account-heading {
    margin-bottom: 26px;
}

.account-heading h1 {
    font-size: clamp(2.5rem, 5vw, 4.4rem);
}

.account-heading > p:last-child {
    max-width: 680px;
    margin-top: 12px;
    color: var(--color-muted);
    line-height: 1.7;
}

.account-notice {
    margin-bottom: 20px;
    padding: 18px 20px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.account-notice strong {
    display: block;
    margin-bottom: 5px;
}

.account-notice p {
    margin: 5px 0 0;
    color: var(--color-muted);
    line-height: 1.6;
}

.account-notice--warning {
    border-inline-start: 4px solid var(--color-warning);
}

.account-notice--error {
    border-inline-start: 4px solid var(--color-error);
}

.account-notice--success {
    border-inline-start: 4px solid var(--color-success);
}

.account-form {
    display: grid;
    gap: 20px;
}

.account-panel {
    padding: clamp(20px, 4vw, 30px);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
}

.account-panel + .account-panel {
    margin-top: 20px;
}

.account-panel__heading {
    margin-bottom: 22px;
}

.account-panel__heading h2,
.account-panel__heading h3 {
    font-size: 1.45rem;
}

.account-panel__heading p {
    margin-top: 5px;
    color: var(--color-muted);
    line-height: 1.55;
}

.account-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.account-field {
    display: grid;
    gap: 7px;
}

.account-field > span:first-child {
    font-weight: 650;
}

.account-field--wide {
    grid-column: 1 / -1;
}

.account-field .form-textarea {
    min-height: 260px;
    resize: vertical;
    line-height: 1.65;
}

.account-field__error {
    color: var(--color-error);
    font-size: 0.9rem;
    line-height: 1.45;
}

.account-info {
    display: grid;
    gap: 4px;
    padding: 15px 17px;
    background: var(--color-background);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
}

.account-info__label {
    color: var(--color-muted);
    font-size: 0.86rem;
}

.account-character-count {
    justify-self: end;
    color: var(--color-muted);
    font-size: 0.86rem;
}

.account-submit {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 20px 0 8px;
}

.account-submit p {
    max-width: 570px;
    color: var(--color-muted);
    line-height: 1.55;
}

.account-submit .button {
    flex: 0 0 auto;
}

.account-submit .button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
}

.account-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.account-security-panel {
    margin-top: 28px;
}

.account-status-text {
    min-height: 1.5em;
    margin-top: 10px;
    color: var(--color-muted);
}

@media (max-width: 700px) {

    .account-fields {
        grid-template-columns: 1fr;
    }

    .account-field--wide {
        grid-column: auto;
    }

    .account-submit {
        align-items: stretch;
        flex-direction: column;
    }

    .account-submit .button {
        width: 100%;
    }
}

@media (max-width: 520px) {

    .account-content__shell {
        width: 100%;
    }
	
    .account-panel {
		padding: 20px 8px;
		
        border-radius: var(--radius-lg);
    }

    .account-actions {
        display: grid;
    }

    .account-actions .button {
        width: 100%;
    }

	.account-notice {
		padding: 20px 10px;
	}
}
