/* Pin Input Container */
.pin-input-container {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    align-items: stretch;
    text-align: start;
}

.pin-input-label {
    margin: 0;
    padding: 0;
    font-weight: 500;
    color: #3D3D3D;
    font-size: 0.8rem;
}

/* Pin Boxes Container */
.pin-input-boxes {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    justify-content: center;
    align-items: center;
}

/* Individual Pin Box */
.pin-box {
    position: relative;
    width: 3rem;
    height: 3.5rem;
    background-color: #FFFFFF;
    border: 1px solid #D0D5DD;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease-in-out;
}

.pin-box:hover {
    border-color: #B0B5BD;
}

.pin-box:focus-within {
    border-color: red;
    box-shadow: 0 0 0 3px rgba(61, 61, 61, 0.1);
    transform: translateY(-2px);
}

/* Pin Box with Error */
.pin-box-error {
    border-color: #DC2626;
    animation: shake 0.3s ease-in-out;
}

.pin-box-error:focus-within {
    border-color: #DC2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Pin Box Input */
.pin-box input {
    width: 100%;
    height: 100%;
    border: none;
    outline: none;
    background: transparent;
    text-align: center;
    font-size: 1.5rem;
    font-weight: 600;
    color: #141414;
    caret-color: #3D3D3D;
    transition: all 0.2s ease-in-out;
}

.pin-box input::placeholder {
    color: #AAAAAA;
    opacity: 0.5;
}

.pin-box input:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

/* Filled State Animation */
.pin-box input:not(:placeholder-shown) {
    animation: popIn 0.15s ease-out;
}

/* Error Text (reused from custom-input) */
.error-text {
    font-size: 0.75rem;
    color: #DC2626;
    margin-top: 0.25rem;
    animation: slideDown 0.2s ease-out;
}

/* Animations */
@keyframes popIn {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

@keyframes shake {

    0%,
    100% {
        transform: translateX(0);
    }

    25% {
        transform: translateX(-4px);
    }

    75% {
        transform: translateX(4px);
    }
}

@keyframes slideDown {
    0% {
        opacity: 0;
        transform: translateY(-8px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive Design */
@media (max-width: 480px) {
    .pin-box {
        width: 2.5rem;
        height: 3rem;
    }

    .pin-box input {
        font-size: 1.25rem;
    }

    .pin-input-boxes {
        gap: 0.375rem;
    }
}