/* Custom Professional STJ Popup */
.custom-stj-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(14, 30, 29, 0.85); /* Premium dark overlay matching footer #0E1E1D */
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
}
.custom-stj-popup-overlay.is-active {
    opacity: 1;
    visibility: visible;
}
body.custom-stj-popup-locked {
    overflow: hidden !important;
}
.custom-stj-popup-modal {
    background: #ffffff;
    width: 90%;
    max-width: 420px;
    border-radius: 12px;
    padding: 24px;
    position: relative;
    transform: scale(0.95) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: flex;
    flex-direction: column;
    max-height: 95vh;
    overflow: hidden; /* No scrollbar ever */
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    box-sizing: border-box;
}
.custom-stj-popup-overlay.is-active .custom-stj-popup-modal {
    transform: scale(1) translateY(0);
}
.custom-stj-popup-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #f1f5f9;
    border: none;
    font-size: 20px;
    line-height: 1;
    color: #64748b;
    cursor: pointer;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.2s ease;
}
.custom-stj-popup-close:hover, .custom-stj-popup-close:focus {
    background: #e2e8f0;
    color: #0f172a;
    outline: none;
}
.custom-stj-popup-title {
    margin: 0 0 5px 0;
    font-size: 22px;
    font-weight: 700;
    color: #002C29;
    line-height: 1.2;
}
.custom-stj-popup-desc {
    margin: 0 0 15px 0;
    font-size: 13px;
    color: #475569;
    line-height: 1.4;
}
.custom-stj-input-group {
    margin-bottom: 12px;
    text-align: left;
}
.custom-stj-input-group label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    margin-bottom: 4px;
}
.custom-stj-input-group label .required {
    color: #ef4444;
}
.custom-stj-input-group input, 
.custom-stj-input-group textarea {
    width: 100%;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    color: #0f172a;
    font-family: inherit;
    font-size: 14px;
    box-sizing: border-box;
    transition: 0.2s ease;
}
.custom-stj-input-group input {
    height: 38px;
    padding: 0 12px;
}
.custom-stj-input-group textarea {
    height: 55px;
    padding: 8px 12px;
    resize: none;
}
.custom-stj-input-group input:focus, 
.custom-stj-input-group textarea:focus {
    outline: none;
    border-color: #002C29;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(0, 44, 41, 0.1);
}
.custom-stj-popup-submit {
    width: 100%;
    height: 44px;
    background: #002C29; /* Brand color */
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 5px;
}
.custom-stj-popup-submit:hover, .custom-stj-popup-submit:focus {
    background: #001f1d;
    outline: none;
}
.custom-stj-popup-submit:active {
    transform: translateY(1px);
}
.custom-stj-popup-submit:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}
.cp-form-msg {
    margin-top: 15px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    padding: 12px;
    border-radius: 6px;
}
.cp-form-msg.success {
    background: #dcfce7;
    color: #166534;
}
.cp-form-msg.error {
    background: #fee2e2;
    color: #991b1b;
}

/* Responsive adjustments */
@media (max-width: 480px), (max-height: 700px) {
    .custom-stj-popup-modal {
        padding: 20px;
    }
    .custom-stj-popup-title {
        font-size: 18px;
    }
    .custom-stj-popup-desc {
        font-size: 12px;
        margin-bottom: 12px;
    }
    .custom-stj-input-group {
        margin-bottom: 10px;
    }
    .custom-stj-input-group input {
        height: 34px;
        font-size: 13px;
    }
    .custom-stj-input-group textarea {
        height: 45px;
        font-size: 13px;
    }
    .custom-stj-popup-submit {
        height: 40px;
        font-size: 14px;
    }
}