/* Yoga Studio Calendar Styles */

.yoga-calendar-container {
    max-width: 100%;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

/* Calendar Navigation */
.yoga-calendar-nav {
    margin-bottom: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Standalone Calendar Widget */
.yoga-calendar-widget-standalone {
    display: inline-block;
    width: 100%;
    max-width: 300px;
    margin: 0 auto;
}

.yoga-calendar-widget {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    max-width: 300px;
    width: 100%;
}

.yoga-calendar-widget .calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.yoga-calendar-widget .calendar-nav-btn {
    background: none;
    border: 1px solid #ddd;
    padding: 5px 15px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.3s;
    font-size: 18px;
    line-height: 1;
}

.yoga-calendar-widget .calendar-nav-btn:hover {
    background: #f5f5f5;
}

.yoga-calendar-widget .calendar-nav-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.yoga-calendar-widget .calendar-month-year {
    font-weight: bold;
    font-size: 16px;
    text-transform: capitalize;
}

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

.yoga-calendar-widget .calendar-day-header {
    text-align: center;
    font-weight: bold;
    font-size: 12px;
    padding: 5px;
    color: #666;
}

.yoga-calendar-widget .calendar-day {
    text-align: center;
    padding: 8px;
    cursor: pointer;
    border-radius: 4px;
    transition: all 0.2s;
    font-size: 14px;
}

.yoga-calendar-widget .calendar-day:hover:not(.disabled):not(.other-month) {
    background: #e8f4f8;
}

/* .yoga-calendar-widget .calendar-day.today {
    background: #1788FB;
    color: #fff;
    font-weight: bold;
}
 */
.yoga-calendar-widget .calendar-day.selected {
    background: #1788FB;
    color: #fff;
    font-weight: bold;
}

.yoga-calendar-widget .calendar-day.disabled {
    color: #ccc;
    cursor: not-allowed;
    opacity: 0.5;
}

.yoga-calendar-widget .calendar-day.other-month {
    color: #ccc;
    cursor: default;
}

.yoga-calendar-widget .calendar-day.other-month:hover {
    background: transparent;
}

/* Calendar Title */
.yoga-calendar-title {
    text-align: center;
    font-size: 24px;
    font-weight: bold;
    margin-bottom: 20px;
    color: #333;
    text-transform: capitalize;
}

/* Schedule Container */
.yoga-schedule-container {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    /* Remove overflow: hidden to allow sticky positioning to work */
    overflow: visible;
}

.yoga-schedule-container > .yoga-schedule-header {
    border-radius: 8px 8px 0 0;
}

.yoga-schedule-container > .yoga-halls-header {
    border-radius: 0;
}

.yoga-schedule-header {
    display: grid;
    grid-template-columns: 80px repeat(3, 1fr);
    background: #f8f9fa;
    border-bottom: 2px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 100;
    /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); */
}

.yoga-time-header {
    padding: 15px;
    border-right: 2px solid #ddd;
    font-weight: bold;
}

.yoga-day-header {
    padding: 15px;
    text-align: center;
    font-weight: bold;
    border-right: 1px solid #ddd;
    box-sizing: border-box;
}

.yoga-day-header:last-child {
    border-right: none;
}

.yoga-day-name {
    font-size: 14px;
    text-transform: capitalize;
    margin-bottom: 5px;
}

.yoga-day-date {
    font-size: 12px;
    color: #666;
}

/* Hall Icons Row */
.yoga-halls-header {
    display: grid;
    grid-template-columns: 80px repeat(3, 1fr);
    background: #f8f9fa;
    border-bottom: 2px solid #ddd;
    position: sticky;
    top: 0;
    z-index: 99;
    /* box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); */
}

.yoga-halls-icons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    padding: 0;
    background: #fefcf0;
    border-right: 1px solid #ddd;
    box-sizing: border-box;
}

.yoga-halls-icons:last-child {
    border-right: none;
}

.yoga-hall-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 5px;
    border-right: 1px solid #ddd;
    box-sizing: border-box;
}

.yoga-hall-icon:last-child {
    border-right: none;
}

.yoga-hall-icon img {
    width: 100%;
    max-width: 40px;
    height: auto;
    display: block;
}

/* Schedule Grid */
.yoga-schedule-grid {
    display: grid;
    grid-template-columns: 80px repeat(3, 1fr);
    overflow-y: auto;
    /* max-height: calc(100vh - 300px); */
    border-radius: 0 0 8px 8px;
}

/* Time Column */
.yoga-time-column {
    background: #f8f9fa;
    border-right: 2px solid #ddd;
    position: sticky;
    left: 0;
    z-index: 10;
}

.yoga-time-slot {
    padding: 10px 5px;
    text-align: center;
    font-size: 12px;
    color: #666;
    border-bottom: 1px solid #eee;
    min-height: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Day Columns */
.yoga-day-column {
    position: relative;
    border-right: 1px solid #ddd;
    box-sizing: border-box;
}

.yoga-day-column:last-child {
    border-right: none;
}

.yoga-halls-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    height: 100%;
}

.yoga-hall-column {
    position: relative;
    border-right: 1px solid #ddd;
    box-sizing: border-box;
}

.yoga-hall-column:last-child {
    border-right: none;
}

.yoga-event-slot {
    min-height: 60px;
    height: 60px;
    border-bottom: 1px solid #eee;
    position: relative;
    box-sizing: border-box;
}

/* Event Blocks */
.yoga-event-block {
    position: absolute;
    left: 2px;
    right: 2px;
    padding: 8px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 5;
    cursor: pointer;
    transition: all 0.2s;
    overflow: visible;
    box-sizing: border-box;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
}

.yoga-event-block:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
    z-index: 6;
}

/* Event Type Colors */
/* Events are green */
.yoga-event-block.event {
    background: #ffe5cc;
    border-left: 3px solid #ff9800;
    color: #cc6600;
}

/* Services are orange */
.yoga-event-block.service {
    background: #d4edda;
    border-left: 3px solid #28a745;
    color: #28a745;
}

/* Legacy support */
.yoga-event-block.lesson {
    background: #ffe5cc;
    border-left: 3px solid #28a745;
    color: #155724;
}

.yoga-event-block.course {
    background: #ffe5cc;
    border-left: 3px solid #28a745;
    color: #155724;
}

.yoga-event-block.user-booked {
    border-bottom: 5px solid #007bff;
}

/* Cancelled items - greyed out */
.yoga-event-block.cancelled {
    background: #e9ecef !important;
    border-left: 3px solid #6c757d !important;
    color: #6c757d !important;
    opacity: 0.6;
    text-decoration: line-through;
    cursor: not-allowed;
}

.yoga-event-block.cancelled:hover {
    opacity: 0.7;
}

.yoga-event-block.booked {
    background: #e9ecef;
    border-left: 3px solid #6c757d;
    opacity: 0.7;
    color: #495057;
    cursor: not-allowed;
    pointer-events: auto;
}

.yoga-event-block.booked:hover {
    opacity: 0.6;
    transform: none;
}

.yoga-event-block.reserved {
    background: #fff;
    border: 1px dashed #ccc;
    border-left: 3px solid #6c757d;
    color: #495057;
}

.yoga-event-title {
    font-weight: bold;
    margin-bottom: 2px;
    line-height: 1.3;
    overflow: visible;
    word-wrap: break-word;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
    hyphens: auto;
    white-space: normal;
}

.yoga-event-instructor {
    font-size: 11px;
    color: inherit;
    opacity: 0.8;
    /* margin-top: 2px; */
    margin-top: -2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.yoga-event-time {
    font-size: 10px;
    color: inherit;
    opacity: 0.7;
    margin-top: 2px;
}

.yoga-event-slots {
    font-size: 10px;
    color: inherit;
    opacity: 0.8;
    margin-top: 4px;
}

.yoga-event-slots-numbers {
    font-weight: 500;
    line-height: 1.2;
}

.yoga-event-slots-labels {
    font-size: 8px;
    opacity: 0.7;
    margin-top: 2px;
    line-height: 1.2;
}

.yoga-event-slots .yoga-event-full {
    color: #dc3545;
    font-weight: 600;
    opacity: 1;
}

.yoga-event-status {
    font-size: 9px;
    font-weight: bold;
    margin-top: 3px;
    text-transform: uppercase;
    opacity: 0.9;
}

/* Responsive Design - Tablet (2 columns) */
@media (max-width: 1024px) {
    .yoga-schedule-header {
        grid-template-columns: 80px repeat(2, 1fr);
    }
    
    .yoga-halls-header {
        grid-template-columns: 80px repeat(2, 1fr);
    }
    
    .yoga-schedule-grid {
        grid-template-columns: 80px repeat(2, 1fr);
    }
    
    .yoga-day-header:nth-child(4),
    .yoga-halls-icons:nth-child(4),
    .yoga-day-column:nth-child(4) {
        display: none;
    }

    .yoga-calendar-title {
        font-size: 20px;
    }
}

/* Responsive Design - Mobile (1 column) */
@media (max-width: 768px) {
    .yoga-schedule-header {
        grid-template-columns: 60px 1fr;
    }
    
    .yoga-halls-header {
        grid-template-columns: 60px 1fr;
    }
    
    .yoga-schedule-grid {
        grid-template-columns: 60px 1fr;
    }
    
    .yoga-day-header:nth-child(3),
    .yoga-day-header:nth-child(4),
    .yoga-halls-icons:nth-child(3),
    .yoga-halls-icons:nth-child(4),
    .yoga-day-column:nth-child(3),
    .yoga-day-column:nth-child(4) {
        display: none;
    }
    
    .yoga-hall-icon img {
        max-width: 30px;
    }
    
    .yoga-time-column {
        width: 60px;
    }
    
    .yoga-time-slot {
        font-size: 11px;
        padding: 8px 3px;
        min-height: 60px;
        height: 60px;
    }
    
    .yoga-event-slot {
        min-height: 60px;
        height: 60px;
    }
    
    .yoga-calendar-container {
        padding: 10px;
    }
    
    .yoga-calendar-title {
        font-size: 18px;
    }
    
    .yoga-event-block {
        font-size: 11px;
        padding: 6px;
    }
    
    .yoga-event-title {
        font-size: 11px;
    }
    
    .yoga-event-instructor {
        font-size: 10px;
    }
    
    .yoga-event-time {
        font-size: 9px;
    }
}

/* Scrollbar Styling */
.yoga-schedule-grid::-webkit-scrollbar {
    width: 8px;
}

.yoga-schedule-grid::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.yoga-schedule-grid::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.yoga-schedule-grid::-webkit-scrollbar-thumb:hover {
    background: #555;
}

