/* Booking Page - Mobile First Responsive Design */

/* ============== Color Variables ============== */
:root {
    --primary-color: #007bff;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-color: #dee2e6;
    --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --shadow-md: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    --shadow-lg: 0 1rem 3rem rgba(0, 0, 0, 0.175);
}

/* ============== Date Selection Section ============== */
.booking-date-section {
    background: linear-gradient(135deg, #1b5e20 0%, #43a047 100%);
    color: white;
    padding: 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
}

.booking-date-section label {
    color: rgba(255, 255, 255, 0.9);
    font-weight: 600;
    margin-bottom: 0.25rem;
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.booking-date-input-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    flex-wrap: nowrap;
    justify-content: flex-start;
    align-items: center;
}

@media (max-width: 576px) {
    .booking-date-input-group {
        gap: 0.25rem;
    }
}

.booking-date-input-group .input-group {
    flex-shrink: 0;
    white-space: nowrap;
}

.booking-date-input-group .form-control {
    flex: 1 1 auto;
    min-width: 90px;
    max-width: 220px;
    background: white;
    border: none;
    padding: 0.65rem 0.5rem;
    border-radius: 0.375rem;
    font-size: 0.85rem;
    height: auto;
}

@media (max-width: 576px) {
    .booking-date-input-group .form-control {
        max-width: 120px;
        min-width: 80px;
        flex: 0 0 auto;
    }
}

.booking-date-input-group .input-group-text {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    padding: 0.65rem 0.5rem;
    cursor: pointer;
}

.booking-date-input-group .btn {
    padding: 0.65rem 1rem;
    font-size: 0.9rem;
    white-space: nowrap;
}

.booking-date-input-group .btn-primary {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
}

.booking-date-input-group .btn-primary:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* ============== Quick Date Navigation ============== */
.booking-quick-dates {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(80px, 1fr));
    gap: 0.4rem;
    margin-bottom: 0;
}

.booking-quick-dates .btn {
    padding: 0.35rem 0.5rem;
    font-size: 0.75rem;
    white-space: normal;
    word-break: break-word;
    text-align: center;
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: all 0.2s ease;
}

.booking-quick-dates .btn.active {
    background: white;
    color: #667eea;
    border-color: white;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.booking-quick-dates .btn:hover {
    background: rgba(255, 255, 255, 0.3);
    border-color: white;
}

/* Mobile: 5 columns for 2 rows */
@media (max-width: 576px) {
    .booking-quick-dates {
        grid-template-columns: repeat(5, 1fr);
        gap: 0.25rem;
    }

    .booking-quick-dates .js-day-number {
        display: none;
    }
}

/* Tablet: 4 columns */
@media (min-width: 577px) and (max-width: 991px) {
    .booking-quick-dates {
        grid-template-columns: repeat(4, 1fr);
    }

    .booking-quick-dates .js-day-number {
        display: none;
    }
}

/* Desktop: show all */
@media (min-width: 992px) {
    .booking-quick-dates {
        grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    }
}

/* ============== Admin Controls ============== */
.js-selection-actions-inline {
    flex-wrap: wrap;
    gap: 0.25rem;
    margin-left: auto;
    flex-shrink: 0;
    margin-top: 0.5rem;
}

@media (max-width: 576px) {
    .js-selection-actions-inline {
        margin-top: 1rem;
        width: 100%;
    }
}

.admin-dropdown {
    flex-shrink: 0;
    margin: 0;
    margin-left: 0.5rem;
    display: flex;
    align-items: center;
}

.admin-dropdown .btn-danger {
    background-color: #FF9800;
    border-color: #FF9800;
}

.admin-dropdown .btn-danger:hover {
    background-color: #F57C00;
    border-color: #E65100;
}

.admin-dropdown-menu {
    min-width: 220px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    border: 1px solid #e0e0e0;
    border-radius: 0.375rem;
    padding: 0.5rem 0;
}

.admin-dropdown-menu .dropdown-header {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #666;
    padding: 0.5rem 1rem;
    margin-top: 0;
}

.admin-dropdown-menu .dropdown-header:first-child {
    margin-top: 0.25rem;
}

.admin-dropdown-menu .dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.admin-dropdown-menu .dropdown-item:hover {
    background-color: #f5f5f5;
    color: #dc3545;
}

.admin-dropdown-menu label.dropdown-item {
    color: #333;
    display: flex;
    align-items: center;
}

.admin-dropdown-menu label.dropdown-item:hover {
    color: #333;
}

.admin-dropdown-menu .dropdown-item i {
    margin-right: 0.5rem;
    width: 16px;
    text-align: center;
}

.admin-dropdown-menu .dropdown-divider {
    margin: 0.25rem 0;
}

/* ============== Admin Controls Toolbar ============== */
.booking-admin-toolbar {
    display: flex;
    flex-wrap: nowrap;
    gap: 0.25rem;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 0;
    margin-bottom: 0;
    align-items: center;
}

.booking-admin-toolbar .btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.booking-admin-toolbar .btn {
    padding: 0.5rem 0.75rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

/* Mobile: Hide admin and find me labels */
@media (max-width: 576px) {
    .js-admin-label,
    .js-find-me-label {
        display: none;
    }

    /* Make buttons compact on mobile to fit on one line */
    .booking-date-input-group .btn {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }

    .booking-date-input-group .input-group-text {
        padding: 0.5rem 0.4rem;
    }

    .booking-date-input-group .form-control {
        padding: 0.5rem 0.4rem;
        font-size: 0.8rem;
        min-width: 100px;
    }

    .booking-admin-toolbar {
        flex-direction: column;
    }

    .booking-admin-toolbar .btn-group {
        width: 100%;
    }

    .booking-admin-toolbar .btn {
        flex: 1;
        min-width: 100%;
    }
}

/* ============== Alerts and Notices ============== */
.booking-alert {
    border-left: 4px solid;
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.booking-alert i {
    flex-shrink: 0;
    font-size: 1.25rem;
    margin-top: 0.125rem;
}

.booking-alert-content {
    flex: 1;
}

.booking-alert-content p {
    margin-bottom: 0.5rem;
}

.booking-alert-danger {
    border-left-color: var(--danger-color);
    background-color: rgba(220, 53, 69, 0.05);
}

.booking-alert-warning {
    border-left-color: var(--warning-color);
    background-color: rgba(255, 193, 7, 0.05);
}

.booking-alert-success {
    border-left-color: var(--success-color);
    background-color: rgba(40, 167, 69, 0.05);
}

.booking-alert-info {
    border-left-color: var(--info-color);
    background-color: rgba(23, 162, 184, 0.05);
}

/* ============== Competition Card ============== */
.competition-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.competition-card-header {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

.competition-item {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.competition-item:last-child {
    border-bottom: none;
}

.vertical-bar {
    display: inline-block;
    width: 4px;
    height: 20px;
    margin-right: 0.5rem;
    vertical-align: middle;
}

/* ============== Bookings Table - Desktop ============== */
.bookings-table-container {
    overflow-x: auto;
    border-radius: 0.5rem;
    box-shadow: var(--shadow-sm);
}

.js-bookings {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.js-bookings tbody tr {
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s ease;
}

.js-bookings tbody tr:hover {
    background-color: rgba(0, 123, 255, 0.03);
}

.js-bookings tbody tr.table-warning {
    animation: highlightPulse 3s ease-out forwards;
}

.js-bookings tbody tr.mark {
    background-color: rgba(255, 193, 7, 0.15);
    font-weight: 500;
}

.js-bookings td {
    padding: 1rem 0.75rem;
    vertical-align: middle;
    font-size: 0.95rem;
}

.js-bookings td:first-child {
    padding-left: 1rem;
}

.js-bookings td:last-child {
    padding-right: 1rem;
}

/* Tee Time Column */
.tee-time-column {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--dark-color);
    white-space: nowrap;
}

/* Player Cell Styling */
.player-cell {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.player-badges {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    align-items: center;
}

.badge {
    padding: 0.35rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 600;
    border-radius: 50px;
    white-space: nowrap;
}

.badge-pill {
    border-radius: 50px;
}

.badge-success {
    background-color: #28a745;
    color: white;
}

.badge-info {
    background-color: #17a2b8;
    color: white;
}

.badge-danger {
    background-color: #dc3545;
    color: white;
}

.badge-warning {
    background-color: #ffc107;
    color: #333;
}

/* Payment Status Icon */
.payment-status-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 0.65rem;
}

/* Player Avatar */
.player-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--light-color);
    font-size: 0.9rem;
}

.icon-small {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
}

/* Tee Badge */
.tee-badge {
    min-width: 40px;
    text-align: center;
}

/* Book Link */
.js-bookings a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 0.25rem;
    transition: all 0.2s ease;
}

.js-bookings a:hover {
    background-color: rgba(0, 123, 255, 0.1);
    text-decoration: underline;
}

/* ============== Mobile Optimization - Keep Table ============== */
@media (max-width: 991px) {
    .js-bookings td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }

    .booking-quick-dates {
        gap: 0.35rem;
    }

    .booking-quick-dates .btn {
        padding: 0.4rem 0.6rem;
        font-size: 0.8rem;
    }
}

@media (max-width: 768px) {
    .js-bookings {
        font-size: 0.85rem;
    }

    .js-bookings td {
        padding: 0.65rem 0.5rem;
    }

    .bookings-table-container {
        overflow-x: auto;
    }

    .booking-quick-dates {
        gap: 0.25rem;
    }

    .booking-quick-dates .btn {
        padding: 0.35rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* ============== Tablet (Medium) ============== */
@media (min-width: 992px) and (max-width: 1199px) {
    .js-bookings td {
        padding: 0.75rem 0.5rem;
        font-size: 0.9rem;
    }

    .badge {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }
}

/* ============== Desktop (Large) ============== */
@media (min-width: 1200px) {
    .js-bookings td {
        padding: 1rem;
    }

    .booking-quick-dates {
        grid-template-columns: repeat(9, 1fr);
    }
}

/* ============== Success Messages ============== */
.js-success-msg-container {
    background: white;
    border-left: 4px solid var(--success-color);
    border-radius: 0.375rem;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-md);
    display: none;
    animation: slideIn 0.3s ease;
}

@keyframes slideIn {
    from {
        transform: translateY(-20px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes highlightPulse {
    0% {
        background-color: rgba(255, 193, 7, 0.6);
        box-shadow: 0 0 0 2px rgba(255, 193, 7, 0.3);
    }
    50% {
        background-color: rgba(255, 193, 7, 0.3);
        box-shadow: 0 0 0 1px rgba(255, 193, 7, 0.2);
    }
    100% {
        background-color: rgba(255, 193, 7, 0.2);
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0);
    }
}

/* ============== Modal Styling ============== */
.modal-content {
    border: none;
    box-shadow: var(--shadow-lg);
    border-radius: 0.5rem;
}

.modal-header {
    background: linear-gradient(135deg, #1b5e20 0%, #43a047 100%);
    color: white;
    border-radius: 0.5rem 0.5rem 0 0;
    border: none;
}

.modal-header .close {
    color: white;
}

/* ============== Accessibility ============== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* High contrast mode support */
@media (prefers-contrast: more) {
    .booking-date-section {
        border: 2px solid #000;
    }

    .js-bookings {
        border: 2px solid #000;
    }

    .badge {
        border: 1px solid #000;
    }
}

/* Print Styles */
@media print {
    .booking-date-section,
    .booking-admin-toolbar,
    .booking-quick-dates .btn,
    .js-bookings a,
    .js-enter-mode-button,
    .js-exit-mode-button {
        display: none;
    }

    .js-bookings {
        box-shadow: none;
        border: 1px solid #000;
    }
}

/* ============== Tee Sheet Card Layout ============== */
.bookings-cards-container {
    /* Allow normal scrolling on the container */
    touch-action: pan-y pan-x;
}

.tee-sheet-cards {
    display: grid;
    gap: 1rem;
    margin-bottom: 1rem;
}

/* Desktop: 1 card per row */
@media (min-width: 992px) {
    .tee-sheet-cards {
        grid-template-columns: 1fr;
    }
}

/* Tablet: 1 card per row */
@media (min-width: 577px) and (max-width: 991px) {
    .tee-sheet-cards {
        grid-template-columns: 1fr;
    }
}

/* Mobile: 2 rows per card (side by side) */
@media (max-width: 576px) {
    .tee-sheet-cards {
        grid-template-columns: 1fr;
    }
}

/* Individual Card */
.tee-card {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.5rem;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.tee-card:hover {
    box-shadow: var(--shadow-md);
}

.tee-card.table-warning {
    animation: highlightPulse 3s ease-out forwards;
}

/* Card Header - Tee Time Section */
.tee-card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    border-bottom: 2px solid var(--border-color);
}

/* Desktop: Compact header */
@media (min-width: 992px) {
    .tee-card-header {
        padding: 0.5rem 0.75rem;
        gap: 0.75rem;
    }
}

.participation-bar {
    display: inline-block;
    width: 6px;
    height: 40px;
    border-radius: 0.25rem;
}

.time-info {
    display: flex;
    flex-direction: row;
    gap: 0.5rem;
    align-items: center;
}

.tee-number {
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #666;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.tee-time {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-color);
}

/* Desktop: Compact tee time */
@media (min-width: 992px) {
    .tee-number {
        font-size: 0.7rem;
    }

    .tee-time {
        font-size: 1.1rem;
    }

    .participation-bar {
        width: 5px;
        height: 32px;
    }
}

/* Admin Controls (Left of tee time) */
.card-admin-controls {
    display: flex;
    gap: 0.4rem;
    align-items: center;
    flex-shrink: 0;
}

/* Book Button Styling */
.btn-book {
    padding: 0.5rem 1rem;
    background-color: var(--success-color);
    color: white;
    border: none;
    border-radius: 0.375rem;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    white-space: nowrap;
    cursor: pointer;
}

.btn-book:hover {
    background-color: #218838;
    text-decoration: none;
}


/* Desktop: Compact book button */
@media (min-width: 992px) {
    .btn-book {
        padding: 0.35rem 0.7rem;
        font-size: 0.8rem;
    }
}

.btn-audit {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background-color: #f0f0f0;
    color: #666;
    border-radius: 0.375rem;
    transition: all 0.2s ease;
    text-decoration: none;
}

.btn-audit:hover {
    background-color: #e0e0e0;
    color: var(--dark-color);
}

/* Players Grid - 4 columns on desktop (one line), 2x2 on mobile */
.players-grid {
    display: grid;
    gap: 0.75rem;
    padding: 0.75rem;
}

/* Desktop: 4 columns (one line) */
@media (min-width: 992px) {
    .players-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.5rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Tablet: 2x2 grid */
@media (min-width: 577px) and (max-width: 991px) {
    .players-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: 2 rows per card (2 columns) */
@media (max-width: 576px) {
    .players-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Individual Player Slot */
.player-slot {
    padding: 1rem;
    border-radius: 0.375rem;
    border: 2px solid var(--border-color);
    transition: all 0.2s ease;
    background: #fafafa;
    min-height: 50px;
    display: flex;
    align-items: center;
    position: relative;
    outline: none;
}

.player-slot:focus {
    outline: none;
}

.player-slot:focus-visible {
    outline: none;
}

/* Draggable player slots - allow normal scrolling */
.player-slot.booked-slot {
    /* Allow panning but prevent double-tap zoom for better drag UX */
    touch-action: manipulation;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    cursor: pointer;
}

/* Keep dragging visual state */
.player-slot.dragging {
    opacity: 0.6;
}

/* Tap-to-move: Selected player slot */
.player-slot-selected {
    border: 3px solid #007bff !important;
    border-style: solid !important;
    box-shadow: 0 0 10px rgba(0, 123, 255, 0.5) !important;
    background: rgba(0, 123, 255, 0.1) !important;
}

/* Tap-to-move: Available drop slots */
.available-drop-slot {
    border: 2px solid #28a745 !important;
    border-style: dashed !important;
    background: rgba(40, 167, 69, 0.1) !important;
    animation: pulse-available 1.5s ease-in-out infinite;
    cursor: pointer;
}

@keyframes pulse-available {
    0%, 100% {
        background: rgba(40, 167, 69, 0.1);
    }
    50% {
        background: rgba(40, 167, 69, 0.2);
    }
}

/* Desktop: Compact player slots */
@media (min-width: 992px) {
    .player-slot {
        padding: 0.5rem;
        border-width: 1.5px;
    }
}

.player-slot.booked-slot {
    background: white;
    border-color: #e0e0e0;
    touch-action: manipulation;
}

.player-slot.booked-slot:hover {
    border-color: var(--primary-color);
}

.player-slot.empty-slot {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-color: var(--border-color);
    border-style: dashed;
    min-height: 50px;
    cursor: pointer;
    touch-action: manipulation;
}

.player-slot.empty-slot:hover {
    background: linear-gradient(135deg, #e9ecef 0%, #dee2e6 100%);
    border-color: var(--primary-color);
}

.player-slot.slot-disabled {
    background: #f5f5f5;
    border-color: #ddd;
    cursor: not-allowed;
    opacity: 0.6;
}

.player-slot.slot-disabled:hover {
    background: #f5f5f5;
    border-color: #ddd;
}

.player-slot.slot-disabled .slot-empty {
    color: #999;
}

.player-slot.my-booking {
    background: rgba(255, 193, 7, 0.05);
    border-color: var(--warning-color);
}

.player-slot-clickable {
    cursor: pointer;
    transition: all 0.2s ease;
}

.player-slot-clickable:hover {
    border-color: var(--primary-color);
}

/* Empty Slot Content */
.slot-empty {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    gap: 0.5rem;
    color: #999;
    font-weight: 500;
}

.slot-empty i {
    font-size: 1rem;
    color: #bbb;
    flex-shrink: 0;
}

.slot-empty span {
    font-size: 0.85rem;
}

/* Desktop: Horizontal layout with icon on left */
@media (min-width: 992px) {
    .slot-empty {
        flex-direction: row;
        gap: 0.25rem;
        justify-content: flex-start;
        align-items: center;
    }

    .slot-empty i {
        font-size: 0.9rem;
        flex-shrink: 0;
    }

    .slot-empty span {
        font-size: 0.7rem;
    }
}

/* Player Info Section */
.player-info {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
}

/* Desktop: Tighter player info spacing */
@media (min-width: 992px) {
    .player-info {
        gap: 0.25rem;
    }
}

/* Badges positioned in top right */
.player-badges-top-right {
    display: flex;
    gap: 0.25rem;
    flex-wrap: wrap;
    justify-content: flex-end;
    margin-left: auto;
    flex-shrink: 0;
}

/* ============== Player Selection Dropdown ============== */
.player-selection-dropdown {
    position: fixed;
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    box-shadow: var(--shadow-lg);
    z-index: 1050;
    min-width: 280px;
    max-width: 320px;
}

.player-selection-dropdown.d-none {
    display: none !important;
}

.player-selection-content {
    display: flex;
    flex-direction: column;
    max-height: 400px;
}

.player-selection-list {
    flex: 1;
    overflow-y: auto;
    padding: 0.5rem 0;
}

.player-selection-item {
    display: flex;
    align-items: center;
    padding: 0.6rem 0.75rem;
    transition: all 0.15s ease;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    gap: 0.5rem;
}

.player-selection-item:hover {
    background: #f0f8ff;
}

.player-selection-item.keyboard-focused {
    background: #e3f2fd;
    border-left: 3px solid var(--primary-color);
    padding-left: calc(0.75rem - 3px);
}

.player-selection-item:last-child {
    border-bottom: none;
}

.player-checkbox {
    cursor: pointer;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
}

.player-selection-item label {
    cursor: pointer;
    margin-bottom: 0;
    flex: 1;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Player names in dropdown - uses main .player-name rule from line 1198 */

.player-badge {
    font-size: 0.75rem;
    background: rgba(0, 123, 255, 0.1);
    color: var(--primary-color);
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.player-checkbox:checked + label .player-name {
    font-weight: 600;
    color: var(--primary-color);
}

.player-selection-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    border-top: 1px solid var(--border-color);
    gap: 0.5rem;
}

.player-selection-footer small {
    font-size: 0.8rem;
}

.alert-sm {
    padding: 0.4rem 0.75rem;
    margin: 0;
    font-size: 0.85rem;
}

/* Player emoji/avatar styling */
.player-emoji {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 0.5rem;
    border-radius: 50%;
    object-fit: cover;
    vertical-align: middle;
}

.player-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem;
}

.player-name-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
    min-width: 0;
    flex-wrap: nowrap;
}

.player-name {
    flex: 1;
    font-weight: 600;
    color: var(--dark-color);
    font-size: 1.1rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Mobile: Show short name, hide full name */
.player-name-full {
    display: none;
}

.player-name-short {
    display: block;
    cursor: pointer;
    border-bottom: 1px dotted rgba(0, 0, 0, 0.3);
    transition: color 0.2s ease, border-color 0.2s ease;
}

.player-name-short:hover {
    color: var(--primary-color);
    border-bottom-color: var(--primary-color);
}

/* Tablet and up: Show full name, hide short name */
@media (min-width: 768px) {
    .player-name-full {
        display: block;
    }

    .player-name-short {
        display: none;
    }
}

/* Desktop: Larger player names */
@media (min-width: 992px) {
    .player-name {
        font-size: 1rem;
    }
}

/* Mobile: Show emojis on touch/tap for a few seconds */
@media (max-width: 991px) {
    .player-emoji {
        opacity: 0;
        transition: opacity 0.15s ease;
    }

    .player-slot:active .player-emoji,
    .player-slot:focus .player-emoji {
        opacity: 1;
        animation: emoji-fade 3s ease-out forwards;
    }

    @keyframes emoji-fade {
        0% {
            opacity: 1;
        }
        85% {
            opacity: 1;
        }
        100% {
            opacity: 0;
        }
    }
}

.player-emoji {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

/* Desktop: Show emojis on hover, smaller size */
@media (min-width: 992px) {
    .player-emoji {
        width: 18px;
        height: 18px;
    }
}

.player-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.player-badges .badge {
    font-size: 0.75rem;
    padding: 0.3rem 0.6rem;
    color: white;
}

/* Desktop: Smaller badges */
@media (min-width: 992px) {
    .player-badges .badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
        color: white;
    }
}

.player-badges .tag-badge {
    background-color: #17a2b8;
    color: white;
    padding: 0.25rem 0.5rem;
    font-size: 0.7rem;
}

/* Desktop: Smaller tag badges */
@media (min-width: 992px) {
    .player-badges .tag-badge {
        padding: 0.15rem 0.35rem;
        font-size: 0.6rem;
    }
}

/* Card Footer - for reserved labels */
.tee-card-footer {
    padding: 0.75rem 1rem;
    background: rgba(255, 193, 7, 0.1);
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.tee-card-footer small {
    color: #ff9800;
    font-weight: 500;
}

/* Checkbox styling for cards */
.checkbox-container {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin: 0;
}

.checkbox-container input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

/* Hide checkboxes by default - only show in edit mode */
.js-select-tee {
    display: none;
}

/* Mobile Optimizations */
@media (max-width: 576px) {
    .tee-card-header {
        flex-wrap: wrap;
        align-items: flex-start;
        gap: 0.75rem;
        min-height: auto;
    }

    .tee-sheet-cards.edit-mode .tee-card {
        display: flex;
        flex-direction: column;
        gap: 1.25rem;
    }

    .card-actions {
        width: 100%;
        justify-content: flex-start;
    }

    .btn-book {
        flex: 1;
        text-align: center;
    }

    .tee-time {
        font-size: 1.25rem;
    }

    .player-slot {
        min-height: 50px;
    }

    .slot-empty i {
        font-size: 1.5rem;
    }

    .slot-empty {
        gap: 0.25rem;
    }

    .slot-empty span {
        font-size: 0.8rem;
    }
}

/* Show/Hide based on view preference - can be toggled via JS */
.view-toggle-table {
    display: none;
}

.view-toggle-cards {
    display: block;
}

.view-toggle-table.active {
    display: block;
}

.view-toggle-cards.active {
    display: block;
}

/* ============== Drag & Drop Styles ============== */

/* Drag handle - visual indicator for draggable element */
.drag-handle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 10px;
    cursor: grab;
    color: #bbb;
    border-radius: 0;
    transition: all 0.15s ease-in-out;
    background-color: transparent;
    border: none;
    font-size: 0;
    position: absolute;
    top: 2px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    background-image: linear-gradient(to bottom, #bbb 2px, transparent 2px, transparent 4px, #bbb 4px, transparent 4px, transparent 6px, #bbb 6px, transparent 6px, transparent 8px);
    background-size: 100% 100%;
    background-repeat: no-repeat;
    background-position: center;
}

.drag-handle:hover {
    background-color: var(--primary-color);
    color: white;
    cursor: grab;
    border-color: var(--primary-color);
    box-shadow: 0 2px 6px rgba(0, 123, 255, 0.3);
    transform: scale(1.05);
}

.drag-handle:active {
    cursor: grabbing;
    background-color: #0056b3;
    border-color: #0056b3;
    transform: scale(0.95);
}

.player-slot.dragging .drag-handle {
    color: var(--primary-color);
    background-color: rgba(0, 123, 255, 0.25);
    cursor: grabbing;
}

/* Dragging state - source slot being dragged */
.player-slot.dragging {
    opacity: 0.5;
    background-color: #e8f4f8;
    border: 2px dashed var(--primary-color);
}

/* Valid drop zone - can drop here */
.player-slot.drop-zone-valid {
    background-color: #d4edda;
    border: 2px solid var(--success-color);
    box-shadow: 0 0 0 3px rgba(40, 167, 69, 0.25);
    cursor: copy;
}

.player-slot.drop-zone-valid::after {
    content: '✓ Drop here';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--success-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
}

/* Invalid drop zone - cannot drop here */
.player-slot.drop-zone-invalid {
    background-color: #f8d7da;
    border: 2px solid var(--danger-color);
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.25);
    cursor: not-allowed;
}

.player-slot.drop-zone-invalid::after {
    content: '✕ Cannot drop';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: var(--danger-color);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
}

/* Ensure position relative for pseudo-elements */
.player-slot {
    position: relative;
}

/* Transition effects for drop zones */
.player-slot {
    transition: all 0.2s ease-in-out;
}

/* Mobile touch support - enable dragging on touch devices */
@media (hover: none) and (pointer: coarse) {
    .player-slot.booked-slot {
        cursor: grab;
        -webkit-user-select: none;
        user-select: none;
    }
    
    .player-slot.booked-slot:active {
        cursor: grabbing;
    }
}

/* Alert styling for move notifications */
.alert {
    margin-top: 1rem;
    margin-bottom: 1rem;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeeba;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* ============== Payment and Guest Verification Badge Styling ============== */

.payment-pending-badge {
    animation: pulse-warning 2s ease-in-out infinite;
    font-weight: 600;
}

.verification-pending-badge {
    animation: pulse-warning 2s ease-in-out infinite;
    font-weight: 600;
}

.verification-approved-badge {
    font-weight: 600;
}

.paid-in-person-badge {
    font-weight: 600;
}

/* Pulse animation for pending alerts */
@keyframes pulse-warning {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

/* Tee time row with pending payments - light highlight */
.tee-card.has-pending-payments {
    border-left: 4px solid #ff6b6b;
    background-color: rgba(255, 107, 107, 0.05);
}

/* Tee time row with unverified guests - light highlight */
.tee-card.has-unverified-guests {
    border-left: 4px solid #ffa94d;
    background-color: rgba(255, 169, 77, 0.05);
}

/* ============== Mobile Badge Fixes - ROUND ICONS, NO TOP PADDING ============== */

@media (max-width: 768px) {

    /* Player slot - ensure enough height */
    .tee-card .players-grid .player-slot.booked-slot {
        position: relative !important;
        min-height: 65px !important;
        padding: 0.5rem !important;
        padding-top: 2px !important; /* Minimal top padding */
    }

    /* Player info container */
    .tee-card .players-grid .player-slot .player-info {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100% !important;
        position: relative !important;
    }

    /* BADGES - Position at very top, horizontal row */
    .tee-card .players-grid .player-slot .player-badges-top-right {
        position: absolute !important;
        top: 2px !important;
        right: 4px !important;
        display: flex !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        gap: 3px !important;
        max-width: 50% !important;
        justify-content: flex-end !important;
        align-items: center !important;
        margin: 0 !important;
        padding: 0 !important;
        z-index: 5 !important;
    }

    /* PLAYER NAME - Full width below badges */
    .tee-card .players-grid .player-slot .player-name-section {
        width: 100% !important;
        padding-right: 0 !important;
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
        margin-top: 22px !important; /* Space for round badges */
    }

    /* Player name sizing */
    .tee-card .players-grid .player-slot .player-name {
        font-size: 0.9rem !important;
        line-height: 1.3 !important;
        white-space: normal !important;
        word-break: break-word !important;
    }

    /* Smaller emojis */
    .tee-card .players-grid .player-slot .player-emoji {
        width: 16px !important;
        height: 16px !important;
    }

    /* ALL BADGES - UNIFORM 20x20 CIRCULAR (except tag-badge which shows text) */
    .tee-card .players-grid .player-slot .player-badges-top-right .badge,
    .tee-card .players-grid .player-slot .player-badges-top-right .guest-type-badge,
    .tee-card .players-grid .player-slot .player-badges-top-right .payment-status-badge,
    .tee-card .players-grid .player-slot .player-badges-top-right .payment-pending-badge,
    .tee-card .players-grid .player-slot .player-badges-top-right .verification-pending-badge,
    .tee-card .players-grid .player-slot .player-badges-top-right .verification-approved-badge {
        font-size: 0 !important;
        padding: 0 !important;
        width: 20px !important;
        height: 20px !important;
        min-width: 20px !important;
        min-height: 20px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50% !important; /* CIRCULAR */
        margin: 0 !important;
        flex-shrink: 0 !important;
    }

    /* Tag badge - keep text visible on mobile */
    .tee-card .players-grid .player-slot .player-badges-top-right .tag-badge {
        font-size: 0.65rem !important;
        padding: 0.2rem 0.4rem !important;
        width: auto !important;
        height: auto !important;
        min-width: 20px !important;
        min-height: 20px !important;
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
        border-radius: 50% !important;
        margin: 0 !important;
        flex-shrink: 0 !important;
    }

    /* Icons inside badges - all same size */
    .tee-card .players-grid .player-slot .player-badges-top-right .badge i,
    .tee-card .players-grid .player-slot .player-badges-top-right .guest-type-badge i,
    .tee-card .players-grid .player-slot .player-badges-top-right .payment-status-badge i,
    .tee-card .players-grid .player-slot .player-badges-top-right .payment-pending-badge i,
    .tee-card .players-grid .player-slot .player-badges-top-right .verification-pending-badge i,
    .tee-card .players-grid .player-slot .player-badges-top-right .verification-approved-badge i,
    .tee-card .players-grid .player-slot .player-badges-top-right .tag-badge i {
        font-size: 11px !important;
        margin: 0 !important;
    }

    /* Guest type badge - show just the letter */
    .tee-card .players-grid .player-slot .player-badges-top-right .guest-type-badge {
        font-size: 10px !important;
        font-weight: 700 !important;
    }
}