/* Coderstation Floating Label Textbox */
.coderstation-floating-textbox {
    position: relative;
    width: 100%;
    max-width: 400px;
    margin-bottom: 1.5rem;
}

/* The input field */
.coderstation-floating-textbox .floating-input {
    width: 100%;
    padding: 1rem 1rem 0.4rem 2.8rem;
    /* Extra top padding to make room for the floating label inside the box */
    font-size: 1rem;
    color: var(--text-color, #1e293b);
    background: #ffffff;
    border: 1px solid var(--panel-border, #e2e8f0);
    border-radius: 8px;
    outline: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 5px rgba(6, 46, 82, 0.04);
    min-height: 48px;
}

.coderstation-floating-textbox .floating-input:hover:not(:focus) {
    border-color: #cbd5e1;
}

.coderstation-floating-textbox .floating-input:focus {
    border-color: var(--button-background, #25549e);
    box-shadow: 0 0 0 3px rgba(37, 84, 158, 0.12);
}

/* The Font Awesome icon */
.coderstation-floating-textbox .textbox-icon {
    position: absolute;
    top: 50%;
    left: 1rem;
    transform: translateY(-50%);
    font-size: 1.1rem;
    color: #94a3b8;
    transition: color 0.3s ease;
    pointer-events: none;
}

/* The label */
.coderstation-floating-textbox .floating-label {
    position: absolute;
    top: 50%;
    left: 2.8rem;
    transform: translateY(-50%);
    font-size: 1rem;
    color: #64748b;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
}

/* Float the label on focus OR when input has content */
.coderstation-floating-textbox .floating-input:focus~.floating-label,
.coderstation-floating-textbox .floating-input:not(:placeholder-shown)~.floating-label {
    top: 0.1rem;
    transform: translateY(0);
    font-size: 0.85rem;
    color: var(--primary-color);
    font-weight: 400;
    background: transparent;
}

/* Change icon color on focus */
.coderstation-floating-textbox .floating-input:focus~.textbox-icon {
    color: var(--button-background, #25549e);
}

/* Password Toggle Design */
.coderstation-floating-textbox .password-toggle {
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    background-color: transparent;
    background-repeat: no-repeat;
    background-position: center;
    background-size: contain;
    border: none;
    cursor: pointer;
    opacity: 0.6;
    transition: opacity 0.2s ease;
    z-index: 2;
    padding: 0;
}

.coderstation-floating-textbox .password-toggle:hover {
    opacity: 1;
}

/* Default state: password hidden */
.coderstation-floating-textbox .password-toggle.password-hidden {
    /* Background image moved to inline HTML <img> */
}

/* Toggled state: password visible */
.coderstation-floating-textbox .password-toggle.password-visible {
    /* Background image moved to inline HTML <img> */
}

/* Adjust padding for the input so text doesn't overlap the toggle icon */
.coderstation-floating-textbox.password-box .floating-input {
    padding-right: 3rem;
}