/* ========================================
   Booking Modal & Calendar System
   Caribbean Venture Accelerator
   ======================================== */

/* ══════════════════════════════════════════
   PASSCODE GATE
   ══════════════════════════════════════════ */

/* Full-page lock screen */
.gate-overlay {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    background: linear-gradient(135deg, #0d0a2e 0%, #1a0f4f 45%, #004d40 100%);
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
    flex-direction: column;
}
.gate-overlay.active { display: flex; }

/* Gate card */
.gate-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    max-width: 440px;
    width: 100%;
    text-align: center;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: 0 30px 80px rgba(0,0,0,0.5);
    animation: gateSlideIn 0.4s cubic-bezier(0.34,1.56,0.64,1);
}
@keyframes gateSlideIn {
    from { transform: translateY(30px) scale(0.96); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* Lock icon */
.gate-lock-icon {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00BCD4, #009688);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.8rem;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0,188,212,0.4);
    transition: transform 0.3s;
}
.gate-lock-icon.unlocking {
    animation: unlockPop 0.5s ease forwards;
}
@keyframes unlockPop {
    0%   { transform: scale(1);   }
    50%  { transform: scale(1.25); }
    100% { transform: scale(1);   }
}

/* Titles */
.gate-card h2 {
    font-size: 1.6rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.4rem;
    line-height: 1.2;
}
.gate-card .gate-subtitle {
    color: rgba(255,255,255,0.55);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 2rem;
}
.gate-card .gate-subtitle strong {
    color: #00BCD4;
}

/* Logo in gate */
.gate-logo {
    height: 40px;
    margin-bottom: 2rem;
    opacity: 0.85;
}

/* Input group */
.gate-input-group {
    position: relative;
    margin-bottom: 0.8rem;
}
.gate-input-group i {
    position: absolute;
    left: 1.1rem;
    top: 50%;
    transform: translateY(-50%);
    color: rgba(255,255,255,0.35);
    font-size: 1rem;
    pointer-events: none;
}
.gate-input {
    width: 100%;
    padding: 0.9rem 1rem 0.9rem 2.8rem;
    border-radius: 12px;
    border: 1.5px solid rgba(255,255,255,0.15);
    background: rgba(255,255,255,0.07);
    color: #fff;
    font-size: 1.1rem;
    font-family: 'Inter', monospace;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
    box-sizing: border-box;
}
.gate-input::placeholder {
    color: rgba(255,255,255,0.25);
    letter-spacing: 1px;
    text-transform: none;
    font-size: 0.9rem;
}
.gate-input:focus {
    outline: none;
    border-color: #00BCD4;
    background: rgba(255,255,255,0.1);
}
.gate-input.shake {
    animation: shakeInput 0.4s ease;
    border-color: #e53e3e !important;
}
@keyframes shakeInput {
    0%,100% { transform: translateX(0);    }
    20%     { transform: translateX(-8px); }
    40%     { transform: translateX(8px);  }
    60%     { transform: translateX(-5px); }
    80%     { transform: translateX(5px);  }
}

/* Error message */
.gate-error {
    color: #fc8181;
    font-size: 0.82rem;
    min-height: 1.2rem;
    margin-bottom: 1rem;
    display: block;
}

/* Unlock button */
.gate-btn {
    width: 100%;
    padding: 0.9rem 1rem;
    border-radius: 12px;
    border: none;
    background: linear-gradient(135deg, #00BCD4, #009688);
    color: #fff;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 6px 20px rgba(0,188,212,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    font-family: inherit;
}
.gate-btn:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 26px rgba(0,188,212,0.55);
}
.gate-btn:disabled { opacity: 0.6; cursor: not-allowed; transform: none; }

/* Help text */
.gate-help {
    margin-top: 1.5rem;
    font-size: 0.78rem;
    color: rgba(255,255,255,0.35);
    line-height: 1.6;
}
.gate-help a {
    color: #00BCD4;
    text-decoration: none;
}
.gate-help a:hover { text-decoration: underline; }

/* Divider */
.gate-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0 1rem;
    color: rgba(255,255,255,0.2);
    font-size: 0.75rem;
}
.gate-divider::before,
.gate-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255,255,255,0.12);
}

/* Page content blur when gate is active */
body.gate-locked .page-content {
    filter: blur(8px);
    pointer-events: none;
    user-select: none;
    overflow: hidden;
    max-height: 100vh;
}

/* Tier badges in gate */
.gate-tiers {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 1.8rem;
}
.gate-tier-badge {
    padding: 0.3rem 0.9rem;
    border-radius: 20px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.gate-tier-badge.investor {
    background: rgba(0,188,212,0.2);
    color: #00BCD4;
    border: 1px solid rgba(0,188,212,0.3);
}
.gate-tier-badge.observer {
    background: rgba(107,44,145,0.3);
    color: #ce93d8;
    border: 1px solid rgba(206,147,216,0.3);
}
.gate-tier-badge.founder {
    background: rgba(255,153,51,0.2);
    color: #ffb74d;
    border: 1px solid rgba(255,183,77,0.3);
}

/* Unlock success fade */
.gate-overlay.unlocking {
    animation: gateFadeOut 0.5s ease 0.6s forwards;
}
@keyframes gateFadeOut {
    to { opacity: 0; pointer-events: none; }
}

/* ── Overlay ── */
.booking-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(10, 5, 30, 0.82);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 9000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    animation: fadeOverlay 0.25s ease;
}
.booking-overlay.active {
    display: flex;
}
@keyframes fadeOverlay {
    from { opacity: 0; }
    to   { opacity: 1; }
}

/* ── Modal shell ── */
.booking-modal {
    background: #fff;
    border-radius: 20px;
    width: 100%;
    max-width: 760px;
    max-height: 92vh;
    overflow-y: auto;
    box-shadow: 0 30px 80px rgba(0,0,0,0.4);
    animation: slideModal 0.3s cubic-bezier(0.34,1.56,0.64,1);
    scrollbar-width: thin;
    scrollbar-color: #00BCD4 #f0f0f0;
}
@keyframes slideModal {
    from { transform: translateY(40px) scale(0.97); opacity: 0; }
    to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* ── Modal header ── */
.booking-modal-header {
    background: linear-gradient(135deg, #0d0a2e 0%, #1a0f4f 50%, #00695C 100%);
    padding: 1.5rem 2rem;
    border-radius: 20px 20px 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    position: sticky;
    top: 0;
    z-index: 10;
}
.booking-company-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.booking-company-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    background: rgba(0,188,212,0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00BCD4;
    font-size: 1.4rem;
    flex-shrink: 0;
    border: 1.5px solid rgba(0,188,212,0.4);
}
.booking-company-name {
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    line-height: 1.2;
}
.booking-company-meta {
    color: rgba(255,255,255,0.65);
    font-size: 0.8rem;
    margin-top: 2px;
}
.booking-close-btn {
    background: rgba(255,255,255,0.12);
    border: none;
    color: #fff;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    transition: background 0.2s;
}
.booking-close-btn:hover { background: rgba(255,255,255,0.25); }

/* ── Modal body ── */
.booking-modal-body {
    padding: 2rem;
}

/* ── Step indicator ── */
.booking-steps {
    display: flex;
    align-items: center;
    gap: 0;
    margin-bottom: 2rem;
}
.booking-step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    flex: 1;
    text-align: center;
}
.booking-step-dot .dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e9ecef;
    color: #aaa;
    font-size: 0.8rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s;
    border: 2px solid transparent;
}
.booking-step-dot.active .dot {
    background: linear-gradient(135deg, #00BCD4, #009688);
    color: #fff;
    border-color: transparent;
    box-shadow: 0 4px 12px rgba(0,188,212,0.4);
}
.booking-step-dot.done .dot {
    background: #009688;
    color: #fff;
}
.booking-step-dot .dot-label {
    font-size: 0.7rem;
    color: #aaa;
    font-weight: 500;
}
.booking-step-dot.active .dot-label { color: #00BCD4; font-weight: 700; }
.booking-step-dot.done .dot-label   { color: #009688; }
.booking-step-line {
    flex: 0.5;
    height: 2px;
    background: #e9ecef;
    margin-bottom: 18px;
    transition: background 0.3s;
}
.booking-step-line.done { background: #009688; }

/* ── Section labels ── */
.booking-section-label {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.2px;
    color: #00BCD4;
    margin-bottom: 0.8rem;
}

/* ── Time slot grid ── */
.slots-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 0.6rem;
    margin-bottom: 1.8rem;
}
.slot-btn {
    padding: 0.6rem 0.4rem;
    border-radius: 10px;
    border: 2px solid #e9ecef;
    background: #fff;
    cursor: pointer;
    text-align: center;
    font-size: 0.82rem;
    font-weight: 600;
    color: #2D3748;
    transition: all 0.18s ease;
    position: relative;
}
.slot-btn:hover:not(.slot-taken):not(.slot-selected) {
    border-color: #00BCD4;
    background: rgba(0,188,212,0.06);
    color: #00838F;
}
.slot-btn.slot-selected {
    border-color: #00BCD4;
    background: linear-gradient(135deg, #00BCD4, #009688);
    color: #fff;
    box-shadow: 0 4px 14px rgba(0,188,212,0.35);
}
.slot-btn.slot-taken {
    background: #f5f5f5;
    color: #bbb;
    cursor: not-allowed;
    border-color: #eee;
    text-decoration: line-through;
}
.slot-time { display: block; font-size: 0.88rem; }
.slot-avail {
    display: block;
    font-size: 0.65rem;
    font-weight: 400;
    margin-top: 2px;
    opacity: 0.75;
}
.slot-btn.slot-taken .slot-avail { color: #e53e3e; }

/* ── Booking form ── */
.booking-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}
@media (max-width: 540px) {
    .booking-form-grid { grid-template-columns: 1fr; }
    .slots-grid { grid-template-columns: repeat(3, 1fr); }
}

.bf-group {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}
.bf-group.full-width { grid-column: 1 / -1; }
.bf-group label {
    font-size: 0.8rem;
    font-weight: 600;
    color: #4a5568;
}
.bf-group input,
.bf-group select,
.bf-group textarea {
    padding: 0.65rem 0.9rem;
    border: 1.5px solid #e2e8f0;
    border-radius: 10px;
    font-size: 0.9rem;
    font-family: inherit;
    color: #1A202C;
    transition: border-color 0.2s;
    background: #fafafa;
}
.bf-group input:focus,
.bf-group select:focus,
.bf-group textarea:focus {
    outline: none;
    border-color: #00BCD4;
    background: #fff;
}
.bf-group textarea { resize: vertical; min-height: 70px; }

/* ── Selected slot badge ── */
.selected-slot-badge {
    display: none;
    align-items: center;
    gap: 0.5rem;
    background: rgba(0,188,212,0.1);
    border: 1.5px solid #00BCD4;
    border-radius: 10px;
    padding: 0.6rem 1rem;
    margin-bottom: 1.4rem;
    font-size: 0.88rem;
    font-weight: 600;
    color: #006978;
}
.selected-slot-badge.visible { display: flex; }
.selected-slot-badge i { color: #00BCD4; }

/* ── Buttons ── */
.booking-actions {
    display: flex;
    gap: 0.8rem;
    justify-content: flex-end;
    margin-top: 1.8rem;
    flex-wrap: wrap;
}
.btn-book-back {
    padding: 0.75rem 1.5rem;
    border-radius: 25px;
    border: 2px solid #e2e8f0;
    background: #fff;
    color: #4a5568;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-book-back:hover { border-color: #aaa; color: #1A202C; }
.btn-book-next {
    padding: 0.75rem 2rem;
    border-radius: 25px;
    border: none;
    background: linear-gradient(135deg, #00BCD4, #009688);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 14px rgba(0,188,212,0.35);
}
.btn-book-next:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(0,188,212,0.45); }
.btn-book-next:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* ── Validation error ── */
.bf-error {
    font-size: 0.75rem;
    color: #e53e3e;
    margin-top: 2px;
    display: none;
}
.bf-group.has-error input,
.bf-group.has-error select { border-color: #e53e3e; }
.bf-group.has-error .bf-error { display: block; }

/* ── Slot required message ── */
.slot-required-msg {
    display: none;
    color: #e53e3e;
    font-size: 0.8rem;
    margin-top: -1rem;
    margin-bottom: 1rem;
}
.slot-required-msg.visible { display: block; }

/* ── Success screen ── */
.booking-success {
    display: none;
    text-align: center;
    padding: 2rem 1rem;
}
.booking-success.active { display: block; }
.success-icon-circle {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #00BCD4, #009688);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: #fff;
    box-shadow: 0 8px 24px rgba(0,188,212,0.4);
}
.booking-success h3 {
    font-size: 1.5rem;
    font-weight: 800;
    color: #1A202C;
    margin-bottom: 0.5rem;
}
.booking-success p {
    color: #4a5568;
    line-height: 1.7;
    max-width: 420px;
    margin: 0 auto 0.5rem;
}
.booking-ref {
    display: inline-block;
    background: #f0fffe;
    border: 1.5px solid #00BCD4;
    border-radius: 10px;
    padding: 0.5rem 1.2rem;
    font-family: monospace;
    font-size: 1rem;
    font-weight: 700;
    color: #006978;
    margin: 1rem 0;
    letter-spacing: 2px;
}
.btn-close-success {
    margin-top: 1rem;
    padding: 0.75rem 2rem;
    border-radius: 25px;
    border: none;
    background: linear-gradient(135deg, #00BCD4, #009688);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-close-success:hover { transform: translateY(-2px); }

/* ── Spinner ── */
.btn-spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(255,255,255,0.5);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Legend ── */
.slot-legend {
    display: flex;
    gap: 1.2rem;
    font-size: 0.75rem;
    color: #4a5568;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}
.slot-legend span {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}
.legend-dot {
    width: 12px; height: 12px;
    border-radius: 3px;
    display: inline-block;
}
.legend-dot.available  { background: #fff; border: 2px solid #e2e8f0; }
.legend-dot.selected   { background: linear-gradient(135deg, #00BCD4, #009688); }
.legend-dot.booked     { background: #f5f5f5; border: 2px solid #eee; }

/* ── "Book a slot" button on card ── */
.mm-book-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border-radius: 25px;
    border: none;
    background: linear-gradient(135deg, #00BCD4, #009688);
    color: #fff;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    width: 100%;
    box-shadow: 0 4px 12px rgba(0,188,212,0.3);
}
.mm-book-btn:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,188,212,0.45); }
.mm-card-footer { display: flex; flex-direction: column; gap: 0.5rem; }
