/* =========================================================
 * Trigger button — high visibility
 * ========================================================= */
.bks-open-btn {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: 1rem 2rem;
    background: #d4a017;              /* gold accent */
    color: #fff;
    border: 2px solid #b8890f;
    border-radius: 50px;
    font-size: 1.05rem;
    font-weight: 700;
    letter-spacing: .3px;
    cursor: pointer;
    text-transform: uppercase;
    box-shadow: 0 6px 20px rgba(212,160,23,.45);
    transition: transform .15s, box-shadow .2s, background .2s;
    animation: bksPulse 2.2s infinite;
}
.bks-open-btn:hover {
    background: #e6b12c;
    transform: translateY(-2px) scale(1.03);
    box-shadow: 0 8px 26px rgba(212,160,23,.6);
    animation: none;
}
.bks-open-btn:active {
    transform: translateY(0) scale(.98);
}
@keyframes bksPulse {
    0%, 100% { box-shadow: 0 6px 20px rgba(212,160,23,.45); }
    50%      { box-shadow: 0 6px 30px rgba(212,160,23,.85); }
}

/* Floating variant (auto-injected) */
.bks-open-btn.bks-float {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9998;
    padding: 1.1rem 1.75rem;
    font-size: 1rem;
}
@media (max-width: 600px) {
    .bks-open-btn.bks-float {
        bottom: 16px;
        right: 16px;
        padding: .9rem 1.25rem;
        font-size: .9rem;
    }
}

/* =========================================================
 * Modal — strict hidden-by-default
 * ========================================================= */
.bks-modal {
    position: fixed !important;
    inset: 0;
    z-index: 99999;
    display: none;                /* hidden by default */
    align-items: center;
    justify-content: center;
    padding: 1rem;
    visibility: hidden;           /* extra safety */
    opacity: 0;
    transition: opacity .2s ease, visibility .2s ease;
}
.bks-modal.is-open {
    display: flex;
    visibility: visible;
    opacity: 1;
}
.bks-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,.65);
    backdrop-filter: blur(3px);
}
.bks-modal-panel {
    position: relative;
    z-index: 1;
    width: 100%;
    max-width: 680px;
    max-height: 92vh;
    overflow-y: auto;
    animation: bksFadeIn .25s ease;
}
@keyframes bksFadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 1; transform: translateY(0); }
}
.bks-modal-close {
    position: absolute;
    top: -12px;
    right: -12px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #ddd;
    font-size: 26px;
    line-height: 1;
    color: #333;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,.2);
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: center;
}
.bks-modal-close:hover {
    background: #f5f5f5;
    color: #000;
}
body.bks-modal-open {
    overflow: hidden;
}

/* =========================================================
 * Form
 * ========================================================= */
.bks-form-wrap {
    padding: 2rem;
    background: #fff;
    border-radius: 12px;
    font-family: inherit;
}
.bks-form-wrap h3 {
    margin: 0 0 .5rem;
    font-size: 1.5rem;
    color: #1a1a1a;
}
.bks-form-wrap p.bks-sub {
    margin: 0 0 1.5rem;
    color: #666;
    font-size: .95rem;
}
.bks-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}
.bks-field label {
    display: block;
    font-size: .85rem;
    font-weight: 600;
    color: #333;
    margin-bottom: .35rem;
}
.bks-field input,
.bks-field select {
    width: 100%;
    padding: .75rem .9rem;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    box-sizing: border-box;
    transition: border-color .2s;
    background: #fff;
}
.bks-field input:focus,
.bks-field select:focus {
    outline: none;
    border-color: #2e7d32;
}
.bks-btn {
    width: 100%;
    padding: .95rem;
    background: #2e7d32;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .2s;
}
.bks-btn:hover { background: #256428; }
.bks-btn:disabled { background: #999; cursor: not-allowed; }
.bks-msg {
    margin-top: 1rem;
    padding: .85rem 1rem;
    border-radius: 8px;
    font-size: .9rem;
    display: none;
}
.bks-msg.success { display:block; background:#e8f5e9; color:#1b5e20; border:1px solid #a5d6a7; }
.bks-msg.error   { display:block; background:#ffebee; color:#b71c1c; border:1px solid #ef9a9a; }
.bks-hp { position:absolute; left:-9999px; }

.flatpickr-calendar {
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    z-index: 100000 !important;
}
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: #2e7d32;
    border-color: #2e7d32;
}
.flatpickr-day.inRange {
    background: #e8f5e9;
    border-color: #e8f5e9;
    box-shadow: none;
}

@media (max-width: 560px) {
    .bks-row { grid-template-columns: 1fr; }
    .bks-modal-close { top: 8px; right: 8px; }
}