/* Change-password dialog (resources/views/livewire/change-password-modal.blade.php). Plain CSS, no build step. */
.app-cpw {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.app-cpw p { margin: 0; }

/* Header band */
.app-cpw-hero {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid var(--ux4g-color-secondary-200);
    border-radius: 12px;
    background: linear-gradient(120deg, #fff7ed, #ffffff);
}

.app-cpw-hero-icon {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, #fbbf24, #ea580c);
    box-shadow: 0 4px 12px rgb(234 88 12 / 0.28);
    color: #ffffff;
}

.app-cpw-hero-icon .ux4g-icon-outlined { color: inherit; font-size: 22px; }

.app-cpw-hero p {
    color: var(--ux4g-text-neutral-secondary);
    font-size: 13px;
    line-height: 1.45;
}

/* Strength meter */
.app-cpw-new { display: flex; flex-direction: column; gap: 8px; }

.app-cpw-meter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.app-cpw-bars {
    display: grid;
    flex: 1 1 auto;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
}

.app-cpw-bars i {
    height: 5px;
    border-radius: 3px;
    background-color: var(--ux4g-bg-neutral-soft, #eceef2);
    transition: background-color 0.25s ease;
}

.app-cpw-level {
    min-width: 108px;
    color: var(--ux4g-text-neutral-tertiary);
    font-size: 12px;
    font-weight: var(--ux4g-fw-semibold);
    text-align: right;
}

.app-cpw-meter[data-score="1"] .app-cpw-bars i:nth-child(-n+1) { background-color: #ef4444; }
.app-cpw-meter[data-score="2"] .app-cpw-bars i:nth-child(-n+2) { background-color: #f59e0b; }
.app-cpw-meter[data-score="3"] .app-cpw-bars i:nth-child(-n+3) { background-color: #3b82f6; }
.app-cpw-meter[data-score="4"] .app-cpw-bars i { background-color: #16a34a; }
.app-cpw-meter[data-score="1"] .app-cpw-level { color: #dc2626; }
.app-cpw-meter[data-score="2"] .app-cpw-level { color: #b45309; }
.app-cpw-meter[data-score="3"] .app-cpw-level { color: #1d4ed8; }
.app-cpw-meter[data-score="4"] .app-cpw-level { color: #15803d; }

/* Requirement checklist */
.app-cpw-checks {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px 12px;
    margin: 0;
    padding: 10px 12px;
    border-radius: 10px;
    background-color: var(--ux4g-bg-neutral);
    list-style: none;
}

.app-cpw-checks li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--ux4g-text-neutral-secondary);
    font-size: 12.5px;
    transition: color 0.2s ease;
}

.app-cpw-checks .ux4g-icon-outlined {
    color: var(--ux4g-text-neutral-tertiary);
    font-size: 16px;
    transition: color 0.2s ease, transform 0.2s ease;
}

.app-cpw-checks li.is-ok { color: #15803d; font-weight: var(--ux4g-fw-semibold); }
.app-cpw-checks li.is-ok .ux4g-icon-outlined { color: #16a34a; transform: scale(1.1); }

/* Confirm match */
.app-cpw-confirm { display: flex; flex-direction: column; gap: 6px; }

.app-cpw .app-cpw-match {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12.5px;
    font-weight: var(--ux4g-fw-semibold);
}

.app-cpw-match .ux4g-icon-outlined { font-size: 16px; color: inherit; }
.app-cpw-match.is-ok { color: #15803d; }
.app-cpw-match.is-bad { color: #dc2626; }

@media (max-width: 420px) {
    .app-cpw-checks { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
    .app-cpw * { transition: none !important; }
}

/* Register page on short laptop screens: keep the Register button in view */
@media (min-width: 992px) and (max-height: 720px) {
    .app-login-form .app-cpw {
        gap: 8px;
    }

    .app-login-form .app-cpw-new,
    .app-login-form .app-cpw-confirm {
        gap: 4px;
    }

    .app-login-form .app-cpw-checks {
        gap: 0 12px;
        padding: 4px 10px;
    }

    .app-login-form .app-cpw-checks li {
        font-size: 12px;
    }

    .app-login-form .app-cpw .ux4g-input-helper {
        display: none;   /* "You will receive a confirmation link" */
    }

    .app-login-form .app-cpw .app-cpw-match {
        font-size: 12px;
    }
}

/* Register page: Register + Log in in one row */
.app-auth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.app-auth-row .app-auth-submit {
    justify-content: center;
    width: 100%;
}

@media (max-width: 380px) {
    .app-auth-row { grid-template-columns: 1fr; }
}
