/* Pilates Manager - Frontend Styles - Jasne kolory */

/* Izolacja CSS - zapobiega wpływowi na resztę strony */
.pilates-calendar-wrapper {
    isolation: isolate;
    contain: layout style;
}

/* Reset box-sizing dla wszystkich elementów kalendarza */
.pilates-calendar-wrapper *,
.pilates-calendar-wrapper *::before,
.pilates-calendar-wrapper *::after {
    box-sizing: border-box;
}

.pilates-calendar-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    width: 100%;
    max-width: 1850px;
    margin: 0 auto;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
    box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -moz-box-sizing: border-box;
    padding: 0;
}

/* Header kalendarza */
.calendar-header {
    background: white;
    color: #333;
    padding: 20px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
}

.calendar-title {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
    -webkit-box-flex: 1;
    -ms-flex-positive: 1;
    flex-grow: 1;
    color: #333;
}

.calendar-nav {
    color: #333;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
    border: 2px solid #ae6959;
    background: #fff;
}

.calendar-nav:hover {
    background: #ae6959;
    color: #fff;
    text-decoration: none;
}



/* Kontener kalendarza */
.calendar-container {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    min-height: 600px;
    background: white;
    border-radius: 6px;
    padding: 10px;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
}

/* Nowy nowoczesny kalendarz */
.modern-calendar {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 65%;
    flex: 0 0 65%;
    min-width: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 20px;
    border: 2px solid #e0e0e0;
}

/* Nagłówek kalendarza z nawigacją */
.calendar-header-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.calendar-month-title {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #ae6959;
    text-align: center;
    flex: 1;
}

.nav-button {
    background: #ae6959;
    color: white;
    border: 2px solid #ae6959;
    border-radius: 8px;
    padding: 10px 15px;
    cursor: pointer;
    font-size: 18px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 45px;
    height: 45px;
}

.nav-button:hover {
    background: #8b5247;
    border-color: #8b5247;
    transform: translateY(-1px);
}

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

.calendar-sidebar {
    -webkit-box-flex: 0;
    -ms-flex: 0 0 35%;
    flex: 0 0 35%;
    background: white;
    padding: 20px;
    min-width: 250px;
    overflow: hidden;
    max-height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    display: flex;
    flex-direction: column;
}

.sidebar-content {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.sidebar-content h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 18px;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    flex-shrink: 0;
}

.upcoming-events {
    flex: 1;
    overflow-y: auto;
    padding-right: 5px;
    max-height: 640px;
}

/* Style dla scrollbar w liście zajęć */
.upcoming-events::-webkit-scrollbar {
    width: 6px;
}

.upcoming-events::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.upcoming-events::-webkit-scrollbar-thumb {
    background: #ae6959;
    border-radius: 3px;
}

.upcoming-events::-webkit-scrollbar-thumb:hover {
    background: #8b5247;
}

/* Nagłówki dni tygodnia */
.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    background: #f8f4f2;
    border-radius: 8px;
    margin-bottom: 15px;
    gap: 2px;
    padding: 8px;
}

.weekday {
    padding: 12px 8px;
    text-align: center;
    font-weight: 700;
    color: #ae6959;
    font-size: 16px;
    background: #fff;
    border-radius: 6px;
    border: 2px solid #e0e0e0;
}

/* Siatka dni kalendarza */
.calendar-days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 8px;
    min-height: 400px;
}

/* Dni kalendarza */
.calendar-day {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 8px;
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 100px;
    min-width: 110px;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.calendar-day:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #ae6959;
}

.calendar-day.empty {
    background: transparent;
    border: none;
    cursor: default;
    box-shadow: none;
    min-height: 100px;
}

.calendar-day.empty:hover {
    transform: none;
    box-shadow: none;
    border: none;
}

.calendar-day.today {
    background: #f8f4f2;
    border-color: #ae6959;
    box-shadow: 0 4px 12px rgba(174, 105, 89, 0.2);
}

.calendar-day.today .day-number {
    color: #ae6959;
    font-weight: 700;
}

.calendar-day.past {
    background: #f8f8f8;
    color: #999;
    opacity: 0.7;
}

.calendar-day.past .day-number {
    color: #999;
}

.calendar-day.sunday {
    background: #fff5f5;
    border-color: #ffcdd2;
}

.calendar-day.sunday .day-number {
    color: #c53030;
}

.calendar-day.sunday.today {
    background: #f8f4f2;
    border-color: #ae6959;
    box-shadow: 0 4px 12px rgba(174, 105, 89, 0.2);
}

.calendar-day.sunday.today .day-number {
    color: #ae6959;
}

.calendar-day.has-events {
    background: #fff;
    border-color: #ae6959;
}

.calendar-day.has-events .day-number {
    color: #ae6959;
    font-weight: 700;
}

.day-number {
    font-weight: 600;
    font-size: 16px;
    margin-bottom: 6px;
    color: #333;
    flex-shrink: 0;
    text-align: center;
}

/* Treningi w kalendarzu */
.day-events {
    margin-top: 4px;
    flex: 1;
    overflow-y: auto;
    min-height: 0;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.calendar-event {
    background: #f8f4f2;
    border: 1px solid #ae6959;
    padding: 4px 6px;
    border-radius: 4px;
    font-size: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #ae6959;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 0;
}

.calendar-event:hover {
    background: #ae6959;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(174, 105, 89, 0.3);
}

.calendar-event:hover .event-time,
.calendar-event:hover .event-title,
.calendar-event:hover .event-spots {
    color: white;
}

.calendar-event.full {
    background: #f5f5f5;
    border-color: #999;
    color: #666;
    opacity: 0.5;
}

.calendar-event.full:hover {
    background: #f5f5f5;
    color: #666;
    opacity: 0.5;
    transform: none;
    box-shadow: none;
}

.event-time {
    font-weight: 700;
    font-size: 9px;
    line-height: 1.2;
    color: #ae6959;
}

.event-title {
    font-weight: 600;
    font-size: 10px;
    line-height: 1.1;
    color: #333;
}

.event-spots {
    font-size: 8px;
    font-weight: 600;
    color: #666;
    line-height: 1;
}

/* Sidebar z harmonogramem */
.sidebar-content h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 23px;
    font-weight: 600;
    font-family: 'Brygada 1918', serif;
}

.day-schedule {
    min-height: 200px;
}

.no-events {
    color: #666;
    font-style: italic;
    text-align: center;
    margin-top: 80px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.event-item {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 2px solid #e0e0e0;
}

.event-item h4 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.event-details {
    margin-bottom: 8px;
    font-size: 14px;
    color: #555;
}

.event-details p {
    margin: 4px 0;
}

.event-actions {
    margin-top: 12px;
}

.btn-book-event {
    background: #ae6959;
    color: white;
    border: 2px solid #ae6959;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-book-event:hover {
    background: #8b5247;
    border-color: #8b5247;
    transform: translateY(-1px);
}

.btn-book-event:disabled {
    background: #ccc;
    border-color: #ccc;
    color: #666;
    cursor: not-allowed;
    transform: none;
}

/* Modal */
.pilates-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    overflow-y: auto;
    padding: 20px 0;
}

.modal-content {
    background-color: white;
    margin: 20px auto;
    padding: 30px;
    border-radius: 12px;
    width: 95%;
    max-width: 800px;
    max-height: 90vh;
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    border: 3px solid #e0e0e0;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

/* Custom scrollbar for modal content */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #ae6959;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #8b5247;
}

/* Estetyczne alerty */
.pilates-alert {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 20px;
    border-radius: 8px;
    border: 2px solid #e0e0e0;
    background: #fff;
    color: #333;
    font-weight: 500;
    z-index: 10000;
    max-width: 400px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    transform: translateX(100%);
    transition: transform 0.3s ease;
}

.pilates-alert.show {
    transform: translateX(0);
}

.pilates-alert.success {
    border-color: #28a745;
    background: #d4edda;
    color: #155724;
}

.pilates-alert.error {
    border-color: #dc3545;
    background: #f8d7da;
    color: #721c24;
}

.pilates-alert.info {
    border-color: #17a2b8;
    background: #d1ecf1;
    color: #0c5460;
}

.pilates-alert .alert-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.pilates-alert .alert-title {
    font-weight: 600;
    font-size: 16px;
    margin: 0;
}

.pilates-alert .alert-close {
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: inherit;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s ease;
}

.pilates-alert .alert-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.pilates-alert .alert-message {
    margin: 0;
    line-height: 1.5;
}

/* Animacje dla alertów */
@keyframes slideInRight {
    from { transform: translateX(100%); }
    to { transform: translateX(0); }
}

@keyframes slideOutRight {
    from { transform: translateX(0); }
    to { transform: translateX(100%); }
}

.pilates-alert.slide-in {
    animation: slideInRight 0.3s ease forwards;
}

.pilates-alert.slide-out {
    animation: slideOutRight 0.3s ease forwards;
}

.close {
    color: #666;
    float: right;
    font-size: 22px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    right: 20px;
    top: 18px;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
}

.close:hover {
    background: #f8f9fa;
    color: #333;
}

.modal-content h2 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

.event-details {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid #e0e0e0;
}

.event-details h3 {
    margin: 0 0 12px 0;
    color: #333;
    font-size: 18px;
}

.event-details p {
    margin: 8px 0;
    color: #555;
}

/* Modal content structure */
.modal-content h2 {
    flex-shrink: 0;
    margin: 0 0 20px 0;
    color: #333;
    font-size: 24px;
    font-weight: 600;
    text-align: center;
}

.modal-content .event-details {
    flex-shrink: 0;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    border: 2px solid #e0e0e0;
}

.event-details-row {
    display: flex;
    gap: 20px;
    margin: 10px 0;
}

.event-detail-group {
    flex: 1;
}

.modal-content form {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

.modal-content .form-actions {
    flex-shrink: 0;
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

/* Formularze */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.form-group input {
    width: 100%;
    padding: 12px;
    border: 2px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.2s ease;
    box-sizing: border-box;
    background: #fff;
}

.form-group input:focus {
    outline: none;
    border-color: #ae6959;
    box-shadow: 0 0 0 3px rgba(174, 105, 89, 0.1);
}

/* Desktop layout - side by side inputs */
@media (min-width: 769px) {
    .form-row {
        display: flex;
        gap: 20px;
        margin-bottom: 20px;
    }
    
    .form-row .form-group {
        flex: 1;
        margin-bottom: 0;
    }
}

/* Style dla modala kodu potwierdzającego */
.code-info {
    background: #f8f4f2;
    border: 1px solid #ae6959;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
}

.code-info p {
    margin: 10px 0;
    color: #ae6959;
    font-size: 16px;
}

.code-info strong {
    color: #8b5247;
    font-weight: 600;
}

/* Specjalne style dla pola kodu potwierdzającego */
.form-group input[name="confirmation_code"] {
    text-align: center;
    font-family: 'Courier New', monospace;
    font-size: 20px;
    font-weight: bold;
    letter-spacing: 4px;
    text-transform: uppercase;
    background: #f8f9fa;
    border-color: #e0e0e0;
}

.form-group input[name="confirmation_code"]:focus {
    border-color: #ae6959;
    box-shadow: 0 0 0 3px rgba(174, 105, 89, 0.1);
    background: #fff;
}

.form-group small {
    display: block;
    margin-top: 5px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 30px;
}

.btn-book, .btn-confirm {
    background: #ae6959;
    color: white;
    border: 2px solid #ae6959;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    flex: 1;
}

.btn-book:hover, .btn-confirm:hover {
    background: #8b5247;
    color: white;
    border-color: #8b5247;
    transform: translateY(-1px);
}

.btn-cancel {
    background: #fff;
    color: #333;
    border: 2px solid #e0e0e0;
    padding: 12px 24px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.2s ease;
    flex: 1;
}

.btn-cancel:hover {
    background: #f8f9fa;
    border-color: #ccc;
    transform: translateY(-1px);
}

/* Responsywność dla ekranów mniejszych niż 1280px - mały kalendarz */
@media (max-width: 1279px) and (min-width: 769px) {
    .pilates-calendar-wrapper {
        width: 100% !important;
        max-width: 100%;
        padding: 10px;
        margin: 0;
    }
    
    .calendar-container {
        flex-direction: row;
        padding: 5px;
    }
    
    .calendar-grid {
        flex: 0 0 50%;
        width: 50%;
        border-right: 2px solid #e0e0e0;
        border-bottom: none;
        margin-bottom: 0;
        min-width: 0;
    }
    
    .calendar-sidebar {
        flex: 0 0 50%;
        width: 50%;
        border-top: none;
        border-right: none;
        border-left: none;
        min-width: 250px;
        padding: 15px;
    }
}

/* Responsywność dla ekranów o szerokości 1100px */
@media (max-width: 1200px) and (min-width: 769px) {
    .pilates-calendar-wrapper {
        width: 100% !important;
        max-width: 100%;
        padding: 10px;
        margin: 0;
    }
    
    .calendar-container {
        flex-direction: row;
        padding: 5px;
    }
    
    .calendar-grid {
        flex: 0 0 65%;
        width: 65%;
        border-right: 2px solid #e0e0e0;
        border-bottom: none;
        margin-bottom: 0;
        min-width: 0;
    }
    
    .calendar-sidebar {
        flex: 0 0 35%;
        width: 35%;
        border-top: none;
        border-right: none;
        border-left: none;
        min-width: 250px;
        padding: 15px;
    }
    
    .calendar-day {
        min-height: 100px;
        min-width: 110px;
        height: 100px;
        max-height: 100px;
        padding: 3px;
    }
    
    .calendar-day.empty {
        height: 100px;
        min-height: 100px;
        max-height: 100px;
    }
    
    .calendar-day.has-events {
        height: 100px;
        min-height: 100px;
        max-height: 100px;
    }
    
    .calendar-day.sunday {
        background: #fff5f5;
        color: #c53030;
    }
    
    .calendar-day.sunday:hover {
        background: #fed7d7;
    }
    
    .calendar-day.sunday.today {
        background: #f8f4f2;
        color: #ae6959;
        border: 2px solid #ae6959;
        border-radius: 4px;
    }
    
    .calendar-day.sunday.has-events {
        background: #f5f0ed;
        height: 100px;
        min-height: 100px;
        max-height: 100px;
        overflow-y: auto;
    }
    
    .calendar-day.empty.sunday {
        background: #fff5f5;
        color: #c53030;
    }
    
    .calendar-day.empty.sunday:hover {
        background: #fed7d7;
    }
    
    .weekday {
        padding: 10px 3px;
        font-size: 12px;
    }
    
    .calendar-event {
        padding: 2px 5px;
        font-size: 11px;
        margin-bottom: 2px;
    }
    
    .event-time {
        font-size: 10px;
    }
    
    .event-title {
        font-size: 10px;
    }
    
    .calendar-day {
        height: 120px;
        min-height: 120px;
        min-width: 110px;
        max-height: 120px;
    }
    
    .calendar-day.empty {
        height: 120px;
        min-height: 120px;
        max-height: 120px;
    }
    
    .calendar-day.has-events {
        height: 120px;
        min-height: 120px;
        max-height: 120px;
    }
}

@media (max-width: 1100px) and (min-width: 769px) {
    .pilates-calendar-wrapper {
        width: 100% !important;
        max-width: 100%;
        padding: 15px;
        margin: 0 15px;
    }
    
    .calendar-container {
        flex-direction: row;
    }
    
    .calendar-grid {
        flex: 0 0 65%;
        width: 65%;
        border-right: 2px solid #e0e0e0;
        border-bottom: none;
        margin-bottom: 0;
    }
    
    .calendar-sidebar {
        flex: 0 0 35%;
        width: 35%;
        border-top: none;
        border-right: none;
        border-left: none;
        min-width: 250px;
    }
    
    .calendar-event {
        padding: 3px 6px;
        font-size: 11px;
        margin-bottom: 3px;
    }
    
    .event-time {
        font-size: 11px;
    }
    
    .event-title {
        font-size: 10px;
    }
    
    .calendar-day {
        height: 120px;
        min-height: 120px;
        min-width: 110px;
        max-height: 120px;
    }
    
    .calendar-day.empty {
        height: 120px;
        min-height: 120px;
        max-height: 120px;
    }
    
    .calendar-day.has-events {
        height: 120px;
        min-height: 120px;
        max-height: 120px;
    }
}

/* Responsywność dla bardzo małych ekranów */
@media (max-width: 480px) {
    .pilates-calendar-wrapper {
        width: 100% !important;
        max-width: 100%;
        padding: 2px;
        margin: 0;
    }
    
    .calendar-container {
        flex-direction: column;
        padding: 2px;
    }
    
    .calendar-grid {
        flex: 0 0 auto;
        width: 100%;
        border-right: none;
        border-bottom: 2px solid #e0e0e0;
        margin-bottom: 10px;
        min-width: 0;
    }
    
    .calendar-sidebar {
        flex: 0 0 auto;
        width: 100%;
        border-top: 2px solid #e0e0e0;
        border-right: none;
        border-left: none;
        max-height: 300px;
        overflow-y: auto;
        padding: 8px;
    }
    
    .calendar-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        padding: 10px;
    }
    
    .calendar-title {
        font-size: 18px;
    }
    
    .calendar-day {
        min-height: 60px;
        min-width: 110px;
        height: 60px;
        max-height: 60px;
        padding: 1px;
    }
    
    .calendar-day.empty {
        height: 60px;
        min-height: 60px;
        max-height: 60px;
    }
    
    .calendar-day.has-events {
        height: 60px;
        min-height: 60px;
        max-height: 60px;
    }
    
    .calendar-day.sunday {
        background: #fff5f5;
        color: #c53030;
    }
    
    .calendar-day.sunday:hover {
        background: #fed7d7;
    }
    
    .calendar-day.sunday.today {
        background: #f8f4f2;
        color: #ae6959;
        border: 2px solid #ae6959;
        border-radius: 4px;
    }
    
    .calendar-day.sunday.has-events {
        background: #f5f0ed;
        height: 60px;
        min-height: 60px;
        max-height: 60px;
        overflow-y: auto;
    }
    
    .calendar-day.empty.sunday {
        background: #fff5f5;
        color: #c53030;
    }
    
    .calendar-day.empty.sunday:hover {
        background: #fed7d7;
    }
    
    .weekday {
        padding: 6px 1px;
        font-size: 10px;
    }
    
    .day-number {
        font-size: 12px;
    }
    
    .event-time {
        font-size: 10px;
    }
    
    .event-title {
        font-size: 10px;
    }
    
    .calendar-event {
        padding: 2px 4px;
        font-size: 10px;
        margin-bottom: 2px;
    }
    
    .event-time {
        font-size: 9px;
    }
    
    .event-title {
        font-size: 9px;
    }
    
    .calendar-day {
        height: 80px;
        min-height: 80px;
        min-width: 110px;
        max-height: 80px;
    }
    
    .calendar-day.empty {
        height: 80px;
        min-height: 80px;
        max-height: 80px;
    }
    
    .calendar-day.has-events {
        height: 80px;
        min-height: 80px;
        max-height: 80px;
    }
    
    .calendar-day.sunday {
        background: #fff5f5;
        color: #c53030;
    }
    
    .calendar-day.sunday:hover {
        background: #fed7d7;
    }
    
    .calendar-day.sunday.today {
        background: #f8f4f2;
        color: #ae6959;
        border: 2px solid #ae6959;
        border-radius: 4px;
    }
    
    .calendar-day.sunday.has-events {
        background: #f5f0ed;
        height: 80px;
        min-height: 80px;
        max-height: 80px;
        overflow-y: auto;
    }
    
    .calendar-day.empty.sunday {
        background: #fff5f5;
        color: #c53030;
    }
    
    .calendar-day.empty.sunday:hover {
        background: #fed7d7;
    }
    
    .pilates-modal .form-group input,
    .pilates-modal .form-group label {
        font-size: 16px; /* Zapobiega zoom na iOS */
    }
    
    /* Reduce modal text sizes by 2px on mobile */
    .pilates-modal h2 {
        font-size: 22px; /* was 24px */
    }
    
    .pilates-modal .event-details h3 {
        font-size: 16px; /* was 18px */
    }
    
    .pilates-modal .event-details p {
        font-size: 12px; /* was 14px */
    }
    
    .pilates-modal .form-group label {
        font-size: 12px; /* was 14px */
    }
    
    .pilates-modal .form-group input {
        font-size: 14px; /* was 16px */
    }
    
    .pilates-modal .code-info p {
        font-size: 14px; /* was 16px */
    }
    
    .pilates-modal .form-group small {
        font-size: 10px; /* was 12px */
    }
    
    .pilates-modal .btn-book,
    .pilates-modal .btn-cancel {
        font-size: 14px; /* was 16px */
    }
    
    /* Mobile modal adjustments */
    .pilates-modal {
        padding: 10px 0;
    }
    
    .modal-content {
        margin: 10px auto;
        padding: 20px;
        max-height: 90vh;
    }
    
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    
    .form-row .form-group {
        margin-bottom: 20px;
    }
    
    /* Stack event details vertically on mobile */
    .event-details-row {
        flex-direction: column;
        gap: 10px;
        margin: 8px 0;
    }
}
    
    .pilates-modal .form-actions {
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
        gap: 10px;
    }
    
    .pilates-modal .btn-book,
    .pilates-modal .btn-cancel {
        width: 100%;
        padding: 15px;
        font-size: 16px;
    }
    
    .pilates-modal .form-group input,
    .pilates-modal .form-group label {
        font-size: 16px; /* Zapobiega zoom na iOS */
    }
    
    /* Ukryj kalendarz na telefonach i pokaż listę dni */
    .calendar-days {
        display: none;
    }
    
    .calendar-weekdays {
        display: none;
    }
    
    /* Pokaż miniaturowy kalendarz na telefonach */
    .mobile-calendar {
        display: block !important;
        margin-bottom: 10px;
        order: 1;
        width: 100%;
    }
    
    /* Pokaż listę dni na telefonach */
    .mobile-days-list {
        display: block;
        padding: 15px;
        background: #fff;
        border-radius: 8px;
        box-shadow: 0 2px 10px rgba(0,0,0,0.1);
        order: 2;
        margin-top: 0;
        width: 100%;
    }
    
    /* Zmiana kolejności elementów na telefonie */
    .pilates-calendar-wrapper {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
    }
    
    .mobile-day-item {
        background: white;
        border: 1px solid #e0e0e0;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 10px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .mobile-day-header {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-pack: justify;
        -ms-flex-pack: justify;
        justify-content: space-between;
        -webkit-box-align: center;
        -ms-flex-align: center;
        align-items: center;
        margin-bottom: 10px;
    }
    
    .mobile-day-date {
        font-weight: 600;
        font-size: 16px;
        color: #333;
    }
    
    .mobile-day-events {
        margin-top: 10px;
    }
    
    .mobile-event-item {
        background: #f8f9fa;
        border-left: 4px solid #ae6959;
        padding: 10px;
        margin-bottom: 8px;
        border-radius: 4px;
    }
    
    .mobile-event-time {
        font-weight: 600;
        color: #ae6959;
        margin-bottom: 5px;
    }
    
    .mobile-event-title {
        font-weight: 500;
        margin-bottom: 5px;
    }
    
    .mobile-event-spots {
        font-size: 12px;
        color: #666;
    }
}

/* Responsywność dla bardzo małych ekranów */
@media (max-width: 480px) {
    .pilates-calendar-wrapper {
        margin: 0 5px;
        padding: 5px;
    }
    
    .calendar-header {
        padding: 15px 10px;
    }
    
    .calendar-title {
        font-size: 20px;
    }
    
    .mobile-calendar {
        padding: 10px;
    }
    
    .mobile-days-list {
        padding: 10px;
    }
    
    .mobile-day-item {
        padding: 10px;
    }
}

/* Ukryj listę dni na desktopie */
.mobile-days-list {
    display: none;
    width: 100%;
}

/* Ukryj listę zajęć mobilnych na desktopie */
.mobile-events-list {
    padding-top: 20px;
    display: none !important;
}
.hide-on-mobile {
    display: none;
}
/* Zapewnij, że kalendarz jest widoczny na desktopie */
@media (min-width: 769px) {
    .modern-calendar {
        display: block !important;
    }
    .hide-on-mobile {
        display: inline-block;
    }
    
    .calendar-sidebar {
        display: block !important;
    }
    
    .mobile-events-list {
        display: none !important;
    }
}

/* Layout dla ekranów < 1350px - lista pod kalendarzem */
@media (max-width: 1349px) and (min-width: 769px) {
    .calendar-container {
        flex-direction: column !important;
    }
    
    .calendar-grid {
        width: 100% !important;
        flex: none !important;
    }
    
    .calendar-sidebar {
        width: 100% !important;
        flex: none !important;
        margin-top: 20px;
    }
    
    /* Usuń minimalną szerokość dla dni kalendarza */
    .calendar-day {
        min-width: auto !important;
    }
}

/* Miniaturowy kalendarz dla mobile */
.mobile-calendar {
    display: none;
    margin: 20px 0;
    padding: 15px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    cursor: pointer;
    width: 100%;
}

.mobile-calendar .mobile-calendar-header {
    text-align: center;
    margin-bottom: 15px;
    font-size: 18px;
    font-weight: 600;
}

.mobile-calendar .mobile-calendar-weekdays {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
    margin-bottom: 10px;
}

.mobile-calendar .mobile-weekday {
    text-align: center;
    font-size: 10px;
    font-weight: 600;
    color: #666;
    padding: 5px 2px;
}

.mobile-calendar .mobile-calendar-days {
    display: -ms-grid;
    display: grid;
    -ms-grid-columns: 1fr 1fr 1fr 1fr 1fr 1fr 1fr;
    grid-template-columns: repeat(7, 1fr);
    gap: 2px;
}

.mobile-calendar .mobile-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 500;
    background: #f8f9fa;
    border-radius: 4px;
    cursor: pointer;
    position: relative;
}

.mobile-calendar .mobile-day.has-events::after {
    content: '';
    position: absolute;
    bottom: 2px;
    width: 4px;
    height: 4px;
    background: #ae6959;
    border-radius: 50%;
}

.mobile-calendar .mobile-day.today {
    background: #ae6959;
    color: white;
}

.mobile-calendar .mobile-day.empty {
    background: transparent;
    cursor: default;
}

.mobile-calendar .mobile-day {
    cursor: pointer;
    transition: all 0.2s ease;
}

.mobile-calendar .mobile-day:hover {
    background: #fff;
    transform: scale(1.1);
}

.mobile-calendar .mobile-day.has-events {
    background: #f8f4f2;
    border: 2px solid #ae6959;
}

/* Animacje */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.event-item {
    animation: fadeIn 0.3s ease-out;
}

/* Statusy rezerwacji */
.booking-status {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.booking-status.pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.booking-status.confirmed {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.booking-status.cancelled {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Style dla tabeli najbliższych zajęć */
.events-table {
    overflow-x: auto;
    margin-top: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.events-table table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.events-table th {
    background: #f8f9fa;
    padding: 8px 6px;
    text-align: left;
    font-weight: 600;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    font-size: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.events-table td {
    padding: 6px;
    border-bottom: 1px solid #e9ecef;
    vertical-align: top;
    font-size: 12px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.events-table tr:hover {
    background: #f8f9fa;
}

.events-table tr.full {
    background: #f8f8f8;
    opacity: 0.5;
}

.events-table tr.full td {
    color: #666;
}

.events-table .spots {
    text-align: center;
    font-weight: 600;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.events-table .spots.full {
    color: #666;
    background: #e0e0e0;
    border-radius: 3px;
    padding: 2px 4px;
    opacity: 0.7;
}

.datetime-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.datetime-info .event-date {
    font-weight: 600;
    color: #333;
    font-size: 12px;
    line-height: 1.3;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.datetime-info .event-time {
    font-size: 11px;
    color: #666;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.event-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.event-info .event-title {
    font-weight: 600;
    color: #333;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.event-info .event-spots {
    font-size: 11px;
    color: #666;
    line-height: 1.1;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.btn-book-from-table {
    background: #5d3a31;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    display: inline-block;
    vertical-align: middle;
    min-width: 80px;
    text-align: center;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.btn-book-from-table:hover:not(:disabled) {
    background: #4a2e28;
    color: white;
    transform: translateY(-1px);
}

.btn-book-from-table:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Responsywność tabeli */
@media (max-width: 768px) {
    .events-table {
        font-size: 12px;
        overflow-x: auto;
        max-width: 100%;
    }
    
    .events-table table {
        min-width: 300px;
    }
    
    .events-table th,
    .events-table td {
        padding: 4px 3px;
        font-size: 11px;
    }
    
    .events-table th:nth-child(2),
    .events-table td:nth-child(2) {
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .events-table th:nth-child(3),
    .events-table td:nth-child(3) {
        display: none;
    }
    .btn-book, .btn-cancel{
        font-size: 14px;
        letter-spacing: 0px;
    }
}

@media (max-width: 480px) {
    .events-table {
        font-size: 11px;
        overflow-x: auto;
        max-width: 100%;
    }
    
    .events-table table {
        min-width: 250px;
    }
    
    .events-table th,
    .events-table td {
        padding: 3px 2px;
        font-size: 10px;
    }
    
    .events-table th:nth-child(1),
    .events-table td:nth-child(1) {
        max-width: 80px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .events-table th:nth-child(2),
    .events-table td:nth-child(2) {
        max-width: 100px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .events-table th:nth-child(3),
    .events-table td:nth-child(3) {
        display: none;
    }
    
    .btn-book-from-table {
        padding: 6px 12px;
        font-size: 11px;
        min-width: 60px;
    }
}

/* Style dla opisu treningu w modalu */
.event-description {
    margin-top: 15px;
    padding: 15px;
    background: #f8f4f2;
    border: 1px solid #ae6959;
    border-radius: 6px;
}

.event-description h4 {
    margin: 0 0 10px 0;
    color: #ae6959;
    font-size: 14px;
    font-weight: 600;
}

.event-description p {
    margin: 0;
    color: #333;
    font-size: 13px;
    line-height: 1.5;
}

/* Widok mobilny - ukryj kalendarz i pokaż listę zajęć */
@media (max-width: 768px) {
    /* Ukryj cały kontener kalendarza na urządzeniach mobilnych */
    .calendar-container {
        display: none !important;
    }
    
    /* Pokaż listę zajęć mobilnych */
    .mobile-events-list {
        display: block !important;
        width: 100%;
        padding: 10px;
        background: #fff;
        border-radius: 12px;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    }
    
    .mobile-events-list h3 {
        margin: 0 0 20px 0;
        color: #333;
        font-size: 20px;
        font-weight: 600;
        text-align: center;
        font-family: 'Brygada 1918', serif;
    }
    
    .mobile-event-card {
        background: #fff;
        border: 2px solid #e0e0e0;
        border-radius: 12px;
        padding: 16px;
        margin-bottom: 16px;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        transition: all 0.3s ease;
    }
    
    .mobile-event-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
        border-color: #ae6959;
    }
    
    .mobile-event-card.full {
        background: #f8f8f8;
        border-color: #999;
        opacity: 0.5;
    }
    
    .mobile-event-header {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        margin-bottom: 12px;
    }
    
    .mobile-event-date {
        font-size: 16px;
        font-weight: 700;
        color: #ae6959;
        margin-bottom: 4px;
    }
    
    .mobile-event-time {
        font-size: 14px;
        color: #666;
        font-weight: 500;
    }
    
    .mobile-event-spots {
        background: #f8f4f2;
        color: #ae6959;
        padding: 4px 8px;
        border-radius: 6px;
        font-size: 12px;
        font-weight: 600;
        text-align: center;
        min-width: 80px;
    }
    
    .mobile-event-spots.full {
        background: #e0e0e0;
        color: #666;
        opacity: 0.7;
    }
    
    .mobile-event-title {
        font-size: 18px;
        font-weight: 600;
        color: #333;
        margin-bottom: 8px;
        line-height: 1.3;
    }
    
    .mobile-event-description {
        color: #666;
        font-size: 13px;
        line-height: 1.5;
        margin-bottom: 0px;
    }
    
    .mobile-event-actions {
        text-align: center;
    }
    
    .mobile-book-button {
        background: #ae6959;
        color: white;
        border: 2px solid #ae6959;
        padding: 10px 20px;
        border-radius: 8px;
        cursor: pointer;
        font-size: 14px;
        font-weight: 600;
        transition: all 0.2s ease;
        display: inline-block;
        min-width: 140px;
        margin-top: 15px;
    }
    
    .mobile-book-button:hover:not(:disabled) {
        background: #8b5247;
        border-color: #8b5247;
        transform: translateY(-1px);
    }
    
    .mobile-book-button:disabled {
        background: #ccc;
        border-color: #ccc;
        color: #666;
        cursor: not-allowed;
        transform: none;
    }
    
    .mobile-no-events {
        text-align: center;
        color: #666;
        font-style: italic;
        font-size: 16px;
        padding: 40px 20px;
    }
}

/* Style dla desktopowych kart zajęć w sidebarze */
.desktop-event-card {
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 12px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.desktop-event-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #ae6959;
}

.desktop-event-card.full {
    background: #f8f8f8;
    border-color: #999;
    opacity: 0.5;
}

.desktop-event-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.desktop-event-date {
    font-size: 14px;
    font-weight: 700;
    color: #ae6959;
    margin-bottom: 2px;
}

.desktop-event-time {
    font-size: 12px;
    color: #666;
    font-weight: 500;
    line-height: 12px;
}

.desktop-event-spots {
    background: #f8f4f2;
    color: #ae6959;
    padding: 3px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    min-width: 60px;
}

.desktop-event-spots.full {
    background: #ffebee;
    color: #c62828;
}

.desktop-event-title {
    font-size: 16px;
    font-weight: 600;
    color: #333;
    margin-bottom: 6px;
    line-height: 1.3;
}

.desktop-event-description {
    color: #666;
    font-size: 12px;
    line-height: 1.4;
    margin-bottom: 10px;
}

.desktop-event-actions {
    text-align: center;
}

.desktop-book-button {
    background: #ae6959;
    color: white;
    border: 2px solid #ae6959;
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-block;
    width: 100%;
}

.desktop-book-button:hover:not(:disabled) {
    background: #8b5247;
    border-color: #8b5247;
    color: white;
    transform: translateY(-1px);
}

.desktop-book-button:disabled {
    background: #ccc;
    border-color: #ccc;
    color: #666;
    cursor: not-allowed;
    transform: none;
}

.desktop-no-events {
    text-align: center;
    color: #666;
    font-style: italic;
    font-size: 14px;
    padding: 20px;
}

.calendar-event.full:hover{
    background: inherit !important;
    color: inherit !important;
    cursor: default !important;
}


