/* Pickleball Court Booking Calendar Styles */
.pcbp-quick-view-modal > div > h4 {
    font-size: 1.6rem;
    margin:10px 0px;
}
.pcbp-calendar-container {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    padding: 25px;
    margin: 30px 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* Calendar Header */
.pcbp-calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.pcbp-calendar-title {
    display: flex;
    align-items: center;
    gap: 15px;
}

.pcbp-calendar-title h2 {
    margin: 0;
    font-size: 1.8rem;
    color: #333;
    font-weight: 600;
}

.pcbp-calendar-nav {
    display: flex;
    gap: 8px;
}

.pcbp-calendar-nav button {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    padding: 10px 15px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    color: #495057;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 5px;
}

.pcbp-calendar-nav button:hover {
    background: #e9ecef;
    border-color: #ced4da;
    transform: translateY(-2px);
}

.pcbp-calendar-nav button:active {
    transform: translateY(0);
}

.pcbp-calendar-view-options {
    display: flex;
    gap: 10px;
}

.pcbp-view-btn {
    background: transparent;
    border: 1px solid #dee2e6;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    color: #6c757d;
    transition: all 0.3s ease;
}

.pcbp-view-btn.active {
    background: #4CAF50;
    color: white;
    border-color: #4CAF50;
}

.pcbp-view-btn:hover:not(.active) {
    background: #f8f9fa;
}

/* Court Selector */
.pcbp-court-selector {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.pcbp-court-selector label {
    font-weight: 600;
    color: #495057;
    min-width: 100px;
}

.pcbp-court-selector select {
    flex: 1;
    padding: 12px;
    border: 1px solid #ced4da;
    border-radius: 8px;
    font-size: 1rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.pcbp-court-selector select:hover {
    border-color: #4CAF50;
}

.pcbp-court-selector select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

/* Legend */
.pcbp-calendar-legend {
    display: flex;
    gap: 20px;
    margin-bottom: 20px;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 8px;
    flex-wrap: wrap;
}

.pcbp-legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: #495057;
}

.pcbp-legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
}

.pcbp-legend-color.available {
    background: #d4edda;
    border: 2px solid #28a745;
}

.pcbp-legend-color.partial {
    background: #fff3cd;
    border: 2px solid #ffc107;
}

.pcbp-legend-color.booked {
    background: #f8d7da;
    border: 2px solid #dc3545;
}

.pcbp-legend-color.today {
    background: #cce5ff;
    border: 2px solid #007bff;
}

/* Month View */
.pcbp-month-view {
    width: 100%;
}

.pcbp-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 10px;
    text-align: center;
    font-weight: 600;
    color: #495057;
    padding: 10px 0;
    background: #f8f9fa;
    border-radius: 8px;
}

.pcbp-weekday {
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.pcbp-calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.pcbp-calendar-day {
    min-height: 120px;
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    display: flex;
    flex-direction: column;
}

.pcbp-calendar-day:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    border-color: #4CAF50;
}

.pcbp-calendar-day.other-month {
    background: #f8f9fa;
    opacity: 0.6;
}

.pcbp-calendar-day.today {
    background: #e3f2fd;
    border: 2px solid #2196F3;
}

.pcbp-calendar-day.available {
    background: #d4edda;
}

.pcbp-calendar-day.partial {
    background: #fff3cd;
}

.pcbp-calendar-day.booked {
    background: #f8d7da;
}

.pcbp-day-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
}

.pcbp-day-number {
    font-weight: bold;
    font-size: 1.1rem;
    color: #333;
}

.pcbp-day-status {
    font-size: 0.75rem;
    padding: 2px 6px;
    border-radius: 12px;
    background: rgba(0,0,0,0.1);
}

.pcbp-day-bookings {
    flex: 1;
    overflow-y: auto;
    max-height: 70px;
    font-size: 0.8rem;
}

.pcbp-mini-booking {
    background: rgba(255,255,255,0.7);
    margin-bottom: 2px;
    padding: 2px 4px;
    border-radius: 3px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.pcbp-mini-booking .time {
    font-weight: 600;
    color: #333;
}

.pcbp-day-footer {
    margin-top: 5px;
    font-size: 0.75rem;
    color: #6c757d;
    text-align: right;
}

.pcbp-available-count {
    display: inline-block;
    background: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 12px;
}

/* Week View */
.pcbp-week-view {
    width: 100%;
    overflow-x: auto;
}

.pcbp-week-header {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: 2px;
    background: #f8f9fa;
    border-radius: 8px 8px 0 0;
    font-weight: 600;
}

.pcbp-week-header-cell {
    padding: 15px 10px;
    text-align: center;
    background: #e9ecef;
}

.pcbp-week-header-cell:first-child {
    background: transparent;
}

.pcbp-week-grid {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: 2px;
    background: #dee2e6;
    border: 1px solid #dee2e6;
}

.pcbp-time-slot {
    background: white;
    padding: 10px;
    min-height: 60px;
    position: relative;
}

.pcbp-time-label {
    font-weight: 600;
    color: #495057;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pcbp-week-booking {
    background: #4CAF50;
    color: white;
    padding: 5px;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 2px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.pcbp-week-booking:hover {
    background: #45a049;
}

.pcbp-week-booking.pending {
    background: #ffc107;
    color: #333;
}

.pcbp-week-booking.confirmed {
    background: #28a745;
}

/* Day View */
.pcbp-day-view {
    width: 100%;
}

.pcbp-day-header {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    text-align: center;
}

.pcbp-day-header h3 {
    margin: 0;
    font-size: 1.5rem;
    color: #333;
}

.pcbp-day-header .date {
    color: #6c757d;
    margin-top: 5px;
}

.pcbp-day-timeline {
    position: relative;
    padding-left: 60px;
}

.pcbp-time-marker {
    position: absolute;
    left: 0;
    width: 50px;
    text-align: right;
    color: #6c757d;
    font-size: 0.85rem;
}

.pcbp-hour-row {
    height: 60px;
    border-bottom: 1px solid #e9ecef;
    position: relative;
}

.pcbp-hour-row:hover {
    background: #f8f9fa;
}

.pcbp-day-booking {
    position: absolute;
    background: #4CAF50;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    z-index: 2;
}

.pcbp-day-booking:hover {
    transform: scale(1.02);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    z-index: 3;
}

.pcbp-day-booking.pending {
    background: #ffc107;
    color: #333;
}

.pcbp-day-booking .booking-title {
    font-weight: 600;
    margin-bottom: 3px;
}

.pcbp-day-booking .booking-time {
    font-size: 0.8rem;
    opacity: 0.9;
}

/* Booking Tooltip */
.pcbp-booking-tooltip {
    position: absolute;
    background: #333;
    color: white;
    padding: 10px 15px;
    border-radius: 8px;
    font-size: 0.9rem;
    z-index: 1000;
    pointer-events: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    min-width: 200px;
}

.pcbp-booking-tooltip::before {
    content: '';
    position: absolute;
    top: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 5px solid #333;
}

.pcbp-tooltip-title {
    font-weight: 600;
    margin-bottom: 5px;
    color: #4CAF50;
}

.pcbp-tooltip-row {
    display: flex;
    justify-content: space-between;
    margin: 3px 0;
}

.pcbp-tooltip-label {
    color: #aaa;
    margin-right: 10px;
}

.pcbp-tooltip-value {
    color: white;
    font-weight: 500;
}

/* Quick View Modal */
.pcbp-quick-view-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
}

.pcbp-quick-view-content {
    background: white;
    border-radius: 12px;
    padding: 10px;
    margin-left:-60px;
    max-width: 380px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 40px rgba(0,0,0,0.3);
}

.pcbp-quick-view-close {
    position: absolute;
    top: 15px;
    right: 15px;
    font-size: 1.2rem;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.pcbp-quick-view-close:hover {
    color: #333;
}

.pcbp-quick-view-date {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.pcbp-quick-view-stats {
    display:flex !important;
    flex-direction:row !important;
    gap:3px;
    margin-top: 10px;
    margin-bottom: 15px;
}

.pcbp-stat-box {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 8px;
    text-align: center;
}

.pcbp-stat-number {
    font-size: 1.2rem;
    font-weight: bold;
    color: #4CAF50;
}

.pcbp-stat-label {
    font-size: 0.85rem;
    color: #6c757d;
    margin-top: 5px;

}
.pcbp-book-slot {
    font-weight: 400;
    padding:12px;
    font-size: 0.85rem;
    border-radius: 50px;
}

.pcbp-quick-view-bookings {
    margin-top: 20px;
}

.pcbp-quick-view-booking {
    background: #f8f9fa;
    border-left: 4px solid #4CAF50;
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 0 8px 8px 0;
}

.pcbp-quick-view-booking.pending {
    border-left-color: #ffc107;
}

.pcbp-quick-view-booking .time {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.pcbp-quick-view-booking .customer {
    color: #6c757d;
    font-size: 0.9rem;
}

.pcbp-quick-view-booking .status {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-top: 5px;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .pcbp-calendar-day {
        min-height: 100px;
        padding: 8px;
    }
    
    .pcbp-day-number {
        font-size: 1rem;
    }
    
    .pcbp-mini-booking {
        font-size: 0.7rem;
    }
}

@media (max-width: 768px) {
    .pcbp-calendar-container {
        padding: 15px;
    }
    
    .pcbp-calendar-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .pcbp-calendar-title h2 {
        font-size: 1.5rem;
    }
    
    .pcbp-calendar-nav {
        width: 100%;
        justify-content: space-between;
    }
    
    .pcbp-calendar-view-options {
        width: 100%;
        justify-content: space-around;
    }
    
    .pcbp-weekdays {
        font-size: 0.8rem;
    }
    
    .pcbp-calendar-day {
        min-height: 80px;
        padding: 5px;
    }
    
    .pcbp-day-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .pcbp-day-status {
        margin-top: 2px;
    }
    
    .pcbp-day-bookings {
        max-height: 40px;
    }
    
    .pcbp-mini-booking {
        white-space: normal;
        line-height: 1.2;
    }
    
    .pcbp-week-view {
        font-size: 0.8rem;
    }
    
    .pcbp-week-header {
        grid-template-columns: 60px repeat(7, 1fr);
    }
    
    .pcbp-week-grid {
        grid-template-columns: 60px repeat(7, 1fr);
    }
}

@media (max-width: 480px) {
    .pcbp-calendar-day {
        min-height: 60px;
        font-size: 0.7rem;
    }
    
    .pcbp-day-number {
        font-size: 0.8rem;
    }
    
    .pcbp-calendar-legend {
        flex-direction: column;
        gap: 10px;
    }
    
    .pcbp-court-selector {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .pcbp-court-selector label {
        min-width: auto;
    }
    
    .pcbp-court-selector select {
        width: 100%;
    }
}

/* Loading States */
.pcbp-calendar-loading {
    position: relative;
    min-height: 300px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pcbp-calendar-loading::after {
    content: '';
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    animation: pcbp-spin 1s linear infinite;
}

@keyframes pcbp-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Drag and Drop */
.pcbp-draggable {
    cursor: move;
    opacity: 0.8;
}

.pcbp-draggable.dragging {
    opacity: 0.3;
}

.pcbp-droppable {
    position: relative;
}

.pcbp-droppable.drop-over {
    background: #e8f5e9 !important;
    border: 2px dashed #4CAF50 !important;
}

/* Availability Indicators */
.pcbp-availability-high {
    color: #28a745;
}

.pcbp-availability-medium {
    color: #ffc107;
}

.pcbp-availability-low {
    color: #dc3545;
}

/* Print Styles */
@media print {
    .pcbp-calendar-nav,
    .pcbp-calendar-view-options,
    .pcbp-court-selector,
    .pcbp-calendar-legend {
        display: none;
    }
    
    .pcbp-calendar-container {
        box-shadow: none;
        padding: 0;
    }
    
    .pcbp-calendar-day {
        border: 1px solid #000;
        break-inside: avoid;
    }
    
    .pcbp-week-view {
        page-break-inside: avoid;
    }
}

/* Accessibility */
.pcbp-calendar-day:focus-visible,
.pcbp-view-btn:focus-visible,
.pcbp-calendar-nav button:focus-visible {
    outline: 2px solid #4CAF50;
    outline-offset: 2px;
}

/* High Contrast Mode */
@media (prefers-contrast: high) {
    .pcbp-calendar-day {
        border: 2px solid #000;
    }
    
    .pcbp-calendar-day.today {
        border: 4px solid #000;
    }
    
    .pcbp-legend-color {
        border: 2px solid #000;
    }
}

/* RTL Support */
.rtl .pcbp-calendar-header {
    flex-direction: row-reverse;
}

.rtl .pcbp-time-label {
    direction: ltr;
}

.rtl .pcbp-day-timeline {
    padding-left: 0;
    padding-right: 60px;
}

.rtl .pcbp-time-marker {
    left: auto;
    right: 0;
    text-align: left;
}

.rtl .pcbp-week-header {
    grid-template-columns: repeat(7, 1fr) 80px;
}

.rtl .pcbp-week-grid {
    grid-template-columns: repeat(7, 1fr) 80px;
}

.rtl .pcbp-week-header-cell:first-child {
    order: 8;
}

/* ============================================
   Compact Quick View Modal Improvements
   ============================================ */

/* Make stat boxes compact */
.pcbp-stat-box{
    flex:1;
    padding:10px;
}

/* Smaller stat labels */
.pcbp-stat-label{
    font-size:12px;
}

/* ============================================
   Available Slots Grid
   ============================================ */

/* Slot container grid */
.pcbp-available-slots{
    display:grid;
    grid-template-columns:repeat(2,1fr);
    gap:8px;
}

/* Slot buttons smaller */
.pcbp-slot-btn{
    background:#5f8f00;
    color:#fff;
    padding:8px 10px;
    border-radius:20px;
    font-size:13px;
    text-align:center;
    cursor:pointer;
    transition:all .2s ease;
}

/* Hover effect */
.pcbp-slot-btn:hover{
    background:#4d7400;
}