#wd-modal-overlay {
    position: fixed; top:0; left:0; width:100vw; height:100vh;
    background: rgba(0,0,0,0.30); z-index: 9998;
    transition: opacity 0.2s;
}
#wd-modal-form {
    position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%);
    width: 98%; max-width: 500px; background: #fff; z-index: 9999;
    border-radius: 16px; box-shadow: 0 4px 32px rgba(0,0,0,0.13);
    padding: 0; margin: 0; overflow: visible;
    animation: wd-popin 0.25s cubic-bezier(.24,1.32,.55,1) 1;
}
@keyframes wd-popin {
    0% {transform:translate(-50%,-60%) scale(0.95);}
    100% {transform:translate(-50%,-50%) scale(1);}
}
.wd-modal-content {
    padding: 36px 28px 32px 28px;
    position: relative;
}
.wd-modal-close {
    position: absolute;
    top: -28px; /* Raise up above the modal content */
    right: -28px; /* Place outside modal content */
    background: #fff;
    border: none;
    color: #888;
    font-size: 2em;
    line-height: 1;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.04);
    padding: 6px 16px 10px 16px;
    cursor: pointer;
    font-weight: 500;
    z-index: 10001;
    transition: color 0.2s, background 0.2s;
}
.wd-modal-close:hover { color: #4b00e0; background: #f3eaff }
.wd-modal-title {
    font-size: 1.5em;
    color: #888;
    text-align: center;
    font-weight: 500;
    margin-bottom: 28px;
    letter-spacing: 0.01em;
}
.wd-modal-tabs {
    display: flex; justify-content: center; gap: 16px; margin-bottom: 32px;
}
.wd-modal-tab {
    padding: 12px 32px;
    border: 2px solid #6c00ea;
    background: none;
    color: #6c00ea;
    border-radius: 8px;
    font-size: 1.1em;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s, color .2s;
}
.wd-modal-tab.active,
.wd-modal-tab:focus {
    background: #6c00ea;
    color: #fff;
    outline: none;
}
.wd-modal-form-inner {
    display: flex; flex-direction: column; gap: 18px; margin-top: 0;
}
.wd-tab-panel {
    display: none;
}
.wd-tab-panel.active {
    display: block;
}
.wd-modal-textarea {
    width: 100%;
    padding: 22px 20px;
    border: 1.5px solid #bcbcbc;
    border-radius: 12px;
    font-size: 1.25em;
    color: #757575;
    background: #fff;
    font-family: inherit;
    resize: none;
    outline: none;
    transition: border 0.2s;
}
.wd-modal-textarea:focus { border-color: #6c00ea; }
.wd-modal-submit {
    display: block;
    width: 100%;
    background: #6c00ea;
    color: #fff;
    border: none;
    border-radius: 999px;
    font-size: 1.2em;
    font-weight: 600;
    padding: 14px 0;
    margin-top: 8px;
    cursor: pointer;
    transition: background 0.18s;
    box-shadow: 0 2px 10px rgba(108,0,234,0.09);
}
.wd-modal-submit:hover { background: #4800b2; }

@media (max-width: 600px) {
    #wd-modal-form { max-width: 98vw; }
    .wd-modal-content { padding: 18px 4vw 18px 4vw; }
    .wd-modal-title { font-size: 1.1em; }
    .wd-modal-tab { font-size: 1em; padding: 10px 10vw; }
    .wd-modal-close { top: -18px; right: -10px; padding: 3px 10px 7px 10px; }
}
body.wd-modal-open { overflow: hidden !important; }