/* Synclovis Catalog Gate - Modal Styles */
#scg-gate-modal {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

#scg-gate-modal.scg-modal-visible {
    opacity: 1;
    visibility: visible;
}

.scg-modal-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
}

.scg-modal-container {
    position: relative;
    background: #fff;
    width: 100%;
    max-width: 480px;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    padding: 40px 35px;
    transform: translateY(20px);
    transition: transform 0.3s ease;
    z-index: 1;
}

.scg-modal-visible .scg-modal-container {
    transform: translateY(0);
}

.scg-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border: none;
    background: #f0f0f0;
    border-radius: 50%;
    font-size: 24px;
    line-height: 32px;
    cursor: pointer;
    color: #666;
    transition: background 0.2s, color 0.2s;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-bottom: 4px;
}

.scg-modal-close:hover {
    background: #e0e0e0;
    color: #000;
}

.scg-modal-header {
    margin-bottom: 25px;
    text-align: center;
}

.scg-modal-header h2 {
    margin: 0 0 8px;
    font-size: 24px;
    color: #1a1a1a;
    font-weight: 700;
}

.scg-modal-header p {
    margin: 0;
    color: #666;
    font-size: 14px;
    line-height: 1.5;
}

.scg-form-row {
    margin-bottom: 20px;
}

.scg-form-row label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 13px;
    color: #333;
}

.scg-form-row .required {
    color: #e03e3e;
}

.scg-form-row input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    color: #1a1a1a;
    background: #fafafa;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

.scg-form-row input:focus {
    outline: none;
    border-color: #0073aa;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(0, 115, 170, 0.15);
}

.scg-form-message {
    margin-top: 15px;
    padding: 12px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
    display: none;
}

.scg-form-message.error {
    background: #fff5f5;
    color: #c53030;
    border: 1px solid #feb2b2;
}

.scg-form-message.success {
    background: #f0fff4;
    color: #276749;
    border: 1px solid #9ae6b4;
}

.scg-btn-submit {
    width: 100% !important;
    padding: 14px !important;
    margin-top: 40px !important;
    background: #EB7E31 !important;
    color: #fff !important;
    border: none !important;
    border-radius: 6px !important;
    font-size: 16px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    /* Disable theme's magnetic scripts from moving this button */
    transform: none !important;
    transition: background 0.2s ease !important;
}

/* Also disable magnetic movements on any text/icons inside the button */
.scg-btn-submit * {
    transform: none !important;
    transition: none !important;
}

.scg-btn-submit:hover:not(:disabled) {
    background: #EB7E31 !important;
    color: #fff !important;
    transform: none !important
        /* Keep it static */
}

.scg-btn-submit:active:not(:disabled) {
    transform: scale(0.98) !important;
}

.scg-btn-submit:disabled {
    opacity: 0.7 !important;
    cursor: not-allowed !important;
}

.scg-btn-submit .btn-loader {
    display: none;
}

body.scg-modal-open {
    overflow: hidden;
    padding-right: 15px;
}

@media (max-width: 480px) {
    .scg-modal-container {
        padding: 30px 20px;
        margin: 10px;
    }

    .scg-modal-header h2 {
        font-size: 20px;
    }
}

/* ── OTP Step ── */
#scg-otp-step {
    animation: scg-fade-in 0.25s ease;
}

@keyframes scg-fade-in {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.scg-otp-icon {
    font-size: 44px;
    margin-bottom: 10px;
    display: block;
    line-height: 1;
}

/* Large centered OTP input */
.scg-otp-input {
    width: 100% !important;
    padding: 16px 14px !important;
    border: 2px solid #ddd !important;
    border-radius: 8px !important;
    font-size: 28px !important;
    font-family: 'Courier New', Courier, monospace !important;
    letter-spacing: 8px !important;
    color: #1a1a1a !important;
    background: #fafafa !important;
    box-sizing: border-box !important;
    text-align: center !important;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s !important;
}

.scg-otp-input:focus {
    outline: none !important;
    border-color: #EB7E31 !important;
    background: #fff !important;
    box-shadow: 0 0 0 3px rgba(235, 126, 49, 0.15) !important;
}

.scg-otp-input::placeholder {
    letter-spacing: 4px;
    color: #ccc;
    font-size: 20px;
}

/* Resend row */
.scg-resend-row {
    text-align: center;
    margin-top: 18px;
    font-size: 13px;
    color: #666;
}

.scg-resend-link {
    color: #EB7E31;
    text-decoration: none;
    font-weight: 600;
    margin-left: 4px;
    transition: color 0.2s;
}

.scg-resend-link:hover {
    color: #d06a22;
    text-decoration: underline;
}