/**
 * GoWash24 Login Page CSS
 * ============================================================
 * 로그인 페이지 전용 스타일
 * ============================================================
 */

/* ============================================================
   1. Material Underline Input Style
   ============================================================ */

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group input[type="text"],
.input-group input[type="password"],
.input-group input[type="tel"],
.input-group input[type="email"] {
    font-size: 16px;
    padding: 10px 0;
    display: block;
    width: 100%;
    border: none;
    border-bottom: 1px solid #e5e7eb;
    background: transparent;
    color: #1f2937;
}

.input-group input[type="text"]:focus,
.input-group input[type="password"]:focus,
.input-group input[type="tel"]:focus,
.input-group input[type="email"]:focus {
    outline: none;
}

/* Floating Label */
.input-group label.float-label {
    color: #9ca3af;
    font-size: 16px;
    font-weight: normal;
    position: absolute;
    pointer-events: none;
    left: 0;
    top: 10px;
    transition: 0.2s ease all;
}

.input-group input[type="text"]:focus ~ label.float-label,
.input-group input[type="text"]:not(:placeholder-shown) ~ label.float-label,
.input-group input[type="password"]:focus ~ label.float-label,
.input-group input[type="password"]:not(:placeholder-shown) ~ label.float-label,
.input-group input[type="tel"]:focus ~ label.float-label,
.input-group input[type="tel"]:not(:placeholder-shown) ~ label.float-label,
.input-group input[type="email"]:focus ~ label.float-label,
.input-group input[type="email"]:not(:placeholder-shown) ~ label.float-label {
    top: -20px;
    font-size: 12px;
    color: #FF4F00;
    font-weight: 600;
}

/* Underline Animation */
.bar {
    position: relative;
    display: block;
    width: 100%;
}

.bar:before, .bar:after {
    content: '';
    height: 2px;
    width: 0;
    bottom: 0;
    position: absolute;
    background: #FF4F00;
    transition: 0.3s ease all;
}

.bar:before { left: 50%; }
.bar:after { right: 50%; }

.input-group input[type="text"]:focus ~ .bar:before,
.input-group input[type="text"]:focus ~ .bar:after,
.input-group input[type="password"]:focus ~ .bar:before,
.input-group input[type="password"]:focus ~ .bar:after,
.input-group input[type="tel"]:focus ~ .bar:before,
.input-group input[type="tel"]:focus ~ .bar:after,
.input-group input[type="email"]:focus ~ .bar:before,
.input-group input[type="email"]:focus ~ .bar:after {
    width: 50%;
}


/* ============================================================
   2. Toggle Switch Style
   ============================================================ */

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #d1d5db;
    transition: .4s;
    border-radius: 24px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: #FF4F00;
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(20px);
}


/* ============================================================
   3. Input Error Style
   ============================================================ */

.input-group.error input {
    border-bottom-color: #ef4444 !important;
}

.input-group.error .bar:before,
.input-group.error .bar:after {
    background: #ef4444;
    width: 50%;
}

.input-group.error label.float-label {
    color: #ef4444;
}

/* Shake Animation */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-4px); }
    20%, 40%, 60%, 80% { transform: translateX(4px); }
}

.input-group.shake {
    animation: shake 0.5s ease-in-out;
}


/* ============================================================
   4. Network Status Pulse
   ============================================================ */

@keyframes pulse-green {
    0% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(34, 197, 94, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(34, 197, 94, 0);
    }
}

@keyframes pulse-red {
    0% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.7);
    }
    70% {
        box-shadow: 0 0 0 6px rgba(239, 68, 68, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0);
    }
}

.pulse-online {
    animation: pulse-green 2s infinite;
}

.pulse-offline {
    animation: pulse-red 1.5s infinite;
}
