/**
 * Voxel Booking Calendar — Styles
 */

/* ── Container ──────────────────────────────────────────────────── */
.vbc-calendar {
    position: relative;
    padding: 20px;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.vbc-fc-container {
    min-height: 400px;
}

/* ── Loading spinner ────────────────────────────────────────────── */
.vbc-calendar-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}

.vbc-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid #e0e0e0;
    border-top-color: #4CAF50;
    border-radius: 50%;
    animation: vbc-spin 0.7s linear infinite;
}

@keyframes vbc-spin {
    to { transform: rotate(360deg); }
}

/* ── FullCalendar overrides ─────────────────────────────────────── */
.vbc-calendar .fc {
    font-family: inherit;
}

.vbc-calendar .fc-toolbar-title {
    font-size: 1.2em !important;
    font-weight: 600;
}

.vbc-calendar .fc-button-primary {
    background-color: #4CAF50 !important;
    border-color: #4CAF50 !important;
    font-size: 13px !important;
    padding: 6px 12px !important;
    border-radius: 6px !important;
    text-transform: capitalize;
    font-weight: 500;
}

.vbc-calendar .fc-button-primary:hover {
    opacity: 0.85;
}

.vbc-calendar .fc-button-primary:not(:disabled).fc-button-active,
.vbc-calendar .fc-button-primary:not(:disabled):active {
    background-color: #388E3C !important;
    border-color: #388E3C !important;
}

.vbc-calendar .fc-button-group > .fc-button {
    border-radius: 0 !important;
}

.vbc-calendar .fc-button-group > .fc-button:first-child {
    border-radius: 6px 0 0 6px !important;
}

.vbc-calendar .fc-button-group > .fc-button:last-child {
    border-radius: 0 6px 6px 0 !important;
}

.vbc-calendar .fc-daygrid-event {
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 12px;
    line-height: 1.4;
    border: none;
    overflow: hidden;
}

/* ── Custom event content layout ─────────────────────────────── */
.vbc-event-content {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 2px 5px;
    min-width: 0;
    overflow: hidden;
}

.vbc-event-time {
    font-size: 10px;
    font-weight: 700;
    opacity: 0.85;
    white-space: nowrap;
    background: rgba(255,255,255,0.25);
    border-radius: 3px;
    padding: 0 3px;
    line-height: 1.5;
    flex-shrink: 0;
}

.vbc-event-name {
    font-weight: 600;
    font-size: 11px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    min-width: 0;
    flex: 1 1 auto;
}

.vbc-event-listing {
    font-size: 10px;
    opacity: 0.8;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    width: 100%;
    flex-basis: 100%;
}

.vbc-event-listing-inline {
    font-size: 11px;
    opacity: 0.7;
    white-space: nowrap;
}

/* timeGrid variant: vertical stack inside time slot block. */
.vbc-event-content--tg {
    flex-direction: column;
    gap: 0;
}

.vbc-event-content--tg .vbc-event-name {
    font-size: 12px;
    white-space: normal;
}

.vbc-event-content--tg .vbc-event-listing {
    font-size: 10px;
}

/* list variant: single line. */
.vbc-event-content--list {
    flex-wrap: nowrap;
    gap: 0;
}

.vbc-event-content--list .vbc-event-name {
    font-size: 13px;
}

/* Allow event blocks to expand vertically in dayGrid month. */
.vbc-calendar .fc-daygrid-event-harness {
    margin-bottom: 1px;
}

.vbc-calendar .fc-daygrid-block-event .fc-event-main {
    padding: 1px 4px;
    overflow: hidden;
}

/* Timeslot events: hide FullCalendar's built-in time (we render our own). */
.vbc-calendar .fc-daygrid-event .fc-event-time {
    display: none;
}

.vbc-calendar .fc-daygrid-event .fc-event-title {
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
}

.vbc-calendar .fc-day-today {
    background-color: rgba(76, 175, 80, 0.06) !important;
}

.vbc-calendar .fc-col-header-cell {
    padding: 8px 0;
    font-size: 13px;
    font-weight: 600;
    color: #555;
}

.vbc-calendar .fc-daygrid-day-number {
    font-size: 13px;
    color: #666;
    padding: 6px 8px;
}

.vbc-calendar .fc-list-event-title a {
    color: inherit;
    text-decoration: none;
}

/* ── Controls bar ───────────────────────────────────────────────── */
.vbc-controls-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.vbc-filter-wrap {
    flex: 0 0 auto;
}

.vbc-listing-filter {
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    min-width: 220px;
    cursor: pointer;
    outline: none;
    transition: border-color 0.2s;
}

.vbc-listing-filter:focus {
    border-color: #4CAF50;
}

/* ── Status filter ─────────────────────────────────────────────── */
.vbc-status-filter {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    align-items: center;
}

.vbc-calendar .vbc-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border: 1px solid #e0e0e0;
    border-radius: 20px;
    background: #fff;
    color: #aaa;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
    line-height: 1.4;
    text-decoration: line-through;
    text-decoration-color: rgba(0,0,0,0.2);
    opacity: 0.65;
    outline: none;
    box-shadow: none;
    -webkit-appearance: none;
    appearance: none;
}

.vbc-calendar .vbc-status-pill:hover {
    border-color: #bbb;
    opacity: 0.85;
}

.vbc-calendar .vbc-status-pill--active {
    color: #333;
    border-color: #bbb;
    background: #f5f5f5;
    text-decoration: none;
    opacity: 1;
}

.vbc-status-pill-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
    opacity: 0.35;
    transition: opacity 0.2s;
}

.vbc-status-pill--active .vbc-status-pill-dot {
    opacity: 1;
}

/* ── Stats bar ──────────────────────────────────────────────────── */
.vbc-stats-bar {
    display: flex;
    gap: 20px;
    flex: 0 0 auto;
}

.vbc-stat {
    display: flex;
    align-items: center;
    gap: 6px;
}

.vbc-stat-number {
    font-size: 16px;
    font-weight: 700;
    color: #333;
}

.vbc-stat-label {
    font-size: 12px;
    color: #888;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vbc-stat-action {
    margin-left: auto;
}

.vbc-reindex-btn {
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 11px;
    color: #666;
    cursor: pointer;
    transition: all 0.2s;
}

.vbc-reindex-btn:hover {
    background: #e8e8e8;
    color: #333;
}

.vbc-reindex-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── Legend ──────────────────────────────────────────────────────── */
.vbc-legend {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 14px;
    padding: 0 2px;
}

.vbc-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #666;
}

.vbc-legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    flex-shrink: 0;
}

/* ── Popover ────────────────────────────────────────────────────── */
.vbc-popover {
    position: absolute;
    z-index: 9999;
    width: 320px;
    animation: vbc-fadeIn 0.15s ease;
}

@keyframes vbc-fadeIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.vbc-popover-inner {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    border: 1px solid #eee;
}

.vbc-popover-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    background: #fafafa;
    border-bottom: 1px solid #eee;
}

.vbc-popover-header strong {
    font-size: 15px;
    color: #333;
}

.vbc-popover-close {
    background: none;
    border: none;
    font-size: 20px;
    color: #999;
    cursor: pointer;
    padding: 0;
    line-height: 1;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    transition: background 0.15s;
}

.vbc-popover-close:hover {
    background: #eee;
    color: #333;
}

.vbc-popover-body {
    padding: 14px 16px;
}

.vbc-popover-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 5px 0;
    font-size: 13px;
}

.vbc-popover-row + .vbc-popover-row {
    border-top: 1px solid #f5f5f5;
}

.vbc-popover-label {
    color: #888;
    font-weight: 500;
}

.vbc-popover-value {
    color: #333;
    font-weight: 500;
    text-align: right;
}

.vbc-popover-value a {
    color: #4CAF50;
    text-decoration: none;
}

.vbc-popover-value a:hover {
    text-decoration: underline;
}

/* Status badges */
.vbc-status {
    display: inline-block;
    padding: 2px 10px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: capitalize;
}

.vbc-status--completed {
    background: #e8f5e9;
    color: #2e7d32;
}

.vbc-status--pending_approval {
    background: #fff3e0;
    color: #e65100;
}

.vbc-status--pending_payment {
    background: #e3f2fd;
    color: #1565c0;
}

.vbc-status--cancelled {
    background: #ffebee;
    color: #c62828;
}

.vbc-status--refunded {
    background: #f5f5f5;
    color: #616161;
}

/* ── Addons in popover ──────────────────────────────────────────── */
.vbc-popover-addons {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e0e0e0;
}

.vbc-addon-row {
    display: flex;
    justify-content: space-between;
    padding: 3px 0;
    font-size: 12px;
}

.vbc-addon-label {
    color: #888;
}

.vbc-addon-value {
    color: #555;
    font-weight: 500;
}

/* ── Login notice ───────────────────────────────────────────────── */
.vbc-login-notice {
    text-align: center;
    padding: 40px 20px;
    color: #888;
    font-size: 14px;
}

/* Hide "all-day" label in list view — not useful for bookings */
.vbc-calendar .fc-list-event-time {
    display: none;
}

/* ── iCal Panel ─────────────────────────────────────────────────── */
.vbc-ical-panel {
    margin-top: 20px;
    padding: 18px 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.vbc-ical-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
}

.vbc-ical-header strong {
    font-size: 14px;
    color: #333;
}

.vbc-ical-icon {
    color: #4CAF50;
    flex-shrink: 0;
}

.vbc-ical-desc {
    font-size: 12.5px;
    color: #777;
    margin: 0 0 14px 0;
    line-height: 1.5;
}

.vbc-ical-url-row {
    display: flex;
    align-items: center;
    gap: 6px;
}

.vbc-ical-input {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 7px;
    font-size: 13px;
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    color: #444;
    background: #fff;
    outline: none;
    transition: border-color 0.2s;
    min-width: 0;
}

.vbc-ical-input:focus {
    border-color: #4CAF50;
}

.vbc-ical-copy-btn,
.vbc-ical-regen-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border: 1px solid #ddd;
    border-radius: 7px;
    background: #fff;
    cursor: pointer;
    color: #666;
    flex-shrink: 0;
    transition: all 0.15s;
}

.vbc-ical-copy-btn:hover {
    background: #4CAF50;
    border-color: #4CAF50;
    color: #fff;
}

.vbc-ical-regen-btn:hover {
    background: #FF9800;
    border-color: #FF9800;
    color: #fff;
}

.vbc-ical-copy-btn.vbc-ical-copied {
    background: #4CAF50;
    border-color: #4CAF50;
    color: #fff;
}

.vbc-ical-loading {
    font-size: 13px;
    color: #999;
    padding: 8px 0;
}

.vbc-ical-error {
    font-size: 13px;
    color: #e53935;
}

.vbc-ical-empty {
    font-size: 13px;
    color: #999;
    margin: 0;
}

/* Owner panel: multiple listings */
.vbc-ical-panel--owner .vbc-ical-listings {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.vbc-ical-listing-row {
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
}

.vbc-ical-listing-name {
    font-size: 13px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

/* ── Import Panel ────────────────────────────────────────────────── */
.vbc-import-panel {
    margin-top: 16px;
    padding: 18px 20px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
}

.vbc-import-form {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 16px;
}

.vbc-import-label-input {
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 7px;
    font-size: 13px;
    background: #fff;
    outline: none;
    max-width: 260px;
    transition: border-color 0.2s;
}

.vbc-import-label-input:focus {
    border-color: #78909C;
}

.vbc-import-url-row {
    display: flex;
    gap: 6px;
}

.vbc-import-url-input {
    flex: 1;
    padding: 9px 12px;
    border: 1px solid #ddd;
    border-radius: 7px;
    font-size: 13px;
    font-family: 'SF Mono', 'Fira Code', monospace;
    background: #fff;
    outline: none;
    min-width: 0;
    transition: border-color 0.2s;
}

.vbc-import-url-input:focus {
    border-color: #78909C;
}

.vbc-import-add-btn {
    padding: 9px 18px;
    background: #78909C;
    color: #fff;
    border: none;
    border-radius: 7px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.15s;
}

.vbc-import-add-btn:hover {
    background: #607D8B;
}

.vbc-import-add-btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.vbc-import-listing-select-wrap {
    margin-bottom: 14px;
}

.vbc-import-listing-select {
    padding: 8px 14px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 14px;
    background: #fff;
    min-width: 220px;
    cursor: pointer;
    outline: none;
}

.vbc-import-empty {
    font-size: 13px;
    color: #999;
    margin: 0;
}

/* Import row (each connected calendar) */
.vbc-import-row {
    padding: 12px 14px;
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    margin-bottom: 8px;
}

.vbc-import-row:last-child {
    margin-bottom: 0;
}

.vbc-import-row-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 4px;
}

.vbc-import-row-label {
    font-size: 13px;
    font-weight: 600;
    color: #333;
}

.vbc-import-row-actions {
    display: flex;
    gap: 4px;
}

.vbc-import-sync-btn,
.vbc-import-remove-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 30px;
    border: 1px solid #eee;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    color: #888;
    transition: all 0.15s;
}

.vbc-import-sync-btn:hover {
    background: #78909C;
    border-color: #78909C;
    color: #fff;
}

.vbc-import-remove-btn:hover {
    background: #ef5350;
    border-color: #ef5350;
    color: #fff;
}

.vbc-import-sync-btn.vbc-spinning svg {
    animation: vbc-spin 0.7s linear infinite;
}

.vbc-import-row-url {
    font-size: 11px;
    color: #999;
    font-family: 'SF Mono', 'Fira Code', monospace;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    margin-bottom: 6px;
}

.vbc-import-row-status {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 12px;
}

.vbc-import-status--ok {
    color: #4CAF50;
    font-weight: 500;
}

.vbc-import-status--err {
    color: #ef5350;
    font-weight: 500;
}

.vbc-import-status--pending {
    color: #FF9800;
    font-weight: 500;
}

.vbc-import-row-sync-time {
    color: #aaa;
    font-size: 11px;
}

/* Imported event popover header */
.vbc-popover--imported .vbc-popover-header {
    background: #ECEFF1;
}

/* ── Color picker in import form ───────────────────────────────── */
.vbc-import-form-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.vbc-import-form-row .vbc-import-label-input {
    flex: 1;
}

.vbc-import-color-input {
    width: 38px;
    height: 38px;
    padding: 2px;
    border: 1px solid #ddd;
    border-radius: 7px;
    cursor: pointer;
    background: #fff;
    flex-shrink: 0;
}

.vbc-import-color-input::-webkit-color-swatch-wrapper {
    padding: 2px;
}

.vbc-import-color-input::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

/* ── Color swatch in import rows ──────────────────────────────── */
.vbc-import-color-swatch-wrap {
    position: relative;
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    margin-right: 4px;
}

.vbc-import-color-swatch {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid rgba(0, 0, 0, 0.1);
}

.vbc-import-color-picker {
    position: absolute;
    top: 0;
    left: 0;
    width: 14px;
    height: 14px;
    opacity: 0;
    cursor: pointer;
    border: none;
    padding: 0;
}

/* ── Conflict pulse indicator ─────────────────────────────────── */
.vbc-event-conflict {
    animation: vbc-conflict-pulse 1.5s ease-in-out infinite;
}

@keyframes vbc-conflict-pulse {
    0%, 100% { box-shadow: 0 0 0 2px #FF5722; }
    50% { box-shadow: 0 0 0 4px rgba(255, 87, 34, 0.4); }
}

.vbc-popover-conflict {
    display: inline-block;
    font-size: 11px;
    padding: 1px 8px;
    background: #FFF3E0;
    color: #E65100;
    border-radius: 10px;
    font-weight: 600;
    margin-left: 6px;
}

/* ── Popover action buttons ──────────────────────────────────── */
.vbc-popover-actions {
    display: flex;
    gap: 8px;
    padding: 10px 14px;
    border-top: 1px solid #f0f0f0;
    background: #FAFAFA;
    border-radius: 0 0 10px 10px;
}

.vbc-popover-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    font-weight: 500;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.2s;
    border: none;
    line-height: 1.3;
}

.vbc-popover-btn svg {
    flex-shrink: 0;
}

.vbc-popover-btn--view {
    background: #E3F2FD;
    color: #1565C0;
}

.vbc-popover-btn--view:hover {
    background: #BBDEFB;
}

.vbc-popover-btn--email {
    background: #F3E5F5;
    color: #7B1FA2;
}

.vbc-popover-btn--email:hover {
    background: #E1BEE7;
}

/* ── Sync All button ─────────────────────────────────────────── */
.vbc-import-actions {
    padding: 10px 0 0;
    text-align: right;
}

.vbc-sync-all-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    font-size: 12px;
    font-weight: 500;
    background: #E8F5E9;
    color: #2E7D32;
    border: 1px solid #C8E6C9;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.vbc-sync-all-btn:hover {
    background: #C8E6C9;
}

.vbc-sync-all-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.vbc-sync-all-btn svg {
    flex-shrink: 0;
}

/* ── Print button ────────────────────────────────────────────── */
.vbc-print-btn {
    margin-left: 6px !important;
}

.vbc-print-btn svg {
    vertical-align: middle;
    margin-right: 2px;
}

/* ── Timeslot events ──────────────────────────────────────────── */
.vbc-calendar .fc-timegrid-event .fc-event-main {
    padding: 2px 4px;
}

.vbc-calendar .fc-daygrid-event:not(.fc-daygrid-block-event) {
    font-size: 11px;
}

/* ── Dynamic legend sources ───────────────────────────────────── */
.vbc-legend-item--source {
    opacity: 0.9;
}

/* ── Export links (Google Calendar, .ics download) ────────────── */
.vbc-ical-export-links {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    flex-wrap: wrap;
}

.vbc-ical-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    padding: 5px 10px;
    border-radius: 5px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s;
}

.vbc-ical-link--gcal {
    background: #E8F5E9;
    color: #2E7D32;
}

.vbc-ical-link--gcal:hover {
    background: #C8E6C9;
}

.vbc-ical-link--download {
    background: #E3F2FD;
    color: #1565C0;
}

.vbc-ical-link--download:hover {
    background: #BBDEFB;
}

/* ── Responsive ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .vbc-calendar {
        padding: 12px;
    }

    .vbc-calendar .fc-toolbar {
        flex-direction: column;
        gap: 8px;
    }

    .vbc-calendar .fc-toolbar-title {
        font-size: 1em !important;
    }

    .vbc-calendar .fc-button-primary {
        font-size: 12px !important;
        padding: 5px 8px !important;
    }

    .vbc-controls-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .vbc-listing-filter {
        width: 100%;
        min-width: unset;
    }

    .vbc-stats-bar {
        justify-content: center;
        flex-wrap: wrap;
    }

    .vbc-status-filter {
        justify-content: center;
        gap: 4px;
    }

    .vbc-status-pill {
        padding: 3px 8px;
        font-size: 11px;
    }

    .vbc-popover {
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        right: 0 !important;
        top: auto !important;
        width: 100% !important;
        max-height: 70vh;
        overflow-y: auto;
        border-radius: 16px 16px 0 0;
        box-shadow: 0 -4px 24px rgba(0,0,0,0.2);
        z-index: 10000;
    }

    .vbc-popover-inner {
        border-radius: 16px 16px 0 0;
    }

    .vbc-popover-header {
        padding: 14px 16px 10px;
        position: sticky;
        top: 0;
        background: #fff;
        z-index: 1;
    }

    .vbc-popover-body {
        padding: 0 16px 12px;
    }

    .vbc-popover-actions {
        padding: 12px 16px;
        position: sticky;
        bottom: 0;
        background: #FAFAFA;
    }

    .vbc-popover-btn {
        flex: 1;
        justify-content: center;
        padding: 8px 12px;
        font-size: 13px;
    }

    .vbc-print-btn {
        display: none !important;
    }

    .vbc-legend {
        flex-wrap: wrap;
        gap: 10px;
    }

    .vbc-ical-url-row {
        flex-wrap: wrap;
    }

    .vbc-ical-input {
        width: 100%;
        flex: 1 1 100%;
    }

    .vbc-ical-copy-btn,
    .vbc-ical-regen-btn {
        width: 44px;
        height: 44px;
    }

    .vbc-import-url-row {
        flex-direction: column;
    }

    .vbc-import-add-btn {
        width: 100%;
    }

    .vbc-import-label-input {
        max-width: unset;
    }

    .vbc-import-form-row {
        flex-wrap: wrap;
    }

    .vbc-import-listing-select {
        width: 100%;
        min-width: unset;
    }
}

/* ── Print styles ──────────────────────────────────────────────── */
@media print {
    /* Hide everything except the calendar being printed. */
    body > *:not(.vbc-printing):not(:has(.vbc-printing)) {
        display: none !important;
    }

    /* Fallback: hide common page elements. */
    header, footer, nav, aside,
    .elementor-location-header,
    .elementor-location-footer,
    .site-header, .site-footer, .site-navigation,
    #wpadminbar,
    .vbc-popover,
    .vbc-ical-panel,
    .vbc-import-panel,
    .vbc-print-btn,
    .vbc-reindex-btn,
    .fc-button-group,
    .fc-toolbar .fc-button:not(.fc-today-button) {
        display: none !important;
    }

    /* Show the calendar container. */
    .vbc-calendar,
    .vbc-printing {
        display: block !important;
        box-shadow: none !important;
        border: none !important;
        padding: 0 !important;
        margin: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
    }

    /* Keep the title and today button visible. */
    .vbc-printing .fc-toolbar.fc-header-toolbar {
        display: flex !important;
        justify-content: center !important;
    }

    .vbc-printing .fc-toolbar-title {
        display: block !important;
        font-size: 18pt !important;
        text-align: center !important;
    }

    .vbc-printing .fc-toolbar-chunk:first-child,
    .vbc-printing .fc-toolbar-chunk:last-child {
        display: none !important;
    }

    .vbc-printing .fc-toolbar-chunk:nth-child(2) {
        display: block !important;
        flex: 1;
    }

    /* Calendar grid. */
    .vbc-fc-container {
        min-height: auto !important;
    }

    .vbc-printing .fc-scrollgrid {
        border-color: #999 !important;
    }

    .vbc-printing .fc-col-header-cell,
    .vbc-printing .fc-daygrid-day {
        border-color: #ccc !important;
    }

    .vbc-printing .fc-daygrid-day-number {
        color: #333 !important;
        font-size: 10pt !important;
    }

    /* Events — keep colors, ensure text is readable. */
    .vbc-printing .fc-event {
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
        color-adjust: exact !important;
        font-size: 8pt !important;
        page-break-inside: avoid !important;
    }

    .vbc-printing .fc-event-main {
        color: #fff !important;
    }

    /* Stats bar. */
    .vbc-printing .vbc-stats-bar {
        border: 1px solid #ccc !important;
        padding: 8px 12px !important;
        margin-bottom: 10px !important;
        background: #f9f9f9 !important;
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }

    .vbc-printing .vbc-stat-action {
        display: none !important;
    }

    /* Legend. */
    .vbc-printing .vbc-legend {
        margin-bottom: 10px !important;
    }

    .vbc-printing .vbc-legend-dot {
        print-color-adjust: exact !important;
        -webkit-print-color-adjust: exact !important;
    }

    /* Controls bar. */
    .vbc-printing .vbc-controls-bar {
        margin-bottom: 10px !important;
    }

    .vbc-printing .vbc-filter-wrap {
        display: none !important;
    }

    .vbc-printing .vbc-status-filter {
        display: none !important;
    }

    /* Page setup. */
    @page {
        margin: 1cm;
        size: landscape;
    }
}
