/* coderstation.2fa-textbox.css - Premium 6-Digit 2FA Component (Compact & Elegant) */

.coderstation-2fa-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    position: relative;
    margin-bottom: 0.5rem;
}

/* Elegant unified container */
.coderstation-2fa-inputs {
    display: inline-flex;
    align-items: center;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 12px;
    padding: 6px 8px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    transition: all 0.3s ease;
}

/* Compact individual inputs */
.coderstation-2fa-input {
    width: 36px;
    height: 46px;
    line-height: 46px;
    padding: 0;
    font-size: 1.25rem;
    font-weight: 700;
    font-family: 'Outfit', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    text-align: center;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background-color: #f8fafc;
    color: var(--primary-color, #0d285a);
    transition: all 0.2s ease;
    margin: 0 3px;
    box-sizing: border-box;
}

/* 3+3 Visual Grouping Gap */
.coderstation-2fa-input:nth-child(3) {
    margin-right: 12px;
}

/* Remove default focus outline & style focus */
.coderstation-2fa-input:focus {
    outline: none;
    background-color: #ffffff;
    border-color: var(--secondary-color, #3b82f6);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* Active filled state */
.coderstation-2fa-input.filled {
    background-color: #ffffff;
    border-color: #94a3b8;
}

/* Error state targets the unified container */
.coderstation-2fa-container.error .coderstation-2fa-inputs {
    border-color: #ef4444;
    background-color: #fef2f2;
    box-shadow: 0 4px 6px -1px rgba(239, 68, 68, 0.15);
    animation: shake-error 0.4s cubic-bezier(.36,.07,.19,.97) both;
}

.coderstation-2fa-container.error .coderstation-2fa-input {
    color: #b91c1c;
    border-color: #fca5a5;
    background-color: #ffffff;
}

.coderstation-2fa-container.error .coderstation-2fa-input:focus {
    background-color: #ffffff;
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.2);
}

/* Error Message */
.coderstation-2fa-container .code-error {
    display: none;
    position: absolute;
    bottom: -22px;
    font-size: 0.75rem;
    color: #ef4444;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.coderstation-2fa-container.error .code-error {
    display: block;
}

@keyframes shake-error {
  10%, 90% { transform: translateX(-2px); }
  20%, 80% { transform: translateX(3px); }
  30%, 50%, 70% { transform: translateX(-5px); }
  40%, 60% { transform: translateX(5px); }
}

