/* --- FLOATING REGISTER BUTTON (MOMENTARY TYPE) --- */

/* 1. CONTAINER: Floating Bottom Right */
.switch-plate {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 9999; /* Always on top */
    
    background: transparent;
    border: none;
    padding: 0;
    box-shadow: none;
    width: auto;
    
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 15px; /* Space between text and button */
}

/* 2. THE TEXT LABEL ("REGISTER NOW") */
.plate-title {
    background: #000;
    color: #fff;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.9rem;
    font-weight: 700;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #333;
    
    /* Text Glow for visibility */
    text-shadow: 0 0 5px rgba(255,255,255,0.4);
    pointer-events: none; /* Let clicks pass through if overlapping */
    
    /* Optional: Slide-in animation on load */
    animation: slideIn 1s ease-out forwards;
}

@keyframes slideIn {
    from { opacity: 0; transform: translateX(20px); }
    to { opacity: 1; transform: translateX(0); }
}

/* 3. THE HOUSING (The Key Base) */
.switch-housing {
    width: 64px;
    height: 64px;
    background: #0a0a0a;
    border-radius: 10px; /* Squircle shape */
    position: relative;
    cursor: pointer;
    
    /* The Bezel/Base styling */
    border: 2px solid #222;
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);
    
    transition: transform 0.1s;
}

/* 4. THE KNOB (The Keycap Itself) */
.switch-knob {
    position: absolute;
    /* Unpressed State: Sitting High */
    top: -6px; 
    left: 50%;
    transform: translateX(-50%);
    
    width: 48px;
    height: 48px;
    
    /* High-contrast Keycap Color */
    background: #eee; 
    border: 1px solid #fff;
    
    /* The "Height" of the key (The thick bottom border) */
    border-bottom: 6px solid #999; 
    border-radius: 6px;
    
    display: flex;
    align-items: center;
    justify-content: center;
    
    transition: top 0.1s, border-bottom 0.1s, background 0.2s;
    z-index: 2;
}

/* 5. KEY TEXT ("GO" or "Enter" symbol) */
.switch-knob::after {
    content: "GO"; /* Meaningful Action Text */
    font-family: 'Montserrat', sans-serif;
    font-weight: 900;
    color: #111; /* Dark text on light key */
    font-size: 1rem;
    letter-spacing: 1px;
}

/* Remove decorative line */
.switch-knob::before { display: none; }

/* 6. THE TRACK (Used for Hover Glow) */
.switch-track {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 10px;
    box-shadow: 0 0 0 transparent;
    transition: 0.3s;
    z-index: 1;
}

/* --- INTERACTIONS (NO STATE HOLDING) --- */

#retro-switch { display: none; }

/* HOVER STATE: The "Ready" feeling */
.switch-housing:hover .switch-knob {
    background: #fff; /* Brighten key */
    transform: translateX(-50%) translateY(-2px); /* Lift slightly */
}
.switch-housing:hover .switch-track {
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.2); /* Soft white glow */
}

/* CLICK STATE (:active) - The "Push" logic */
/* We use :active on the label so it works instantly on click down */

.switch-housing:active .switch-knob {
    top: 4px; /* Move down physically */
    border-bottom: 0px solid #999; /* Remove height thickness */
    background: #00ff88; /* Flash Green on press */
    border-color: #00ff88;
}

.switch-housing:active .switch-knob::after {
    content: ">>"; /* Change text momentarily */
    color: #004400;
}

.switch-housing:active {
    transform: translateY(2px); /* Move whole unit slightly */
}

.retro-switch-green .switch-knob {
    background: #4CAF50;
    border-bottom: 6px solid #388E3C;
}

.retro-switch-green .switch-housing {
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5), 0 0 20px rgba(76, 175, 80, 0.4);
}