/* Local font-face removed: Now utilizing Google Fonts loaded via header.php */

.cal_main-cal-container {
  /* Utilizing Montserrat to match the global site styles defined in header.php */
  font-family: 'Montserrat', sans-serif;
  font-weight: 400;
  margin: 40px 140px 40px 140px;
  background-color: rgba(200, 200, 200, 0.3);
  position: relative;
  border-radius: 4px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

.cal_hol-win {
  padding: 5px;
  background-color: rgba(200, 200, 200, 0.3);
  position: relative;
  border-radius: 4px;
  box-shadow: 0 0 5px rgba(0, 0, 0, 0.4);
}

.cal_calcontainer {
  position: relative;
  border-radius: 4px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
}

.cal_rescontainer {
  position: relative;
  min-height: 620px;
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.5);
  border-radius: 4px;
}

.cal_data_blink:focus {
  color: white;
}

.cal_data_blink:hover {
  color: yellow;
}

.cal_bookinfo {
  position: relative;
  min-height: 200px;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
}

.cal_resimgcontainer {
  position: relative;
  min-height: 260px;
  overflow: hidden;
  justify-content: center;
  align-items: center;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
}

.cal_resimgcontainer img {
  position: absolute;
  width: 900px;
  height: auto;
  max-width: auto;
  max-height: auto;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -55%);
}

.cal_loimgcontainer {
  position: relative;
  width: auto;
  height: auto;
}

.cal_lolabel {
  padding-left: 5px;
  font-size: 13px;
  font-style: italic;
  line-height: 100%;
}

.cal_title {
  font-size: 18px;
  font-weight: bold;
}

.cal_data {
  font-size: 16px;
}

.cal_data_blink_a {
  width: 100%;
  margin: 0px;
  padding: 0px;
}

.cal_data_blink {
  width: 100%;
  background-color: blue;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  border-top-left-radius: 2px;
  border-top-right-radius: 2px;
  font-size: 28px;
  font-weight: bold;
  text-align: center;
  text-shadow: 2px 2px 4px rgba(100, 100, 100, 0.8);
  color: white;
  margin: 0px;
  padding: 10px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.8);
}

.cal_info-item-rnd {
  margin: 0px;
  border-bottom-left-radius: 4px;
  border-bottom-right-radius: 4px;
  border-top-left-radius: 4px;
  border-top-right-radius: 4px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.4);
}

.cal_disc {
  font-size: 13px;
  font-weight: bold;
  line-height: 100%;
}

.cal_loimgcontainer img {
  position: relative;
  width: auto;
  height: auto;
  max-width: auto;
  max-height: 90px;
}

.cal_sfa {
  font-size: 15px;
  right: 5px;
}

.cal_included-item {
  display: flex;
  align-items: center;
  padding: 2px 0;
  width: 50%;
}

.cal_fa-regular {
  margin-right: 5px;
  color: green;
}

.cal_st1fa, .cal_st2fa, .cal_st3fa, .cal_st4fa, .cal_st5fa {
  text-shadow: 2px 2px 4px rgba(55, 55, 55, 0.4);
  color: #CC9900;
  font-size: 18px;
  top: -10px;
  display: none;
}

.cal_st1fa { left: 0px; }
.cal_st2fa { left: 20px; }
.cal_st3fa { left: 40px; }
.cal_st4fa { left: 60px; }
.cal_st5fa { left: 80px; }

.cal_lfa { font-size: 15px; left: 15px; }
.cal_w-70 { width: 60%; }
.cal_w-30 { width: 40%; }
.cal_dlfa { position: absolute; color: darkgreen; font-size: 20px; left: -12px; }
.cal_rfa { font-size: 15px; right: 15px; }
.cal_prfa { font-size: 15px; right: 4px; }
.cal_plfa { font-size: 15px; left: 4px; }
.cal_rrfa { font-size: 15px; right: 26px; }

.cal_closehol {
  position: absolute;
  font-size: 20px;
  top: 10px;
  right: 20px;
  display: none;
}

.cal_classselect, .cal_durselect {
  font-size: 16px;
  padding: 5px;
  border-radius: 2px;
}

.cal_classselect:focus, .cal_durselect:focus { outline: none; }

.cal_classlabel { text-align: left; font-size: 27px; font-weight: bold; }
.cal_berthslabel { text-align: left; font-size: 22px; }
.cal_monthlabel { text-align: left; font-size: 25px; font-weight: bold; min-height: 28px; }
.cal_durselcont, .cal_classselcont, .cal_sel-cont { min-height: 38px; position: relative; }

.cal_calendar-container {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}

.cal_loading-overlay {
  display: none;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: rgba(255, 255, 255, 0.7);
  z-index: 100;
  justify-content: center;
  align-items: center;
}

.cal_loading-spinner {
  border: 4px solid rgba(0, 0, 0, 0.1);
  border-left-color: #000;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: cal_spin 1s linear infinite;
}

@keyframes cal_spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

.cal_overlay, .cal_overlay2 {
  font-size: 16px;
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  display: none;
  z-index: 1000;
}

.cal_overlay { background-color: rgba(90, 130, 130, 0.9); }
.cal_overlay2 { background-color: rgba(180, 180, 180, 0.5); }

.cal_error-container {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  max-width: 90%;
  background-color: #fff;
  padding: 8px;
  border-radius: 5px;
  box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
  justify-content: center;
  align-items: center;
  display: none;
  z-index: 1099;
}

.cal_blue-back-sel-pets, .cal_blue-back-sel-adults, .cal_blue-back-sel-children {
  position: absolute;
  padding: 5px;
  font-size: 15px;
  background-color: darkblue;
  color: white;
}

.cal_blue-back-sel-pets, .cal_blue-back-sel-adults { right: 0px; }
.cal_blue-back-sel-children { left: 0px; }

.cal_calendar {
  font-size: 10px;
  min-height: 220px;
  flex: 1;
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 1px;
}

.cal_day {
  position: relative;
  border: 1px solid #ccc;
  text-align: center;
  padding: 2px;
  border-radius: 2px;
  transition: background-color 0.3s ease;
}

.cal_day-header {
  font-weight: bold;
  text-transform: uppercase;
  text-align: center;
  border: 1px solid #ccc;
  background-color: lightgrey;
  padding: 2px;
  border-radius: 2px;
}

.cal_savday, .cal_pavday { background-color: #4A9A46; cursor: pointer; }
.cal_avday { background: #fff; }
.cal_navday { background: #E38384; }
.cal_pastday { background: #dadada; }

.cal_key {
  border: 1px solid #ccc;
  text-align: center;
  padding: 4px;
  border-radius: 2px;
  margin: 0px;
}

.cal_ksavday, .cal_kavday, .cal_knavday, .cal_kpastday { font-size: 18px; }
.cal_ksavday { background-color: #4A9A46; }
.cal_kavday { background: #fff; }
.cal_knavday { background: #E38384; }
.cal_kpastday { background: #dadada; }

.cal_day.cal_dayhover { background: #407C39; cursor: pointer; }
.cal_selday { background: #309E29; color: #fff; }

.cal_tooltipb {
  display: block;
  font-size: 16px;
  border-radius: 2px;
  line-height: 100%;
}

/* Media Queries */
@media screen and (max-width: 1350px) {
  .cal_resimgcontainer { min-height: 350px; }
}

@media screen and (max-width: 1000px) {
  .cal_calendar { font-size: 10px; }
  .cal_main-cal-container { margin: 10px; }
  .cal_classlabel { font-size: 24px; }
  .cal_berthslabel { font-size: 21px; }
}

@media screen and (max-width: 770px) {
  .cal_disc { position: relative; }
  .cal_tooltipb { display: none; }
  .cal_berthslabel { font-size: 22px; }
  .cal_classlabel { font-size: 28px; }
  .cal_monthlabel { font-size: 22px; }
  .cal_data_blink { font-size: 23px; }
  .cal_resimgcontainer { min-height: 350px; }
}

/* --- MODS FOR SITE DESIGN --- */

/* --- 2. Main Widget Container --- */
.cal_main-cal-container { 
    background: #ffffff !important; 
    border-radius: 12px !important; 
    box-shadow: 0 8px 30px rgba(0,0,0,0.1) !important;
    border: 1px solid #eee !important;
    overflow: hidden;
    /* Redundant font-family removed here since it's inherited from the main block now */
}

/* --- 3. Boat Layout Image Scaling --- */
#cal_rescontainer img, .cal_resimgcontainer img {
    max-width: 100% !important; 
    height: auto !important;     
    display: block !important;
    margin: 0 auto !important;    
    border-radius: 8px !important; 
}
.cal_resimgcontainer { width: 100% !important; overflow: hidden !important; padding: 15px !important; }

/* --- 4. Dropdowns Modernization --- */
select.fancy_fild, select.cal_blue-back-sel-pets, select.cal_blue-back-sel-children, 
select.cal_blue-back-sel-adults, select.cal_durselect, select.cal_classselect {
    background-color: #ffffff !important; 
    color: #333333 !important; 
    border: 1px solid #ced4da !important;
    border-radius: 6px !important;
    padding-left: 12px !important; 
    padding-right: 55px !important; 
    box-shadow: none !important;
    appearance: none !important;
    -webkit-appearance: none !important;
}

/* --- 4.5 Dropdown Focus State --- */
select.fancy_fild:focus, 
select.cal_blue-back-sel-pets:focus, 
select.cal_blue-back-sel-children:focus, 
select.cal_blue-back-sel-adults:focus, 
select.cal_durselect:focus, 
select.cal_classselect:focus {
    border-color: var(--andersen-green) !important;
    box-shadow: 0 0 0 3px rgba(26, 60, 52, 0.2) !important; 
    outline: none !important;
    z-index: 50 !important;
}

/* --- 5. Icon Placement --- */
.cal_sfa { 
    right: 12px !important; left: auto !important; top: 50% !important; 
    transform: translateY(-50%) !important; color: var(--andersen-green) !important;
    position: absolute !important; z-index: 10 !important;
}
.cal_rrfa, .cal_sel-cont .fa-paw, .cal_sel-cont .fa-child {
    right: 32px !important; left: auto !important; top: 50% !important; 
    transform: translateY(-50%) !important; color: var(--andersen-green) !important; 
    z-index: 10 !important; position: absolute !important;
}

/* --- 6. Star Alignment --- */
.cal_st1fa, .cal_st2fa, .cal_st3fa, .cal_st4fa, .cal_st5fa {
    position: static !important; display: inline-block !important;
    margin-right: 4px !important; color: #d4a373 !important; 
}

/* --- 7. Calendar Grid Polish --- */
.cal_calendar {
    width: 100% !important; max-width: 100% !important; box-sizing: border-box !important;
}
#cal_calendar td, #cal_calendar th, .cal_day, .cal_day-header {
    text-align: center !important; vertical-align: middle !important;
    padding: 4px 0px !important; 
    font-size: 11px !important; 
}

/* --- 8. FLUID FLEXBOX LAYOUT --- */
.cal_calcontainer .position-relative.w-100.d-flex { flex-wrap: wrap !important; justify-content: space-between !important; }
.cal_calcontainer .w-50 {
    min-width: 145px !important; flex: 1 1 auto !important; margin-bottom: 6px !important;
}
.cal_calcontainer .w-50:first-child { justify-content: flex-start !important; }

/* --- 8.5 THE PERFECT GRID ALIGNMENT FIX --- */
.cal_sel-cont, .cal_durselcont, .cal_classselcont {
    display: block !important; width: 100% !important; margin-bottom: 8px !important; position: relative !important;
}

select.cal_blue-back-sel-pets, select.cal_blue-back-sel-adults, 
select.cal_blue-back-sel-children, select.cal_durselect, select.cal_classselect {
    width: calc(100% - 6px) !important; margin-left: 3px !important; margin-right: 3px !important;
}

.cal_calcontainer .w-50.cal_sel-cont { width: 50% !important; flex: 0 0 50% !important; min-width: 0 !important; }

/* --- 9. PREV / NEXT BUTTONS --- */
#cal_nextMonthBtn, #cal_prevMonthBtn {
    background-color: var(--andersen-green) !important; border: none !important;
    font-weight: bold !important; text-transform: uppercase !important;
}
.mt-1 .position-relative.w-100.d-flex { flex-wrap: nowrap !important; }
#cal_prevMonthBtn, #cal_nextMonthBtn {
    min-width: 0 !important; width: 48% !important; flex: 0 0 48% !important; 
    margin-bottom: 0 !important; padding: 8px 0 !important; border-radius: 6px !important;
    white-space: nowrap !important; font-size: 12px !important; overflow: hidden !important;
}
#cal_prevMonthBtn { margin-right: 4% !important; }

/* --- 10. LEGEND KEYS --- */
div.cal_calcontainer div.mt-1 + div.mt-1 {
    display: flex !important; flex-direction: row !important; justify-content: center !important; 
    align-items: center !important; flex-wrap: nowrap !important; width: 100% !important;
    margin-top: 15px !important; gap: 8px !important;                
}

div.cal_calcontainer div.mt-1 + div.mt-1 > div.w-50 { display: contents !important; }

div.cal_calcontainer div.cal_key {
    width: 40px !important; max-width: 40px !important; min-width: 40px !important;
    height: 32px !important; flex: 0 0 40px !important; margin: 0 !important; padding: 0 !important;
    display: flex !important; justify-content: center !important; align-items: center !important;
    text-align: center !important; border-radius: 5px !important; box-sizing: border-box !important;
}

div.cal_calcontainer div.cal_key i { 
    margin: auto !important; padding: 0 !important; font-size: 16px !important; display: inline-block !important; 
}

/* --- PREV / NEXT BUTTONS CALENDAR FIX --- */
#cal_nextMonthBtn, #cal_prevMonthBtn {
    padding: 10px 5px !important; /* Overrides the 30px global side padding */
    white-space: nowrap !important; /* Forces text to stay on one line */
    font-size: 13px !important; /* Shrinks text slightly to fit */
    line-height: 1 !important;
    min-width: 0 !important; 
    width: 48% !important; 
    flex: 0 0 48% !important; 
    border-radius: 6px !important; /* Overrides the global 50px pill shape */
}

/* Add a little space between the two buttons */
#cal_prevMonthBtn { 
    margin-right: 4% !important; 
}