/* ─── ROOT COLORS ─── */
#jdkModal {
    --jdk-yellow: #FDC901;
    --jdk-black:  #1A1A1A;
    --jdk-red:    #C20015;
    --jdk-white:  #FFFFFF;
}

/* ─── OVERLAY ─── 
   CRITICAL: Use inset:0 instead of width:100vw — 100vw includes scrollbar 
   and causes horizontal overflow that breaks some themes 
*/
.jdk-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(26, 26, 26, 0.75);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.45s ease, visibility 0.45s ease;
    pointer-events: none;
}
.jdk-modal-overlay.is-active {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
}

/* ─── BOND BALL ─── */
.jdk-bond-ball {
    display: none;
}

/* ─── MODAL BOX ─── */
.jdk-modal-box {
    background: var(--jdk-black);
    width: 92%;
    max-width: 860px;
    max-height: 92vh;
    border-radius: 12px;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    opacity: 0;
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

/* ─── INNER LAYOUT ─── */
.jdk-modal-inner {
    display: flex;
    flex-direction: column;
    opacity: 0;
}
.jdk-modal-overlay.is-active .jdk-modal-inner {
    animation: jdkFadeInner 0.45s ease 0.95s forwards;
}
@keyframes jdkFadeInner {
    to { opacity: 1; }
}

@media (min-width: 768px) {
    .jdk-modal-inner {
        flex-direction: row;
        min-height: 400px;
    }
    .jdk-modal-box {
        overflow-y: hidden;
        max-height: none;
    }
}

/* ─── CLOSE BUTTON ─── */
.jdk-close-btn {
    position: absolute;
    top: 14px; right: 18px;
    background: transparent;
    border: none;
    color: var(--jdk-white);
    font-size: 30px;
    font-weight: 300;
    cursor: pointer;
    z-index: 20;
    line-height: 1;
    transition: transform 0.2s ease, color 0.2s ease;
    padding: 0;
    font-family: Arial, sans-serif;
}
.jdk-close-btn:hover {
    transform: scale(1.25) rotate(90deg);
    color: var(--jdk-yellow);
}

/* ─── EMERGENCY SECTION ─── */
.jdk-modal-emergency {
    background: var(--jdk-red);
    color: var(--jdk-white);
    padding: 36px 28px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
}
@media (min-width: 768px) {
    .jdk-modal-emergency { padding: 52px 42px; }
}
.jdk-modal-emergency h2 {
    font-size: 28px;
    font-weight: 700;
    margin: 0 0 12px;
    line-height: 1.15;
    color: var(--jdk-white);
}
.jdk-modal-emergency p {
    font-size: 16px;
    font-weight: 400;
    margin: 0 0 28px;
    line-height: 1.55;
    color: rgba(255,255,255,0.9);
}

/* Phone button */
.jdk-btn-call {
    background: var(--jdk-white);
    color: var(--jdk-red);
    font-size: 22px;
    font-weight: 900;
    text-decoration: none;
    padding: 18px 22px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    transition: all 0.3s ease;
}
.jdk-btn-call:hover {
    transform: translateY(-3px);
    background: var(--jdk-yellow);
    color: var(--jdk-black);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}
.jdk-phone-icon {
    width: 22px;
    height: 22px;
    fill: currentColor;
    flex-shrink: 0;
}

/* ─── FORM SECTION ─── */
.jdk-modal-form-sec {
    background: var(--jdk-black);
    color: var(--jdk-white);
    padding: 36px 28px;
    flex: 1.25;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
@media (min-width: 768px) {
    .jdk-modal-form-sec { padding: 52px 42px; }
}
.jdk-modal-form-sec h3 {
    color: var(--jdk-yellow);
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 8px;
}
.jdk-modal-form-sec > p {
    font-size: 14px;
    color: #ccc;
    margin: 0 0 22px;
    line-height: 1.55;
}

/* ─── FORM ELEMENTS ─── */
.jdk-form-group {
    margin-bottom: 14px;
    position: relative;
}
.jdk-form-group input,
.jdk-select-field {
    width: 100%;
    padding: 13px 15px;
    border: 1.5px solid #2e2e2e;
    background: #1f1f1f;
    color: #fff;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 15px;
    transition: border-color 0.25s ease;
    appearance: none;
    -webkit-appearance: none;
}
.jdk-select-field {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23FDC901' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
.jdk-select-field option {
    background: #1f1f1f;
    color: #fff;
}
.jdk-form-group input:focus,
.jdk-select-field:focus {
    outline: none;
    border-color: var(--jdk-yellow);
}
.jdk-form-group input::placeholder {
    color: #666;
}

/* Error states */
.jdk-error-msg {
    display: none;
    color: var(--jdk-red);
    font-size: 12px;
    font-weight: 600;
    margin-top: 5px;
}
.jdk-form-group.has-error input,
.jdk-form-group.has-error .jdk-select-field {
    border-color: var(--jdk-red);
}
.jdk-form-group.has-error .jdk-error-msg {
    display: block;
    animation: jdkFadeError 0.3s ease;
}
@keyframes jdkFadeError {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Submit button */
.jdk-btn-submit {
    width: 100%;
    background: var(--jdk-yellow);
    color: var(--jdk-black);
    border: none;
    padding: 15px 20px;
    font-size: 16px;
    font-weight: 800;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 6px;
}
.jdk-btn-submit:hover {
    filter: brightness(0.92);
    transform: translateY(-2px);
    box-shadow: 0 6px 18px rgba(0,0,0,0.3);
}
.jdk-btn-submit:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

/* ─── SUCCESS MESSAGE ─── */
.jdk-success-message {
    text-align: center;
    padding: 30px 20px;
    animation: jdkFadeInner 0.4s ease forwards;
}
.jdk-success-message .jdk-success-icon {
    font-size: 52px;
    display: block;
    margin-bottom: 14px;
}
.jdk-success-message h3 {
    color: var(--jdk-yellow) !important;
    font-size: 22px !important;
    margin: 0 0 8px !important;
    font-weight: 800 !important;
}
.jdk-success-message p {
    color: #ccc !important;
    margin: 0 !important;
}
