/**
 * Frontend TOTP Modal Styles
 */

.divari-totp-modal-frontend {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
}

.divari-totp-modal-content-frontend {
    background: white;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.divari-totp-modal-header-frontend {
    padding: 20px 25px 15px;
    border-bottom: 1px solid #e5e5e5;
    position: relative;
}

.divari-totp-modal-header-frontend h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #333;
}

.divari-totp-modal-close-frontend {
    position: absolute;
    top: 20px;
    right: 25px;
    font-size: 24px;
    font-weight: bold;
    color: #999;
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s;
}

.divari-totp-modal-close-frontend:hover {
    color: #333;
}

.divari-totp-modal-body-frontend {
    padding: 25px;
}

.divari-totp-modal-body-frontend p {
    margin: 0 0 20px 0;
    color: #666;
    line-height: 1.5;
}

.divari-totp-input-group-frontend {
    margin-bottom: 25px;
}

.divari-totp-input-group-frontend label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.divari-totp-input-group-frontend input[type="text"] {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e5e5e5;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.divari-totp-input-group-frontend input[type="text"]:focus {
    outline: none;
    border-color: #0073aa;
}

.divari-totp-input-group-frontend .description {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: #666;
    line-height: 1.4;
}

.divari-totp-modal-actions-frontend {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.divari-totp-modal-actions-frontend .button {
    flex: 1;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.divari-totp-modal-actions-frontend .button-primary {
    background-color: #0073aa;
    color: white;
}

.divari-totp-modal-actions-frontend .button-primary:hover {
    background-color: #005a87;
}

.divari-totp-modal-actions-frontend .button:not(.button-primary) {
    background-color: #f5f5f5;
    color: #333;
}

.divari-totp-modal-actions-frontend .button:not(.button-primary):hover {
    background-color: #e5e5e5;
}

.divari-totp-modal-actions-frontend .button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.divari-totp-status-frontend {
    min-height: 20px;
}

.divari-totp-status-frontend .error {
    color: #d63638;
    background-color: #fef7f1;
    border: 1px solid #f0c0a0;
    padding: 10px 15px;
    border-radius: 4px;
    margin: 0;
}

.divari-totp-status-frontend .success {
    color: #00a32a;
    background-color: #f0f6fc;
    border: 1px solid #72aee6;
    padding: 10px 15px;
    border-radius: 4px;
    margin: 0;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .divari-totp-modal-content-frontend {
        width: 95%;
        margin: 20px;
    }
    
    .divari-totp-modal-header-frontend,
    .divari-totp-modal-body-frontend {
        padding: 20px;
    }
    
    .divari-totp-modal-actions-frontend {
        flex-direction: column;
    }
    
    .divari-totp-modal-actions-frontend .button {
        flex: none;
    }
}

/* WooCommerce compatibility */
.woocommerce-form-login .divari-totp-modal-frontend {
    z-index: 999999;
}

/* Ensure modal appears above other elements */
.divari-totp-modal-frontend {
    z-index: 999999 !important;
}

/* Force modal to show when visible */
.divari-totp-modal-frontend[style*="block"] {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    z-index: 999999 !important;
}

/* Ensure modal shows even with inline style display:none */
.divari-totp-modal-frontend.totp-modal-visible {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background-color: rgba(0, 0, 0, 0.5) !important;
    z-index: 999999 !important;
}
