/* Calendly-Inspired Internal Scheduler Modal */
.tcdu-modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(5, 10, 18, 0.82);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, visibility 0.2s ease;
}

.tcdu-modal-backdrop.is-open {
    opacity: 1;
    visibility: visible;
}

.tcdu-modal {
    position: relative;
    width: 100%;
    max-width: 920px;
    max-height: 92vh;
    background: #ffffff;
    color: #1a202c;
    border-radius: 12px;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.55);
    display: grid;
    grid-template-columns: 310px 1fr;
    overflow: hidden;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.tcdu-close-btn {
    position: absolute;
    top: 0.85rem;
    right: 0.95rem;
    z-index: 10;
    width: 34px;
    height: 34px;
    border: 1px solid #e2e8f0;
    border-radius: 50%;
    background: #ffffff;
    color: #4a5568;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.15s ease, color 0.15s ease;
}

.tcdu-close-btn:hover {
    background: #edf2f7;
    color: #1a202c;
}

/* Left Host & Event Summary Pane */
.tcdu-sidebar {
    padding: 2rem 1.75rem;
    border-right: 1px solid #e2e8f0;
    background: #f8fafc;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.tcdu-host-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.tcdu-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: #0f172a;
    color: #38bdf8;
    font-weight: 800;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    justify-content: center;
    letter-spacing: 0.04em;
}

.tcdu-host-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #64748b;
}

.tcdu-event-title {
    font-size: 1.35rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.25;
    margin: 0 0 1.25rem 0;
}

.tcdu-meta-list {
    list-style: none;
    padding: 0;
    margin: 0 0 1.5rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    font-size: 0.88rem;
    color: #475569;
}

.tcdu-meta-item {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    line-height: 1.4;
}

.tcdu-meta-icon {
    flex-shrink: 0;
    width: 18px;
    color: #0284c7;
    font-weight: 700;
}

.tcdu-selected-summary {
    padding: 0.85rem;
    border-radius: 8px;
    background: #e0f2fe;
    border: 1px solid #bae6fd;
    color: #0369a1;
    font-size: 0.84rem;
    font-weight: 600;
    line-height: 1.45;
}

.tcdu-sidebar-note {
    font-size: 0.76rem;
    color: #64748b;
    line-height: 1.45;
    margin-top: 1.5rem;
}

/* Right Interactive Workspace */
.tcdu-main {
    padding: 2rem 1.75rem;
    overflow-y: auto;
    max-height: 92vh;
}

.tcdu-step-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.tcdu-back-btn {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    border: 1px solid #cbd5e1;
    background: #ffffff;
    color: #0284c7;
    font-weight: 700;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.tcdu-back-btn:hover {
    background: #f0f9ff;
}

.tcdu-step-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0;
}

/* Calendar + Time Slot Split */
.tcdu-picker-grid {
    display: grid;
    grid-template-columns: 1fr 220px;
    gap: 1.5rem;
    align-items: start;
}

.tcdu-cal-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.tcdu-cal-month {
    font-weight: 700;
    font-size: 0.98rem;
    color: #0f172a;
}

.tcdu-cal-arrows {
    display: flex;
    gap: 0.4rem;
}

.tcdu-arrow-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1px solid #e2e8f0;
    background: #ffffff;
    color: #0284c7;
    font-weight: 700;
    cursor: pointer;
}

.tcdu-arrow-btn:hover:not(:disabled) {
    background: #e0f2fe;
}

.tcdu-arrow-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.tcdu-weekdays,
.tcdu-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    gap: 0.3rem;
}

.tcdu-weekdays span {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    color: #64748b;
    padding-bottom: 0.4rem;
}

.tcdu-day-btn {
    aspect-ratio: 1 / 1;
    border: none;
    border-radius: 50%;
    background: transparent;
    color: #94a3b8;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: default;
}

.tcdu-day-btn.is-available {
    background: #e0f2fe;
    color: #0369a1;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.tcdu-day-btn.is-available:hover {
    background: #bae6fd;
}

.tcdu-day-btn.is-selected {
    background: #0284c7;
    color: #ffffff;
}

/* Time Slots Column */
.tcdu-slots-col {
    border-left: 1px solid #e2e8f0;
    padding-left: 1.25rem;
}

.tcdu-slots-date {
    font-size: 0.88rem;
    font-weight: 600;
    color: #334155;
    margin: 0 0 0.85rem 0;
}

.tcdu-slots-list {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    max-height: 310px;
    overflow-y: auto;
    padding-right: 0.25rem;
}

.tcdu-slot-row {
    display: flex;
    gap: 0.45rem;
}

.tcdu-slot-btn {
    flex: 1;
    padding: 0.65rem 0.5rem;
    border: 1px solid #0284c7;
    border-radius: 6px;
    background: #ffffff;
    color: #0284c7;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.15s ease;
}

.tcdu-slot-btn:hover {
    border-width: 2px;
    background: #f0f9ff;
}

.tcdu-slot-btn.is-picked {
    background: #334155;
    border-color: #334155;
    color: #ffffff;
}

.tcdu-next-btn {
    flex: 1;
    padding: 0.65rem 0.5rem;
    border: none;
    border-radius: 6px;
    background: #0284c7;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
}

.tcdu-next-btn:hover {
    background: #0369a1;
}

/* Step 2: Details Form */
.tcdu-form {
    display: flex;
    flex-direction: column;
    gap: 0.9rem;
}

.tcdu-field label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 0.3rem;
}

.tcdu-field input,
.tcdu-field select,
.tcdu-field textarea {
    width: 100%;
    padding: 0.6rem 0.75rem;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-family: inherit;
    font-size: 0.9rem;
    color: #0f172a;
    background: #ffffff;
    box-sizing: border-box;
}

.tcdu-field input:focus,
.tcdu-field select:focus,
.tcdu-field textarea:focus {
    outline: 2px solid #0284c7;
    border-color: #0284c7;
}

.tcdu-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.85rem;
}

.tcdu-hp-field {
    position: absolute;
    left: -9999px;
    opacity: 0;
    pointer-events: none;
}

.tcdu-error-banner {
    padding: 0.65rem 0.85rem;
    border-radius: 6px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    color: #b91c1c;
    font-size: 0.84rem;
    font-weight: 600;
}

.tcdu-submit-btn {
    margin-top: 0.4rem;
    padding: 0.8rem 1.25rem;
    border: none;
    border-radius: 999px;
    background: #0284c7;
    color: #ffffff;
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    align-self: flex-start;
}

.tcdu-submit-btn:hover:not(:disabled) {
    background: #0369a1;
}

.tcdu-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Step 3: Confirmation View */
.tcdu-confirm-box {
    text-align: center;
    padding: 1.5rem 1rem;
}

.tcdu-check-circle {
    width: 54px;
    height: 54px;
    margin: 0 auto 1rem auto;
    border-radius: 50%;
    background: #dcfce7;
    color: #15803d;
    font-size: 1.6rem;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tcdu-confirm-card {
    text-align: left;
    margin: 1.25rem auto;
    max-width: 440px;
    padding: 1rem 1.25rem;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    background: #f8fafc;
    font-size: 0.88rem;
    line-height: 1.6;
}

.tcdu-ics-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.7rem 1.2rem;
    border-radius: 999px;
    border: 1px solid #0284c7;
    background: #ffffff;
    color: #0284c7;
    font-weight: 700;
    font-size: 0.88rem;
    cursor: pointer;
}

.tcdu-ics-btn:hover {
    background: #f0f9ff;
}

.tcdu-hidden {
    display: none !important;
}

@media (max-width: 820px) {
    .tcdu-modal {
        grid-template-columns: 1fr;
    }
    .tcdu-sidebar {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
        padding: 1.25rem;
    }
    .tcdu-picker-grid {
        grid-template-columns: 1fr;
    }
    .tcdu-slots-col {
        border-left: none;
        border-top: 1px solid #e2e8f0;
        padding-left: 0;
        padding-top: 1rem;
    }
    .tcdu-form-row {
        grid-template-columns: 1fr;
    }
}