/* === Class Timetable Element Styles === */

.class-timetable-wrapper {
  --color-primary: #cb9913;
  --color-container-bg: #d4a32d;
  --font-primary: 'Dancing Script', cursive;
  --font-secondary: var(--font-secondary);
  width: 100%;
  margin-top: 25px;
  margin-bottom: -25px;
  
  /* Suppresses the external horizontal scrollbar */
  position: relative;
  overflow-x: hidden;
}

.class-timetable-wrapper .class-timetable-title {
  text-transform: uppercase;
  font-size: 1.8em;
  font-family: var(--font-secondary);
  color: var(--color-primary);
  text-align: center;
  margin-bottom: 30px;
  padding: 0;
  line-height: 1.4;
}

/* NEW: Main Description Styling */
.class-timetable-wrapper .class-timetable-main-description p {
    font-family: var(--font-secondary);
    margin-bottom: 10px;
    margin-top: 10px;
    font-size: 1em;
    text-align: center;
}

.class-timetable-main-description{
    margin-bottom:30px !important;
    margin-top:-20px !important;
    max-width:900px;
    margin:0px auto;
    display:block;
    padding-left:20px;
    padding-right:20px;
}

/* ------------------------------------------------ */
/* --- SPLIDE LAYOUT & CONTAINERS (SCROLL HERE) --- */
/* ------------------------------------------------ */

.class-timetable-wrapper .splide {
    max-width: 1440px;
    margin: 0 auto;
    position: relative;
}

.class-timetable-wrapper .splide__track {
    /* Main beige container */
    background-color: #f5ead1;
    border-radius: 16px;
    
    /* Consistent 20px padding all around */
    padding: 20px;
    padding-top:0px;
    
    box-sizing: border-box;
    overflow-x: hidden !important; /* Forces horizontal clipping */
    
    /* Vertical scroll control here */
    max-height: 700px; 
    overflow-y: auto; 
    
    /* Margin to pull the content over the inner scrollbar */
    margin-right: -17px;
}

/* Columns are now slides, must use flex-grow to stretch height */
.class-timetable-wrapper .splide__list {
    align-items: stretch; /* Ensures all slides have the same height */
}
.class-timetable-wrapper .splide__slide {
    list-style: none; /* Remove bullet points */
    margin: 0;
    padding: 0;
}

/* ------------------------------------------------ */
/* --- INNER COLUMN AND CONTENT STYLING --- */
/* ------------------------------------------------ */

.class-timetable-wrapper .class-timetable-column {
    display: flex;
    flex-direction: column;
    gap: 20px; /* Consistent 20px gap between heading and boxes */
    padding: 0px;
    
    /* Height and scroll removed from here */
    height: 100%; 
    max-height: none; 
    overflow-y: visible;
    margin-right: 0;

  
}

/* *** STICKY DAY HEADINGS *** */
.class-timetable-wrapper .class-timetable-day-heading {
    font-family: var(--font-primary, 'Dancing Script', cursive);
    color: var(--color-primary);
    font-size: 1.5em;
    font-weight: 400;
    line-height: 1.4;
    padding: 10px 0;
    padding-top:20px !important;
    margin: 0;
    text-align: center;
    position: relative;
    left: 0; 

    /* STICKY FIX */
    position: sticky;
    top: 0; 
    background-color: #f5ead1; /* IMPORTANT: Set background to match track */
    z-index: 10; 
    padding-top: 10px; 
    padding-bottom: 10px;
    margin-right: -1px;
    margin-left: -1px;
}

/* *** RESTORED: CLASS CARD STYLING *** */
.class-timetable-wrapper .class-timetable-box {
    /* RESTORED STYLES */
    border: 2px solid var(--color-primary); 
    background-color:#ffffff;
    padding: 10px;
    min-height: 150px;
    font-family: var(--font-secondary);
    box-sizing: border-box;
    margin: 0;
    border-radius:10px;
    
    /* Indicate it's clickable */
    cursor: pointer; 
}

.class-timetable-wrapper .class-timetable-box--empty {
    visibility: hidden;
    height: 100%;
    border-style: dashed;
    border-color: #aaa;
}

/* ------------------------------------------------ */
/* --- ARROW STYLING (Final Text Fix) --- */
/* ------------------------------------------------ */

.class-timetable-wrapper .splide__arrow {
    background: none;
    border: none;
    width: 15px;
    height: 50px;
    padding: 0;
    opacity: 1;
    
    top: 13px !important;
    transform: none !important;
    
    position: absolute;
    z-index: 2;
    
    /* FIX: Style the HTML entity as text */
    font-size: 20px;
    color: var(--color-primary);
    line-height: 1;
}

.class-timetable-wrapper .splide__arrow:hover {
    background: none;
    color: #333;
}

.class-timetable-wrapper .splide__arrow:disabled {
    color: #999;
    opacity: 0.4;
    cursor: not-allowed;
}

/* Positioning the Arrows 20px from the track edge */
.class-timetable-wrapper .splide__arrow--prev {
    left: 20px;
}
.class-timetable-wrapper .splide__arrow--next {
    right: 20px;
}

/* HIDE the default Splide SVG that the JS inserts */
.class-timetable-wrapper .splide__arrow svg {
    display: none !important;
}

/* ------------------------------------------------ */
/* --- GENERAL CONTENT STYLING --- */
/* ------------------------------------------------ */

.class-timetable-wrapper .class-timetable-box p,
.class-timetable-wrapper .class-timetable-box div {
    margin: 0 0 5px 0;
    padding: 0;
    line-height: 1.5;
}
.class-timetable-wrapper .class-timetable-box p:last-child,
.class-timetable-wrapper .class-timetable-box div:last-child {
    margin-bottom: 0;
}
.class-timetable-wrapper .class-location {
    font-size: 0.9em;
    color: #333;
}
.class-timetable-wrapper .class-name {
    font-size: 1.1em;
    font-weight: bold;
    color: #000;
    text-transform: uppercase;
}
.class-timetable-wrapper .class-time {
    font-size: 0.9em;
    font-weight: bold;
    color: #333;
}
.class-timetable-wrapper .class-instructor {
    font-size: 0.9em;
    font-style: italic;
    color: #000;
    padding-top: 8px;
}

/* ------------------------------------------------ */
/* --- MODAL STYLING (Unchanged) --- */
/* ------------------------------------------------ */

.class-timetable-modal {
    /* Base visibility and positioning */
    position: fixed; 
    z-index: 9999; 
    left: 0;
    top: 0;
    width: 100%; 
    height: 100%; 
    overflow: auto; 
    
    /* FIX: Background is transparent */
    background-color: transparent; 
    
    /* TRANSITION FIX: Initial state */
    opacity: 0; 
    visibility: hidden; /* HIDDEN BY DEFAULT */
    
    /* FIX: Set a transition speed for smooth closing */
    transition: opacity 0.3s ease; 
}

/* This class is toggled by JavaScript to show and center the modal */
.class-timetable-modal.is-active {
    /* The JS now handles setting display: flex on open */
    display: flex; 
    justify-content: center; 
    align-items: center;    
    
    /* Final state */
    opacity: 1;
    visibility: visible;
    background-color: transparent; 
    
    /* Transition is set here for the opening animation */
    transition: opacity 0.3s ease; 
}

.class-timetable-modal-content {
    background-color: #fff;
    padding: 30px;
    border: 2px solid var(--color-primary);
    width: 80%; 
    max-width: 600px;
    position: relative;
    font-family: var(--font-secondary);
    border-radius:10px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2); /* Horizontal, Vertical, Blur, Spread/Transparency */
    
    /* ADDED: Initial transform state to make it look like it slides in */
    transform: translateY(-20px);
    transition: transform 0.3s ease;
}

/* Apply final transformation when active */
.class-timetable-modal.is-active .class-timetable-modal-content {
    transform: translateY(0);
}

.class-timetable-modal-close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
    margin-top: -10px;
}

.class-timetable-modal-close:hover,
.class-timetable-modal-close:focus {
    color: #000;
    text-decoration: none;
}

.class-timetable-modal-content h3 {
    font-family: var(--font-primary, 'Dancing Script', cursive);
    color: var(--color-primary);
    font-size: 1.5em;
    margin-top: 0;
    margin-bottom: 15px; 
}

/* Style the description wrapper */
.class-timetable-modal-content #modal-class-description {
    font-style: italic;
    font-size: 1em;
    color: #444;
}

/* Style paragraphs within the description (if the editor outputs them) */
.class-timetable-modal-content #modal-class-description p {
    margin: 0 0 15px 0;
    padding: 0;
    font-style: normal;
}

/* ------------------------------------------------ */
/* --- CUSTOM BUTTON STYLING --- */
/* ------------------------------------------------ */

.class-timetable-button-wrapper {
    /* Centers the button horizontally */
    text-align: center;
    margin-top: 30px; 
    margin-bottom: 50px; 
}

.class-timetable-button {
    /* Custom styles as requested */
    display: inline-block;
    padding: 10px 30px;
    background: var(--color-primary);
    color: #fff;
    border-radius: 25px;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
    
    /* Optional: for better user experience */
    transition: background-color 0.2s ease, opacity 0.2s ease;
    font-size: 1em; /* Ensure text size is readable */
    font-family: var(--font-secondary);
    font-weight: normal;
    cursor: pointer;
}

.class-timetable-button:hover {
    /* Subtle hover effect */
    opacity: 0.9;
    color: #fff; /* Ensure hover doesn't change text color if default link styles interfere */
}



@media (max-width: 768px) {
.class-timetable-wrapper .splide__track
 {
    border-radius: 0px; 
    margin-right: 0px; 
}

}