/* Styles for Welcome and Login Overlays */

/* --- Common Overlay Styles --- */
#welcome-overlay, #login-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 90vh;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

#welcome-overlay {
    background-color: rgba(0, 0, 0, 0.8);
}
.welcome-container.new {
    background: #fff;
}
#login-overlay {
    background-color: rgba(28, 100, 182, 0.95);
    flex-direction: column; /* Align logo and container vertically */
}

/* --- Common Container Styles --- */
.welcome-container {
    padding: 2rem;
    border-radius: 8px;
    text-align: center;
    max-width: 400px;
    width: 90%;
    overflow: auto;
    height: 90vh;
}

.welcome-container h2 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: #333;
}

#login-logo {
    max-width: 150px;
    margin: 1rem;
}


/* --- Welcome Screen Specifics --- */
.status-checks p {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px solid #eee;
}

.status-checks .status-icon {
    font-size: 1.2rem;
    color: #ccc;
    transition: color 0.3s ease;
}

.status-checks .status-icon.done {
    color: #28a745;
}

.icofont-spin {
    -webkit-animation: icofont-spin 1.5s infinite linear;
    animation: icofont-spin 1.5s infinite linear;
}

@-webkit-keyframes icofont-spin {
    0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

@keyframes icofont-spin {
    0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}


/* --- PIN Input Styles (Shared) --- */
.pin-container {
    margin: 1.5rem 0;
    visibility: hidden;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.pin-container.visible {
    visibility: visible;
    opacity: 1;
}

.pin-container label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
}

.pin-inputs {
    display: flex;
    justify-content: center;
    gap: 10px;
}

/* Base PIN styles */
.pin-inputs input {
    text-align: center;
    border: 1px solid #ccc;
    border-radius: 5px;
    -moz-appearance: textfield; /* Hide spinners on Firefox */
}
.pin-inputs input::-webkit-outer-spin-button,
.pin-inputs input::-webkit-inner-spin-button {
    -webkit-appearance: none; /* Hide spinners on Chrome/Safari */
    margin: 0;
}

/* Welcome screen PIN inputs */
#welcome-overlay .pin-inputs input {
    width: 40px;
    height: 50px;
    font-size: 1.5rem;
}

/* Login screen PIN inputs */
#login-overlay .pin-inputs input {
    width: 3rem;
    font-size: 2rem;
    border-radius: 8px;
}

/* --- Buttons --- */
#start-app-btn {
    background: #a9b9c8;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 5px;
    font-size: 1rem;
    cursor: not-allowed;
    width: 100%;
    margin-top: 1rem;
    transition: background-color 0.3s ease;
}

#start-app-btn:not(:disabled) {
    background-color: #007bff;
    cursor: pointer;
}

#start-app-btn:not(:disabled):hover {
    background-color: #0056b3;
}


/* --- Shake Animation for Invalid Login PIN --- */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    10%, 30%, 50%, 70%, 90% { transform: translateX(-5px); }
    20%, 40%, 60%, 80% { transform: translateX(5px); }
}

.shake {
    animation: shake 0.5s ease-in-out;
}
