/* --- PERSIK PREMIUM NEURO-COGNITIVE INPUT FORMS --- */
/* Chunking-Optimized Floating Labels, Success Glows & Red Shimmer Error feedback (Phase 2) */

.neuro-form-group {
    position: relative;
    margin-bottom: 2rem;
    width: 100%;
}

/* Base input field styling */
.neuro-input {
    width: 100%;
    height: 48px; /* High comfort touch targets */
    padding: 1.2rem 1rem 0.4rem 1rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #ffffff;
    background: rgba(18, 20, 26, 0.45);
    border: none;
    border-bottom: 1.5px solid rgba(255, 255, 255, 0.15);
    border-radius: 4px;
    outline: none;
    transition: border-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                background-color 0.4s cubic-bezier(0.16, 1, 0.3, 1),
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@media (max-width: 768px) {
    .neuro-input {
        height: 44px; /* Perfectly sized for thumb touch accessibility */
        font-size: 13px;
        padding-top: 1.1rem;
    }
}

/* Floating Label styling */
.neuro-label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Montserrat', sans-serif;
    font-size: 13px;
    font-weight: 500;
    color: rgba(255, 255, 255, 0.45);
    pointer-events: none;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                font-size 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                color 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: left top;
}

/* Floating behavior when field is active or contains value */
.neuro-input:focus ~ .neuro-label,
.neuro-input:not(:placeholder-shown) ~ .neuro-label {
    transform: translateY(-90%) scale(0.8);
    color: #c9a96e; /* Luxurious Gold accent label */
}

/* Field Focus State */
.neuro-input:focus {
    background: rgba(20, 22, 28, 0.85);
    border-bottom-color: #c9a96e;
    box-shadow: 0 4px 20px rgba(201, 169, 110, 0.08);
}

/* Success Validation state (Green micro-glow bottom border) */
.neuro-input.is-valid {
    border-bottom-color: #34d399 !important;
    background: rgba(18, 26, 22, 0.55);
    box-shadow: 0 4px 20px rgba(52, 211, 153, 0.05);
}

.neuro-input.is-valid ~ .neuro-label {
    color: #34d399 !important;
}

/* Elegant Success validation tick indicator */
.neuro-form-group::after {
    content: '✓';
    position: absolute;
    right: 1rem;
    top: 50%;
    transform: translateY(-50%) scale(0);
    color: #34d399;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 14px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
}

.neuro-form-group.has-success::after {
    transform: translateY(-50%) scale(1);
    animation: successPulse 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes successPulse {
    0% { transform: translateY(-50%) scale(0.6); }
    50% { transform: translateY(-50%) scale(1.4); }
    100% { transform: translateY(-50%) scale(1); }
}

/* Error Validation State (Subtle red shimmer glow) */
.neuro-input.is-invalid {
    border-bottom-color: #f87171 !important;
    background: rgba(26, 18, 18, 0.55) !important;
    animation: errorShimmer 1.5s infinite alternate;
}

.neuro-input.is-invalid ~ .neuro-label {
    color: #f87171 !important;
}

@keyframes errorShimmer {
    0% {
        box-shadow: 0 4px 15px rgba(248, 113, 113, 0.03);
    }
    100% {
        box-shadow: 0 4px 20px rgba(248, 113, 113, 0.12);
    }
}

/* Form Helper & Error Texts */
.neuro-error-text {
    font-family: 'Montserrat', sans-serif;
    font-size: 10px;
    font-weight: 500;
    color: #f87171;
    margin-top: 0.4rem;
    letter-spacing: 0.5px;
    display: none;
    opacity: 0;
    transform: translateY(-5px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.neuro-input.is-invalid ~ .neuro-error-text {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Micro-interaction support for high-tactile clicks */
.neuro-input:active {
    transform: scale(0.995);
    transition: transform 0.1s;
}
