/* =========================
   FLOATING LABEL STYLES - ATIVE RMA
   Arquivo: ativerma/inicio/css/floating-labels.css
========================= */

.form-group.floating-label {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group.floating-label input {
    width: 100%;
    height: 42px;
    padding: 10px 12px 8px 12px;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    background-color: #ffffff;
    box-sizing: border-box;
    font-family: 'Courier New', monospace;
    font-weight: 500;
    letter-spacing: 1px;
}

.form-group.floating-label input::placeholder {
    color: #9ca3af;
    transition: opacity 0.2s ease;
}

/* Esconder placeholder quando floating estiver ativo (em cima) */
.form-group.floating-label.has-value input::placeholder,
.form-group.floating-label input:focus::placeholder {
    opacity: 0;
}

.form-group.floating-label label {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 0.95rem;
    color: #6c757d;
    transition: top 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                font-size 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                color 0.3s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
    background-color: #ffffff;
    padding: 0 4px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
    will-change: top, transform, font-size;
    opacity: 0;
}

.form-group.floating-label label i {
    color: #1672d8;
    font-size: 0.9rem;
    flex-shrink: 0;
    width: 14px;
    text-align: center;
}

/* Estado ativo/focado - Label flutua para cima e APARECE */
.form-group.floating-label input:focus + label,
.form-group.floating-label input:not(:placeholder-shown) + label,
.form-group.floating-label.has-value label {
    top: -9px;
    transform: translateY(0);
    font-size: 0.8rem;
    color: #1672d8;
    opacity: 1;
}

/* Foco no input */
.form-group.floating-label input:focus {
    outline: none;
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Estado de erro (validação) */
.form-group.floating-label input:invalid:not(:placeholder-shown) {
    border-color: #dc3545;
}

.form-group.floating-label input:invalid:not(:placeholder-shown) + label {
    color: #dc3545;
}


/* Responsive */
@media (max-width: 480px) {
    .form-group.floating-label input {
        font-size: 0.95rem;
        padding: 18px 10px 8px 10px;
    }
    
    .form-group.floating-label label {
        font-size: 0.9rem;
        left: 10px;
    }
    
    .form-group.floating-label input:focus + label,
    .form-group.floating-label input:not(:placeholder-shown) + label,
    .form-group.floating-label.has-value label {
        font-size: 0.75rem;
    }
}