.reservation-popover {
    position: absolute;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.2);
    width: 320px;
    z-index: 1050;
    display: none;
    animation: popoverFadeIn 0.2s ease-out;
}

.reservation-popover.show {
    display: block;
}

.reservation-popover::before {
    content: '';
    position: absolute;
    width: 12px;
    height: 12px;
    background: white;
    transform: rotate(45deg);
    z-index: -1;
}

.reservation-popover.position-right::before {
    left: -6px;
    top: 20px;
}

.reservation-popover.position-left::before {
    right: -6px;
    top: 20px;
}

.reservation-popover.position-top::before {
    bottom: -6px;
    left: 50%;
    margin-left: -6px;
}

.reservation-popover.position-bottom::before {
    top: -6px;
    left: 50%;
    margin-left: -6px;
}

.reservation-popover-header {
    padding: 12px 15px;
    border-bottom: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.reservation-popover-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.reservation-popover-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    color: #6c757d;
    transition: background-color 0.2s;
}

.reservation-popover-close:hover {
    background-color: #f0f0f0;
}

.reservation-popover-body {
    padding: 1.25rem;
    max-height: 400px;
    overflow-y: auto;
}

.reservation-popover-footer {
    padding: 12px 15px;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 8px;
}

@keyframes popoverFadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Compact form styles for popover */
.reservation-popover .form-group {
    margin-bottom: 1rem;
}

.reservation-popover .form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #212529;
}

.reservation-popover .form-control,
.reservation-popover .form-select {
    font-size: 0.875rem;
    padding: 6px 10px;
}

.reservation-popover .form-text {
    font-size: 0.75rem;
}

.reservation-popover .form-select {
    display: block;
    width: 100%;
    padding: 0.375rem 2.25rem 0.375rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M2 5l6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 16px 12px;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

.reservation-popover .form-select:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.reservation-popover .form-select option {
    padding: 8px;
    font-size: 14px;
    background-color: #fff;
    color: #212529;
}

/* Fix dropdown appearance on different browsers */
.reservation-popover .form-select::-ms-expand {
    display: none;
}

.reservation-popover .form-select option:checked {
    background-color: #0d6efd;
    color: #fff;
}

/* Ensure dropdowns are visible */
.reservation-popover .form-group {
    position: relative;
}

.reservation-popover .form-select {
    position: relative;
    z-index: 1061;
}

/* Style the dropdown when open */
.reservation-popover .form-select:focus option {
    background-color: #fff;
    color: #212529;
}

.reservation-popover .form-select:focus option:hover,
.reservation-popover .form-select:focus option:focus {
    background-color: #0d6efd;
    color: #fff;
}

/* Mobile styles */
@media (max-width: 576px) {
    .reservation-popover {
        position: fixed;
        top: auto !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        width: 100%;
        border-radius: 12px 12px 0 0;
        max-height: 90vh;
        transform: translateY(100%);
        transition: transform 0.3s ease-out;
    }

    .reservation-popover.show {
        transform: translateY(0);
    }

    .reservation-popover::before {
        display: none;
    }

    .reservation-popover-header {
        padding: 15px;
    }

    .reservation-popover-body {
        max-height: calc(90vh - 130px);
    }
}

/* Status badges */
.status-legend {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
    margin-bottom: 12px;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

.status-badge.reserved {
    background-color: #dc3545;
    color: white;
}

.status-badge.arrived {
    background-color: #ffc107;
    color: #000;
}

.status-badge.paid {
    background-color: #198754;
    color: white;
}

.status-badge.no-show {
    background-color: #212529;
    color: white;
}

/* Source badges */
.source-badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    margin-right: 8px;
}

.source-badge.walk-in {
    background-color: #0d6efd;
    color: white;
}

.source-badge.phone-call {
    background-color: #6610f2;
    color: white;
}

.source-badge.calendly {
    background-color: #20c997;
    color: white;
}

/* Source and Status section */
.source-status-section {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
}

.source-status-section .form-group {
    flex: 1;
}

/* Custom select styling for status */
.status-select {
    border: 2px solid #dee2e6;
    transition: border-color 0.2s;
}

.status-select.reserved {
    border-color: #dc3545;
}

.status-select.arrived {
    border-color: #ffc107;
}

.status-select.paid {
    border-color: #198754;
}

.status-select.no-show {
    border-color: #212529;
}

/* Style the table info alert */
.reservation-popover .table-info {
    background-color: #e7f5ff;
    border-color: #b8daff;
    color: #004085;
} 