/**
 * OTP Form Styles - Matching Homepage_SPAC_VISION_2.jpg
 * Design matches loading-styles.css for consistency
 */

.otp-form-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: #fafafa;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    overflow: hidden;
}

/* Geometric background pattern - matches loading page */
.otp-form-wrapper::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(45deg, rgba(83, 104, 120, 0.03) 1px, transparent 1px),
        linear-gradient(-45deg, rgba(83, 104, 120, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(83, 104, 120, 0.02) 1px, transparent 1px),
        linear-gradient(0deg, rgba(83, 104, 120, 0.02) 1px, transparent 1px);
    background-size: 60px 60px, 60px 60px, 30px 30px, 30px 30px;
    background-position: 0 0, 0 0, 0 0, 0 0;
    opacity: 0.6;
    z-index: 1;
}

/* Main content container */
.otp-form-card {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 600px;
    width: 100%;
    padding: 40px;
}

/* Logo styling - matches loading page with fade-in animation */
.otp-logo {
    margin-bottom: 60px;
    animation: logoFadeIn 1s ease-out;
}

.otp-logo img {
    max-width: 400px;
    height: auto;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

@keyframes logoFadeIn {
    0% {
        opacity: 0;
        transform: translateY(-20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Title and subtitle - minimalist styling */
.otp-title {
    font-family: 'Arial', sans-serif;
    font-size: 24px;
    font-weight: 600;
    color: #536878;
    margin: 0 0 8px 0;
}

.otp-subtitle {
    font-family: 'Arial', sans-serif;
    font-size: 16px;
    color: #7f8c8d;
    margin: 0 0 32px 0;
}

/* Form styling */
.otp-form {
    width: 100%;
    max-width: 400px;
    margin-bottom: 40px;
}

.otp-input-group {
    margin-bottom: 20px;
}

.otp-input {
    width: 100%;
    padding: 14px 16px;
    font-size: 16px;
    font-family: 'Courier New', monospace;
    letter-spacing: 2px;
    text-align: center;
    font-weight: 600;
    border: 2px solid rgba(83, 104, 120, 0.2);
    border-radius: 6px;
    background: white;
    color: #536878;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.otp-input:focus {
    outline: none;
    border-color: #536878;
    box-shadow: 0 0 0 3px rgba(83, 104, 120, 0.1);
}

.otp-input:disabled {
    background-color: #f7fafc;
    cursor: not-allowed;
    opacity: 0.6;
}

.otp-error {
    background-color: #fed7d7;
    color: #c53030;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Arial', sans-serif;
    margin-bottom: 20px;
    border-left: 4px solid #c53030;
}

.otp-submit-btn {
    width: 100%;
    padding: 14px 24px;
    font-size: 16px;
    font-weight: 600;
    font-family: 'Arial', sans-serif;
    color: white;
    background: #383E8A;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 12px rgba(83, 104, 120, 0.3);
}

.otp-submit-btn:hover:not(:disabled) {
    background: #5666e3;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(83, 104, 120, 0.4);
}

.otp-submit-btn:active:not(:disabled) {
    transform: translateY(0);
}

.otp-submit-btn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none !important;
}

.otp-btn-spinner {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer styling for test codes - minimal */
.otp-footer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid rgba(83, 104, 120, 0.2);
    text-align: center;
}

.otp-footer p {
    font-family: 'Arial', sans-serif;
    font-size: 14px;
    color: #7f8c8d;
    margin: 0;
}

.otp-footer code {
    background-color: rgba(83, 104, 120, 0.1);
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #536878;
    font-size: 13px;
}

/* Powered by Utopia footer - matches loading page with fade-in animation */
.otp-powered-footer {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    animation: footerFadeIn 1.5s ease-out;
}

.otp-powered-footer img {
    max-width: 120px;
    height: auto;
    opacity: 0.8;
    filter: grayscale(20%);
}

@keyframes footerFadeIn {
    0% {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    100% {
        opacity: 0.8;
        transform: translateX(-50%) translateY(0);
    }
}

/* Responsive design */
@media (max-width: 768px) {
    .otp-form-card {
        padding: 20px;
        max-width: 90%;
    }
    
    .otp-logo img {
        max-width: 300px;
    }
    
    .otp-title {
        font-size: 20px;
    }
    
    .otp-subtitle {
        font-size: 14px;
    }
    
    .otp-powered-footer {
        bottom: 20px;
    }
    
    .otp-powered-footer img {
        max-width: 90px;
    }
}

@media (max-width: 480px) {
    .otp-logo img {
        max-width: 200px;
    }
    
    .otp-title {
        font-size: 18px;
    }
    
    .otp-subtitle {
        font-size: 13px;
    }
    
    .otp-powered-footer img {
        max-width: 90px;
    }
}

/* Ensure OTP container is hidden by default */
#otp-container {
    display: none;
}

#otp-container.show {
    display: flex;
}
