/**
 * OTP Verification Modal Styles
 * Copyright (c) 2025. IOWEB TECHNOLOGIES
 */

/* Modal Background */
.io-otp-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0, 0, 0, 0.6);
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* Modal Content */
.io-otp-modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 30px;
    border: 1px solid #888;
    border-radius: 8px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: slideDown 0.3s ease;
    position: relative;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Close Button */
.io-otp-modal-close {
    color: #aaa;
    float: right;
    font-size: 32px;
    font-weight: bold;
    line-height: 20px;
    cursor: pointer;
    transition: color 0.3s ease;
}

.io-otp-modal-close:hover,
.io-otp-modal-close:focus {
    color: #000;
}

/* Modal Header */
.io.website_2 .page-footer .footer-middle .io-color-white .io-otp-modal .io-otp-modal-content h2 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #333;
    font-size: 24px;
    font-weight: 600;
}

/* OTP Instructions */
.io.website_2 .page-footer .footer-middle .io-color-white .otp-instruction {
    color: #666 ;
    margin-bottom: 10px;
    font-size: 14px;
}

.io.website_2 .page-footer .footer-middle .io-color-white .otp-phone-display {
    font-weight: bold;
    color: #1979c3;
    margin-bottom: 20px;
    font-size: 16px;
}

/* OTP Form */
.otp-form {
    margin-top: 20px;
}

.otp-input-container {
    margin-bottom: 20px;
}

.otp-input-container label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.otp-input {
    width: 100%;
    padding: 12px 15px;
    font-size: 20px;
    border: 2px solid #ddd;
    border-radius: 4px;
    text-align: center;
    letter-spacing: 8px;
    font-weight: bold;
    transition: border-color 0.3s ease;
}

.otp-input:focus {
    outline: none;
    border-color: #1979c3;
    box-shadow: 0 0 5px rgba(25, 121, 195, 0.3);
}

/* OTP Timer */
.otp-timer-container {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f8f8f8;
    border-radius: 4px;
}

.io.website_2 .page-footer .footer-middle .io-color-white .otp-timer-container p {
    margin: 0;
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

.io.website_2 .page-footer .footer-middle .io-color-white .otp-timer {
    font-weight: bold;
    color: #1979c3;
    font-size: 18px;
}

/* OTP Actions */
.otp-actions {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.otp-actions button {
    flex: 1;
    padding: 12px 20px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 600;
}

.io.website_2 .page-footer .footer-middle .io-color-white .otp-actions .btn-primary {
    background-color: #1979c3;
    color: white;
}

.otp-actions .btn-primary:hover {
    background-color: #145a8c;
}

.io-otp-modal .otp-form .otp-actions .btn-secondary {
    background-color: #f0f0f0;
    color: #333;
}

.otp-actions .btn-secondary:hover:not(:disabled) {
    background-color: #e0e0e0;
}

.otp-actions button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Error Message */
.otp-error-message {
    padding: 12px;
    border-radius: 4px;
    background-color: #fee;
    border: 1px solid #fcc;
    font-size: 14px;
    margin-top: 15px;
    text-align: center;
}

/* Attempts Message */
.otp-attempts-message {
    padding: 10px;
    border-radius: 4px;
    background-color: #fff3cd;
    border: 1px solid #ffc107;
    font-size: 14px;
    text-align: center;
    font-weight: 600;
}

/* Loading Indicator */
.otp-loading {
    text-align: center;
    padding: 20px;
}

.otp-loading .loader {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1979c3;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.io.website_2 .page-footer .footer-middle .io-color-white .otp-loading p {
    color: #333;
    font-size: 14px;
    font-weight: 500;
}

/* Responsive Design */
@media screen and (max-width: 600px) {
    .io-otp-modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
    
    .io-otp-modal-content h2 {
        font-size: 20px;
    }
    
    .otp-input {
        font-size: 18px;
        letter-spacing: 5px;
    }
    
    .otp-actions {
        flex-direction: column;
    }
    
    .otp-actions button {
        width: 100%;
    }
}

/* Order Finder Specific Styles */
.io-order-finder {
    margin-bottom: 20px;
}

.io-order-search-error-container {
    margin-top: 10px;
    color: #c00;
    font-size: 14px;
}

/* Success State */
.otp-success {
    color: #0a0;
    background-color: #efe;
    border-color: #cfc;
}
