/* Table Seating Layout Styles */

.venue-container {
    position: relative;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 15px;
    background: linear-gradient(135deg, #f5f7fa 0%, #e8eef5 100%);
    border-radius: 12px;
    min-height: 600px;
    overflow: visible;
}

/* Venue Layout Grid */
.venue-layout {
    /*position: relative;*/
    display: grid;
    grid-template-columns: repeat(9, minmax(70px, 1fr));
    grid-template-rows: auto repeat(4, 1fr) auto;
    grid-auto-rows: minmax(16px, auto);
    gap: 16px;
    /* padding: 15px; */
    min-height: 500px;
    overflow: visible;
}
/* Grid position utility classes (rows 1-5, cols 1-9) */
.pos-r1-c1 { grid-row: 1; grid-column: 1; }
.pos-r1-c2 { grid-row: 1; grid-column: 2; }
.pos-r1-c3 { grid-row: 1; grid-column: 3; }
.pos-r1-c4 { grid-row: 1; grid-column: 4; }
.pos-r1-c5 { grid-row: 1; grid-column: 5; }
.pos-r1-c6 { grid-row: 1; grid-column: 6; }
.pos-r1-c7 { grid-row: 1; grid-column: 7; }
.pos-r1-c8 { grid-row: 1; grid-column: 8; }
.pos-r1-c9 { grid-row: 1; grid-column: 9; }
.pos-r2-c1 { grid-row: 2; grid-column: 1; }
.pos-r2-c2 { grid-row: 2; grid-column: 2; }
.pos-r2-c3 { grid-row: 2; grid-column: 3; }
.pos-r2-c4 { grid-row: 2; grid-column: 4; }
.pos-r2-c5 { grid-row: 2; grid-column: 5; }
.pos-r2-c6 { grid-row: 2; grid-column: 6; }
.pos-r2-c7 { grid-row: 2; grid-column: 7; }
.pos-r2-c8 { grid-row: 2; grid-column: 8; }
.pos-r2-c9 { grid-row: 2; grid-column: 9; }
.pos-r3-c1 { grid-row: 3; grid-column: 1; }
.pos-r3-c2 { grid-row: 3; grid-column: 2; }
.pos-r3-c3 { grid-row: 3; grid-column: 3; }
.pos-r3-c4 { grid-row: 3; grid-column: 4; }
.pos-r3-c5 { grid-row: 3; grid-column: 5; }
.pos-r3-c6 { grid-row: 3; grid-column: 6; }
.pos-r3-c7 { grid-row: 3; grid-column: 7; }
.pos-r3-c8 { grid-row: 3; grid-column: 8; }
.pos-r3-c9 { grid-row: 3; grid-column: 9; }
.pos-r4-c1 { grid-row: 4; grid-column: 1; }
.pos-r4-c2 { grid-row: 4; grid-column: 2; }
.pos-r4-c3 { grid-row: 4; grid-column: 3; }
.pos-r4-c4 { grid-row: 4; grid-column: 4; }
.pos-r4-c5 { grid-row: 4; grid-column: 5; }
.pos-r4-c6 { grid-row: 4; grid-column: 6; }
.pos-r4-c7 { grid-row: 4; grid-column: 7; }
.pos-r4-c8 { grid-row: 4; grid-column: 8; }
.pos-r4-c9 { grid-row: 4; grid-column: 9; }
.pos-r5-c1 { grid-row: 5; grid-column: 1; }
.pos-r5-c2 { grid-row: 5; grid-column: 2; }
.pos-r5-c3 { grid-row: 5; grid-column: 3; }
.pos-r5-c4 { grid-row: 5; grid-column: 4; }
.pos-r5-c5 { grid-row: 5; grid-column: 5; }
.pos-r5-c6 { grid-row: 5; grid-column: 6; }
.pos-r5-c7 { grid-row: 5; grid-column: 7; }
.pos-r5-c8 { grid-row: 5; grid-column: 8; }
.pos-r5-c9 { grid-row: 5; grid-column: 9; }
/* Span utility classes */
.span-r2 { grid-row: span 2; }
.span-c2 { grid-column: span 2; }
.span-c3 { grid-column: span 3; }
/* Make table figures look like preview modal */
.table-item {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #0d6efd;
    background: #e9f2ff;
    color: #0d6efd;
    font-family: "Playfair Display", serif;
}
.table-item .table-number,
.table-item .table-type {
    position: absolute;
    left: 8px;
    right: 8px;
    text-align: center;
    font-weight: 600;
}
.table-item .table-number { font-size: 0.9rem; }
.table-item .table-type { bottom: 6px; font-size: 0.85rem; }
.table-item .person-count {
    position: absolute;
    bottom: 6px;
    right: 6px;
    background: #0d6efd;
    color: #fff;
    border-radius: 10px;
    padding: 2px 6px;
    font-size: 0.75rem;
}

/* Center items within each grid cell and add inner margins */
.venue-layout > * {
    align-self: center;
    justify-self: center;
    width: 100%;
}

/* Novios Table - Top Center */
.table-novios {
    grid-column: 4 / 6;
    grid-row: 1;
    background: linear-gradient(135deg, #ffd700 0%, #ffed4e 100%);
    border: 3px solid #d4af37;
    color: #2b2b2b;
    font-weight: 600;
    padding: 15px;
    border-radius: 12px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
    position: relative;
    z-index: 10;
}

.table-novios .table-label {
    font-size: 1.1rem;
    font-family: "Playfair Display", serif;
    white-space: normal;
    word-break: break-word;
    text-align: center;
}

.table-novios .preview-capacity {
    position: absolute;
    bottom: 6px;
    right: 6px;
}

/* Tables Grid */
.table-item {
    position: relative;
    background: #a8d8ea;
    border: 2px solid #6ab0d1;
    padding: 0; /* let aspect ratio control geometry */
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0; /* avoid forcing square-like shapes */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Table Types */
.table-round {
    border-radius: 50%;
    aspect-ratio: 1;
}

.table-square {
    border-radius: 8px;
    aspect-ratio: 1;
}

.table-rectangular-horizontal {
    border-radius: 8px;
    aspect-ratio: 1.8 / 1; /* wider than tall */
    width: 100%;
}

.table-rectangular-vertical {
    border-radius: 8px;
    aspect-ratio: 1 / 1.8; /* taller than wide */
    width: 100%;
}

.table-item.dark-blue {
    background: #6ab0d1;
    border-color: #4a8fb0;
}

.table-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    border-color: #e8a5b6;
}

.table-item.drag-over {
    border: 3px dashed #e8a5b6;
    background: #f0d9e2;
    transform: scale(1.05);
}

.table-number {
    font-weight: 600;
    font-size: 1.2rem;
    color: #2b2b2b;
}

.table-type {
    font-size: 0.7rem;
    color: #2b2b2b;
    opacity: 0.8;
    margin-top: 2px;
    font-weight: 500;
}

.person-count {
    position: absolute;
    top: 5px;
    right: 5px;
    background: #e8a5b6;
    color: white;
    border-radius: 50%;
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}

/* Dance Floor (PISTA): square spanning rows 2-3 and columns 4-6, with inner circle */
.dance-floor {
    grid-column: 4 / 7; /* columns 4-6 */
    grid-row: 2 / 4;    /* rows 2-3 */
    background: linear-gradient(135deg, #ffb6c1 0%, #ffd1dc 100%);
    border: 3px dashed #e8a5b6;
    border-radius: 8px; /* square container */
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    color: #2b2b2b;
    font-size: 1.1rem;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 5;
    position: relative;
    height: 200px;
}
.dance-floor .dance-circle {
    width: 70%;
    height: 70%;
    border-radius: 50%;
    border: 2px solid #e8a5b6;
    background: rgba(232, 165, 182, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}
.dance-floor .dance-label {
    position: absolute;
    top: 8px;
    left: 0;
    right: 0;
    text-align: center;
    font-size: 0.9rem;
}

/* DJ Booth */
.dj-booth {
    grid-column: 4 / 7;
    grid-row: 5;
    background: linear-gradient(135deg, #8b7d6b 0%, #a89f91 100%);
    border: 2px solid #6b6158;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Bar */
.bar-area {
    grid-column: 5 / 6;
    grid-row: 6;
    background: linear-gradient(135deg, #d2691e 0%, #e89b6e 100%);
    border: 2px solid #a0522d;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    padding: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Unassigned Persons Sidebar */
.unassigned-sidebar {
    background: var(--mm-surface);
    border: 1px solid var(--mm-border);
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Assigned Persons Sidebar */
.assigned-sidebar {
    background: var(--mm-surface);
    border: 1px solid var(--mm-border);
    border-radius: 10px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

/* Collapsible Sidebar Styles */
.sidebar-header {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    padding: 15px 15px 10px 15px;
    border-bottom: 1px solid var(--mm-border);
    transition: background-color 0.2s ease;
    position: relative;
}

.sidebar-header:hover {
    background: rgba(0, 0, 0, 0.02);
}

.sidebar-header h5 {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--mm-primary, #2b2b2b);
    font-weight: 600;
    font-size: 0.95rem;
}

.collapse-icon {
    font-size: 0.8rem;
    color: #6c757d;
    transition: transform 0.2s ease;
    font-family: monospace;
    line-height: 1;
}

.sidebar-content {
    overflow: hidden;
    transition: max-height 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 1;
}

.sidebar-content.collapsed {
    opacity: 0;
    overflow: hidden;
    max-height: 0 !important;
}

.sidebar-content > div {
    padding: 0 15px 15px 15px;
    max-height: 40vh;
    overflow-y: auto;
}

/* Table Group Styles */
.table-group {
    margin-bottom: 15px;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: #fafbfc;
    overflow: hidden;
}

.table-group-header {
    background: linear-gradient(135deg, #e8a5b6 0%, #d37a92 100%);
    color: white;
    padding: 8px 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: 600;
    font-size: 0.85rem;
}

.table-group-title {
    font-weight: 600;
}

.table-group-count {
    background: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.table-group-content {
    padding: 8px 0;
    background: white;
}

.table-group:last-child {
    margin-bottom: 0;
}

/* Capacity warning styles */
.table-group-count.capacity-warning {
    background: #ffc107;
    color: #212529;
}

.table-group-count.capacity-full {
    background: #dc3545;
    color: white;
}

.unassigned-person {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 8px;
    cursor: move;
    transition: all 0.2s ease;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.unassigned-person:hover {
    background: #e9ecef;
    border-color: #e8a5b6;
    transform: translateX(5px);
}

.unassigned-person.dragging {
    opacity: 0.5;
    transform: scale(0.95);
}



.assigned-person {
    background: #e8f5e9;
    border: 1px solid #a5d6a7;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 8px;
    transition: all 0.2s ease;
}

.assigned-person:hover {
    background: #c8e6c9;
    border-color: #81c784;
}

.assigned-person .person-name {
    font-weight: 500;
    color: #2b2b2b;
    margin-bottom: 4px;
}

.assigned-person small {
    display: block;
    color: #1b5e20;
    font-size: 0.85rem;
}

/* Tooltip */
.table-tooltip {
    position: absolute;
    background: rgba(43, 43, 43, 0.95);
    color: white;
    padding: 10px 15px;
    border-radius: 6px;
    font-size: 0.9rem;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    max-width: 250px;
}

.table-tooltip ul {
    margin: 0;
    padding-left: 20px;
    list-style-type: disc;
}

.table-tooltip li {
    margin: 3px 0;
}

/* Modal Styles */
.modal-search-input {
    border: 2px solid #dee2e6;
    border-radius: 6px;
    padding: 10px;
    font-size: 1rem;
    transition: border-color 0.2s ease;
}

.modal-search-input:focus {
    border-color: #e8a5b6;
    outline: none;
    box-shadow: 0 0 0 3px rgba(232, 165, 182, 0.2);
}

.assigned-person-item {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 10px 12px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.remove-person-btn {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 4px 8px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background 0.2s ease;
}

.remove-person-btn:hover {
    background: #c82333;
}

.search-result-item {
    padding: 10px 12px;
    border-bottom: 1px solid #dee2e6;
    cursor: pointer;
    transition: background 0.2s ease;
}

.search-result-item:hover {
    background: #f8f9fa;
}

.search-result-item:last-child {
    border-bottom: none;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 10px 20px;
    border-radius: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
}

/* Table List in Modal */
.table-list-group {
    margin-bottom: 20px;
}

.table-list-header {
    background: var(--mm-primary);
    color: white;
    padding: 10px 15px;
    border-radius: 6px 6px 0 0;
    font-weight: 600;
}

.table-list-body {
    background: white;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 6px 6px;
    padding: 10px 15px;
}

/* Import Modal Styles */
.import-preview {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 15px;
    margin: 15px 0;
}

.import-metadata {
    margin-bottom: 10px;
}

.import-warning {
    background: #fff3cd;
    border: 1px solid #ffc107;
    border-radius: 6px;
    padding: 10px;
    margin: 10px 0;
    color: #856404;
}

.import-error {
    background: #f8d7da;
    border: 1px solid #dc3545;
    border-radius: 6px;
    padding: 10px;
    margin: 10px 0;
    color: #721c24;
}

.import-success {
    background: #d4edda;
    border: 1px solid #28a745;
    border-radius: 6px;
    padding: 10px;
    margin: 10px 0;
    color: #155724;
}

/* File Upload */
.file-upload-area {
    border: 2px dashed #dee2e6;
    border-radius: 6px;
    padding: 30px;
    text-align: center;
    transition: all 0.2s ease;
    cursor: pointer;
}

.file-upload-area:hover {
    border-color: #e8a5b6;
    background: #f8f9fa;
}

.file-upload-area.drag-over {
    border-color: #e8a5b6;
    background: #fdf2f5;
}

/* Responsive Design */
@media (max-width: 1400px) {
    .venue-container {
        max-width: 100%;
        padding: 12px;
    }
    
    .venue-layout {
        gap: 10px;
        padding: 12px;
    }
}

@media (max-width: 1200px) {
    .venue-container {
        padding: 10px;
        min-height: 500px;
    }
    
    .venue-layout {
        grid-template-columns: repeat(6, 1fr);
        gap: 10px;
        padding: 10px;
        min-height: 450px;
    }
    
    .table-item {
        min-height: 70px;
        padding: 10px;
    }
    
    .dance-floor {
        grid-column: 3 / 5;
    }
    
    .table-novios {
        grid-column: 3 / 5;
    }
    
    .sidebar-header {
        padding: 12px 12px 8px 12px;
    }
    
    .sidebar-header h5 {
        font-size: 0.9rem;
    }
    
    .sidebar-content > div {
        padding: 0 12px 12px 12px;
        max-height: 35vh;
    }
}

@media (max-width: 992px) {
    .venue-container {
        min-height: 450px;
        max-height: 75vh;
    }
    
    .venue-layout {
        grid-template-columns: repeat(5, 1fr);
        gap: 8px;
        padding: 8px;
        min-height: 400px;
    }
    
    .table-item {
        min-height: 65px;
        padding: 8px;
    }
    
    .table-number {
        font-size: 1rem;
    }
    
    .table-type {
        font-size: 0.65rem;
    }
    
    .dance-floor {
        grid-column: 2 / 4;
        font-size: 0.9rem;
    }
    
    .table-novios {
        grid-column: 2 / 4;
    }
    
    .sidebar-header {
        padding: 10px 10px 6px 10px;
    }
    
    .sidebar-header h5 {
        font-size: 0.85rem;
    }
    
    .sidebar-content > div {
        padding: 0 10px 10px 10px;
        max-height: 30vh;
    }
}

@media (max-width: 768px) {
    .venue-container {
        padding: 8px;
        min-height: 400px;
        max-height: 70vh;
    }
    
    .venue-layout {
        grid-template-columns: repeat(4, 1fr);
        gap: 8px;
        padding: 8px;
        min-height: 350px;
    }
    
    .table-item {
        min-height: 60px;
        padding: 6px;
    }
    
    .table-number {
        font-size: 0.9rem;
    }
    
    .table-type {
        font-size: 0.6rem;
    }
    
    .person-count {
        width: 22px;
        height: 22px;
        font-size: 0.75rem;
    }
    
    .dance-floor {
        grid-column: 2 / 4;
        font-size: 0.8rem;
    }
    
    .table-novios {
        grid-column: 2 / 4;
    }
    
    .dj-booth,
    .bar-area {
        grid-column: auto;
        font-size: 0.8rem;
        padding: 6px;
    }
    
    .sidebar-header {
        padding: 8px 8px 4px 8px;
    }
    
    .sidebar-header h5 {
        font-size: 0.8rem;
    }
    
    .sidebar-content > div {
        padding: 0 8px 8px 8px;
        max-height: 25vh;
    }
    
    .unassigned-person,
    .assigned-person {
        padding: 6px 8px;
        font-size: 0.9rem;
    }
}

@media (max-width: 576px) {
    .venue-container {
        padding: 6px;
        min-height: 350px;
        max-height: 65vh;
    }
    
    .venue-layout {
        grid-template-columns: repeat(3, 1fr);
        gap: 6px;
        padding: 6px;
        min-height: 300px;
    }
    
    .table-item {
        min-height: 50px;
        padding: 4px;
    }
    
    .table-number {
        font-size: 0.8rem;
    }
    
    .table-type {
        font-size: 0.55rem;
    }
    
    .person-count {
        width: 20px;
        height: 20px;
        font-size: 0.7rem;
        top: 2px;
        right: 2px;
    }
    
    .action-buttons {
        flex-direction: column;
        gap: 8px;
    }
    
    .action-btn {
        width: 100%;
        padding: 8px 15px;
        font-size: 0.9rem;
    }
    
    .sidebar-header {
        padding: 6px 6px 2px 6px;
    }
    
    .sidebar-header h5 {
        font-size: 0.75rem;
    }
    
    .sidebar-content > div {
        padding: 0 6px 6px 6px;
        max-height: 20vh;
    }
    
.sidebar-header h5 {
        font-size: 0.9rem;
    }
    
    .unassigned-person,
    .assigned-person {
        padding: 6px 8px;
        font-size: 0.9rem;
        margin-bottom: 4px;
    }
    
    .unassigned-person,
    .assigned-person {
        padding: 4px 6px;
        font-size: 0.85rem;
        margin-bottom: 4px;
    }
}

@media (max-width: 400px) {
    .venue-layout {
        grid-template-columns: repeat(2, 1fr);
        min-height: 280px;
    }
    
    .table-item {
        min-height: 45px;
        padding: 3px;
    }
    
    .table-number {
        font-size: 0.7rem;
    }
    
    .table-type {
        display: none; /* Hide table type on very small screens */
    }
    
    .venue-container {
        padding: 4px;
        min-height: 300px;
        max-height: 60vh;
    }
}

/* Scrollbar Styling */
.unassigned-sidebar::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
    width: 8px;
}

.unassigned-sidebar::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.unassigned-sidebar::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb {
    background: #e8a5b6;
    border-radius: 10px;
}

.unassigned-sidebar::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover {
    background: #d37a92;
}

/* Layout Control Improvements */
.row {
    margin-left: 0;
    margin-right: 0;
}

.col-lg-9 {
    padding-left: 8px;
    padding-right: 8px;
}

.col-lg-3 {
    padding-left: 8px;
    padding-right: 8px;
}

/* Ensure proper layout boundaries */
.venue-layout > * {
    max-width: 100%;
    overflow: hidden;
}

/* Table Type Display Adjustments */
.table-type {
    font-size: 0.7rem;
    color: #2b2b2b;
    opacity: 0.8;
    margin-top: 2px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
    overflow: hidden;
    max-width: 100%;
}

/* Improve table content fitting */
.table-item {
    position: relative;
    background: #a8d8ea;
    border: 2px solid #6ab0d1;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
    overflow: hidden;
}

/* Table Configuration Styles */
.table-info {
    padding: 8px;
    background: #f8f9fa;
    border-radius: 4px;
    margin-bottom: 8px;
}

.table-preview {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #dee2e6;
}

.preview-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 120px;
    background: #f8f9fa;
    border-radius: 8px;
    padding: 20px;
}

.table-preview-item {
    background: #a8d8ea;
    border: 2px solid #6ab0d1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    position: relative;
    transition: all 0.3s ease;
}

.table-preview-item.table-round {
    border-radius: 50%;
    width: 80px;
    height: 80px;
}

.table-preview-item.table-square {
    border-radius: 8px;
    width: 80px;
    height: 80px;
}

.table-preview-item.table-rectangular-horizontal {
    border-radius: 8px;
    width: 100px;
    height: 50px;
}

.table-preview-item.table-rectangular-vertical {
    border-radius: 8px;
    width: 50px;
    height: 100px;
}

.preview-number {
    font-weight: 600;
    color: #2b2b2b;
}

/* Table Captain Styles */
.table-captain {
    background: linear-gradient(135deg, #fff8e1 0%, #ffe082 100%) !important;
    border-left: 3px solid #f57c00 !important;
}

.captain-icon {
    color: #f57c00;
    margin-right: 6px;
    font-size: 0.9em;
}

/* Notes icon */
.notes-icon {
    color: #1976d2;
    font-size: 0.85em;
    opacity: 0.7;
    margin-left: 4px;
}

.notes-preview {
    margin-top: 4px;
    padding: 4px 8px;
    background: #f5f5f5;
    border-left: 2px solid #1976d2;
    border-radius: 2px;
    font-style: italic;
}

/* Allergies icon */
.allergies-icon {
    color: #d32f2f;
    font-size: 0.85em;
    opacity: 0.8;
    margin-left: 4px;
}

.allergies-preview {
    margin-top: 4px;
    padding: 4px 8px;
    background: #ffebee;
    border-left: 2px solid #d32f2f;
    border-radius: 2px;
    font-style: italic;
}

/* Person icons container */
.person-icons {
    display: inline-flex;
    gap: 4px;
    margin-left: 8px;
}

.person-name {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

/* Captain in list modal */
.captain-list-item {
    background: linear-gradient(135deg, #fff8e1 0%, #ffe082 100%);
    padding: 6px 12px;
    margin: 4px 0;
    border-radius: 4px;
    border-left: 3px solid #f57c00;
    list-style: none;
    font-weight: 600;
}

/* Context Menu Styles */
.context-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 9999;
    background: transparent;
}

.context-menu {
    position: fixed;
    background: white;
    border: 1px solid #ddd;
    border-radius: 6px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    min-width: 200px;
    padding: 4px 0;
}

.context-menu-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.context-menu-item:hover {
    background-color: #f5f5f5;
}

.context-menu-item i {
    color: #f57c00;
}

/* Captains Modal Styles */
.captains-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.captain-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fff8e1 0%, #ffe082 100%);
    border-left: 3px solid #f57c00;
    border-radius: 6px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.captain-item:hover {
    transform: translateX(2px);
    box-shadow: 0 2px 8px rgba(245, 124, 0, 0.2);
}

.captain-info {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.captain-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.captain-name {
    font-weight: 600;
    color: #2b2b2b;
    font-size: 1rem;
}

.captain-table {
    font-size: 0.85rem;
    color: #666;
}

.remove-captain-btn {
    background: #f44336;
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
}

.remove-captain-btn:hover {
    background: #d32f2f;
    transform: scale(1.1);
}

.preview-capacity {
    font-size: 0.7rem;
    color: #2b2b2b;
    opacity: 0.8;
}

/* Touch and Interaction Improvements */
.table-item {
    position: relative;
    background: #a8d8ea;
    border: 2px solid #6ab0d1;
    padding: 0;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    word-wrap: break-word;
    overflow: hidden;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.table-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    border-color: #e8a5b6;
}

.table-item.drag-over {
    border: 3px dashed #e8a5b6;
    background: #f0d9e2;
    transform: scale(1.05);
}

/* Capacity indicator styles */
.table-near-full {
    border-color: #ffc107;
    background: #fff3cd;
}

.table-full {
    border-color: #dc3545;
    background: #f8d7da;
}

.table-near-full:hover {
    border-color: #e0a800;
}

.table-full:hover {
    border-color: #bd2130;
}

/* Better scrollbar for all scrollable areas */
.unassigned-sidebar::-webkit-scrollbar,
.assigned-sidebar::-webkit-scrollbar,
.modal-body::-webkit-scrollbar {
    width: 6px;
}

.unassigned-sidebar::-webkit-scrollbar-track,
.assigned-sidebar::-webkit-scrollbar-track,
.modal-body::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.unassigned-sidebar::-webkit-scrollbar-thumb,
.assigned-sidebar::-webkit-scrollbar-thumb,
.modal-body::-webkit-scrollbar-thumb {
    background: #e8a5b6;
    border-radius: 10px;
}

.unassigned-sidebar::-webkit-scrollbar-thumb:hover,
.assigned-sidebar::-webkit-scrollbar-thumb:hover,
.modal-body::-webkit-scrollbar-thumb:hover {
    background: #d37a92;
}

/* Better mobile touch targets */
@media (hover: none) and (pointer: coarse) {
    .table-item {
        min-height: 60px;
        padding: 8px;
    }
    
    .unassigned-person,
    .assigned-person {
        padding: 12px;
        margin-bottom: 6px;
    }
    
    .action-btn {
        min-height: 44px;
        padding: 12px 20px;
    }
}

.table-item.selected {
    outline: 3px solid #0d6efd;
    outline-offset: 2px;
}
