/* Órarend stílusok */
.schedule-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    table-layout: fixed;
}

.schedule-table th {
    border: 1px solid #e9e9e9;
    text-align: center;
    font-size: 12px;
    height: 40px;
    position: relative;
    font-family: "Kumbh Sans", Sans-serif;
    padding: 0;
}

.schedule-table td {
    height: 20px !important; /* Fontos, hogy pontosan 20px legyen */
    padding: 0 !important;   /* Nem lehet padding */
    position: relative;
    box-sizing: border-box;
}

.schedule-table th {
    background-color: #e7f1ff;
    font-weight: bold;
    color: #322038;
    font-family: "Kumbh Sans", Sans-serif;
}

.time-cell {
    width: 80px;
    text-align: center;
    font-weight: 400;
    background-color: #f5f5f5;
}

.class-block:hover {
    filter: brightness(1.1);
    z-index: 2;
}

.schedule-cell {
    position: relative;
    height: 20px;  /* 60px helyett */
    vertical-align: top;
    border: 1px solid #ddd;
}

.schedule-event {
    position: absolute;
    left: 0;
    right: 0;
    margin: 1px;
    padding: 2px;
    border-radius: 3px;
    font-size: 12px;
    overflow: hidden;
    box-sizing: border-box;
    z-index: 1;
}


/* Ha két esemény találkozik */
.schedule-event + .schedule-event {
    margin-top: 0;
}

.class-block {
    position: absolute;
    width: calc(100% - 2px);
    color: #fff;
    font-size: 11px;
    padding: 4px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    border-radius: 4px;
    box-sizing: border-box;
    overflow: hidden;
}

.class-block strong {
    font-size: 12px;
    margin-bottom: 2px;
    display: block;
}


.class-block .instructor {
    font-size: 10px;
    opacity: 0.9;
    font-style: italic;
}

.room-header {
    padding: 5px;
    color: #000;
}

.room-title {
    margin: 30px 0 15px;
    padding-bottom: 10px;
    border-bottom: 2px solid #fff8fd;
    font-size: 20px;
    margin-bottom: 8px;
    color: #322038;
    font-family: "Kumbh Sans", sans-serif;
    font-weight: 700;
}

/* Admin felület stílusok */
.orarend-form-container {
    background: #fff;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid #ccc;
    border-radius: 4px;
}

.orarend-events-list {
    margin-top: 30px;
}

.form-table th {
    width: 150px;
}

.form-table input[type="text"],
.form-table input[type="time"],
.form-table select {
    width: 250px;
}

.form-table input[type="color"] {
    width: 100px;
    height: 30px;
    padding: 0 2px;
    margin-right: 10px;
}

.color-preview {
    display: inline-block;
    width: 20px;
    height: 20px;
    border-radius: 3px;
    border: 1px solid #ccc;
    vertical-align: middle;
}

#events-list td {
    vertical-align: middle;
}

.delete-event {
    color: #dc3232;
}

/* Terem specifikus színek */
.buddha .room-header {
    background-color: rgba(144, 238, 144, 0.2); /* Világoszöld */
}

.ametiszt .room-header {
    background-color: rgba(221, 160, 221, 0.2); /* Világoslila */
}

.terapias .room-header {
    background-color: rgba(255, 182, 193, 0.2); /* Világosrózsaszín */
}

.mobile-view {
    display: none;
}

.mobile-room-selector {
    display: none;
}

/* Reszponzív stílusok */
@media screen and (max-width: 768px) {
    .schedule-table th,
    .schedule-table td {
        font-size: 11px;
    }

    .mobile-room-selector {
        display: block; /* Mobilon megjelenik */
        position: sticky;
        top: 0;
        z-index: 100;
        background: #fff;
        padding: 15px;
        margin: -15px -15px 15px -15px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    }

    #mobile-room-select {
        width: 100%;
        padding: 12px;
        font-size: 16px;
        border: 1px solid #e5e7eb;
        border-radius: 8px;
        background-color: #fff;
        color: #333;
        appearance: none;
        -webkit-appearance: none;
        background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
        background-repeat: no-repeat;
        background-position: right 12px center;
        background-size: 16px;
    }

    .room-container {
        display: none;
        margin-bottom: 30px;
    }

    .room-container.active {
        display: block;
    }

    /* Ha az összes terem meg van jelenítve, kisebb margót használunk köztük */
    .room-container.active + .room-container.active {
        margin-top: -15px;
    }

    /* Animáció a teremváltáshoz */
    .room-container {
        transition: opacity 0.3s ease;
        opacity: 0;
    }

    .room-container.active {
        opacity: 1;
    }
    .desktop-view {
        display: none;
    }
    
    .mobile-view {
        display: block;
    }
    
    .mobile-room-title {
        font-size: 19px;
        font-weight: bold;
        color: #333;
        font-family: "Kumbh Sans", Sans-serif;
        padding: 12px;
        background: #f8f9fa;
        border-radius: 8px;
        margin: 20px 0;
        text-align: center;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }
    
    .mobile-days-container {
        padding: 0 10px;
    }
    
    .mobile-day-block {
        margin-bottom: 25px;
    }
    
    .mobile-day-title {
        font-size: 18px;
        font-weight: 600;
        color: #444;
        padding: 10px;
        border-bottom: 2px solid #e9ecef;
        margin-bottom: 15px;
    }
    
    .mobile-events-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
        padding: 0 5px;
    }
    
    .mobile-event-card {
        padding: 12px;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0,0,0,0.1);
        display: flex;
        flex-direction: column;
        gap: 5px;
    }
    
    .mobile-event-title {
        font-weight: bold;
        color: #fff;
        font-size: 14px;
    }
    
    .mobile-event-time {
        color: rgba(255,255,255,0.9);
        font-size: 12px;
    }
    
    .mobile-event-instructor {
        color: rgba(255,255,255,0.9);
        font-size: 12px;
        font-style: italic;
    }
    .time-cell {
        width: 50px;
    }
    
    .class-block {
        font-size: 10px;
    }
    
    .class-block .instructor {
        font-size: 9px;
    }
    
    .form-table input[type="text"],
    .form-table input[type="time"],
    .form-table select {
        width: 100%;
    }
}