@tailwind base;
@tailwind components;
@tailwind utilities;

/* Floating Label Logic */
.form-label-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-label-group input,
.form-label-group textarea {
    height: auto !important;
    padding: 1.5rem 1rem 0.5rem !important;
}

.form-label-group label {
    position: absolute !important;
    top: 0;
    left: 0;
    padding: 1rem 1rem !important;
    pointer-events: none;
    transition: all 0.2s ease-in-out;
    color: #999;
    margin-bottom: 0;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
    width: 100%;
}

.form-label-group input:not(:-moz-placeholder-shown) ~ label, .form-label-group textarea:not(:-moz-placeholder-shown) ~ label {
    padding-top: 0.25rem !important;
    font-size: 12px;
    color: #266db9;
    font-weight: 600;
}

.form-label-group input:focus ~ label,
.form-label-group input:not(:placeholder-shown) ~ label,
.form-label-group textarea:focus ~ label,
.form-label-group textarea:not(:placeholder-shown) ~ label {
    padding-top: 0.25rem !important;
    font-size: 12px;
    color: #266db9;
    font-weight: 600;
}

/* Hide placeholder color when not focused or when filled */
.form-label-group input:not(:focus)::-moz-placeholder, .form-label-group textarea:not(:focus)::-moz-placeholder {
    color: transparent;
}
.form-label-group input:not(:focus)::placeholder,
.form-label-group textarea:not(:focus)::placeholder {
    color: transparent;
}
