/* ─────────────────────────────────────────────────────────────── */
/* FIELD VALIDATION SYSTEM - POSITIONED BELOW INPUTS               */
/* ─────────────────────────────────────────────────────────────── */

@import url('./fonts.css');

/* Validation Wrapper */
.validation-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
}

/* Validation Messages Container - Positioned elegantly below input */
.validation-messages {
    display: flex;
    align-items: center;
    gap: 0.2rem;
    height: 0;
    opacity: 0;
    overflow: hidden;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
                height 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                margin-top 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    margin-top: 0;
    margin-bottom: 0;
    min-height: 0;
    position: relative;
    left: 0;
    right: 0;
    width: 100%;
    transform: translateY(-4px);
    z-index: 10;
}

.validation-messages.show {
    height: auto;
    min-height: 24px;
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
    margin-top: 0.4rem;
}

/* Individual Validation Message - Professional */
.validation-msg {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.68rem;
    font-weight: 500;
    line-height: 1.2;
    white-space: nowrap;
    animation: slideInUp 0.25s ease;
    letter-spacing: 0.01em;
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(6px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ─ Error State (Red) ─ */
.validation-msg.error {
    color: #d63031;
    background: rgba(214, 48, 49, 0.08);
    border: 1px solid rgba(214, 48, 49, 0.15);
}

.validation-msg.error::before {
    content: '●';
    font-size: 0.5rem;
    font-weight: 900;
    color: #d63031;
    display: inline-block;
    flex-shrink: 0;
}

/* ─ Warning State (Yellow) ─ */
.validation-msg.warning {
    color: #e8860a;
    background: rgba(232, 134, 10, 0.08);
    border: 1px solid rgba(232, 134, 10, 0.15);
}

.validation-msg.warning::before {
    content: '◆';
    font-size: 0.5rem;
    font-weight: 900;
    color: #e8860a;
    display: inline-block;
    flex-shrink: 0;
}

/* ─ Success State (Green) ─ */
.validation-msg.success {
    color: #27ae60;
    background: rgba(39, 174, 96, 0.08);
    border: 1px solid rgba(39, 174, 96, 0.15);
}

.validation-msg.success::before {
    content: '✓';
    font-size: 0.5rem;
    font-weight: 900;
    color: #27ae60;
    display: inline-block;
    flex-shrink: 0;
}

/* ───────────────────────────────────────────────────────────────── */
/* PASSWORD STRENGTH BAR - 5 SEGMENTS                               */
/* ───────────────────────────────────────────────────────────────── */

.password-strength-container {
    position: relative;
    width: 100%;
    height: 0;
    opacity: 0;
    overflow: hidden;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
                height 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                margin-top 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 10;
}

.password-strength-container.show {
    height: auto;
    min-height: 28px;
    opacity: 1;
    pointer-events: auto;
    margin-top: 0.5rem;
}

.password-strength-label {
    font-size: 0.68rem;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 4px;
    display: block;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.password-strength-bar {
    display: flex;
    gap: 4px;
    height: 3px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 1.5px;
    overflow: hidden;
    flex: 1;
}

.password-strength-fill {
    flex: 1;
    height: 100%;
    border-radius: 1.5px;
    background: #666;
    transition: background 0.3s ease, opacity 0.3s ease;
    opacity: 0.4;
}

.password-strength-fill.active {
    opacity: 1;
}

.password-strength-fill.very-weak,
.password-strength-fill.level-0 {
    background: #d63031;
    opacity: 1;
}

.password-strength-fill.weak,
.password-strength-fill.level-1 {
    background: #d84315;
    opacity: 1;
}

.password-strength-fill.fair,
.password-strength-fill.level-2 {
    background: #f39c12;
    opacity: 1;
}

.password-strength-fill.good,
.password-strength-fill.level-3 {
    background: #f1c40f;
    opacity: 1;
}

.password-strength-fill.strong,
.password-strength-fill.level-4 {
    background: #27ae60;
    opacity: 1;
}

/* ───────────────────────────────────────────────────────────────── */
/* REQUIREMENTS CHECKLIST                                           */
/* ───────────────────────────────────────────────────────────────── */

.requirements-checklist {
    position: relative;
    width: 100%;
    height: 0;
    opacity: 0;
    overflow: hidden;
    transition: opacity 0.25s cubic-bezier(0.4, 0, 0.2, 1), 
                height 0.25s cubic-bezier(0.4, 0, 0.2, 1),
                margin-top 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    z-index: 10;
}

.requirements-checklist.show {
    height: auto;
    min-height: 84px;
    opacity: 1;
    pointer-events: auto;
    margin-top: 0.6rem;
}

.requirements-checklist-title {
    font-size: 0.68rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.65);
    margin-bottom: 6px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.requirement-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 3px 0;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.55);
    transition: color 0.2s ease;
}

.requirement-item.met {
    color: #27ae60;
}

.requirement-item.pending,
.requirement-item.unmet {
    color: rgba(255, 255, 255, 0.4);
}

.requirement-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 14px;
    height: 14px;
    border: 1px solid currentColor;
    border-radius: 2px;
    font-size: 0.45rem;
    flex-shrink: 0;
}

.requirement-item.met .requirement-icon {
    background: rgba(39, 174, 96, 0.15);
    border-color: #27ae60;
}

.requirement-item.pending .requirement-icon,
.requirement-item.unmet .requirement-icon {
    border-color: rgba(255, 255, 255, 0.2);
}

.requirement-item.met .requirement-icon::after {
    content: '✓';
    color: #27ae60;
    font-size: 0.5rem;
    font-weight: 900;
}

/* Input Validation State Styles - Borders and Backgrounds Only */
.field input.is-error,
.input-wrapper input.is-error {
    border-color: rgba(214, 48, 49, 0.65) !important;
    background: rgba(214, 48, 49, 0.02) !important;
}

.field input.is-warning,
.input-wrapper input.is-warning {
    border-color: rgba(232, 134, 10, 0.65) !important;
    background: rgba(232, 134, 10, 0.02) !important;
}

.field input.is-success,
.input-wrapper input.is-success {
    border-color: rgba(39, 174, 96, 0.55) !important;
    background: rgba(39, 174, 96, 0.01) !important;
}
