/* ============================================================
   CALENDAR ROOT + GLOBAL VARIABLES
   ============================================================ */
:root {
  --seg-height: 20px;
  --seg-radius: 4px;
  --seg-fontsize: 12px;
}

/* Calendar container */
#calendarScreen {
  position: relative;
  overflow: auto;
  /*
  background: none;
  border: 1px solid #ccc;
  */
  touch-action: pinch-zoom;
  user-select: none;
  height: 300px;
}

/* ============================================================
   SETTINGS PANEL
   ============================================================ */
.settings-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.settings-row label {
  width: 120px;
  font-weight: 500;
}

.settings-row select {
  flex: 1;
  padding: 6px 8px;
  font-size: 0.95rem;
}

/* ============================================================
   LAYOUT MODES (STRUCTURAL)
   ============================================================ */
.layout-autofit {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.layout-compare {
  display: flex;
  flex-direction: row;
  overflow-x: auto;
  gap: 12px;
}

.layout-scroll {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

/* ============================================================
   CALENDAR BLOCKS
   ============================================================ */
.cal-block {
  position: absolute;
  box-sizing: border-box;
  overflow: hidden;
  font-family: inherit;
}

/* Day label (Mon, Tue, etc.) */
.cal-dayLabel {
  font-weight: 600;
  text-align: center;
}

/* Day cell background + border */
.cal-daycell {
  border: 1px solid #ccc;
  background: white;

  padding: 2px 4px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}
/*
.cal-daycell-header {
  display: flex;
  justify-content: space-between;
  font-size: 10px;
  color: #666;
  margin-bottom: 2px;
}
*/
/*
.cal-daycell-header {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    padding: 2px 4px;
	line-height: 1.2;
    color: #222;
}
*/
.cal-daycell-header {
    display: flex;
    /*justify-content: space-between;*/
    font-size: 11px;
    line-height: 1.2;
    margin-bottom: 4px;
	
	flex-direction: column; 
    gap: 2px; /* small vertical spacing between rows */
}
.header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.extra {
    white-space: nowrap;
    font-size: 11px; /* compact-friendly */
    line-height: 1.1;
}
.extras-left,
.extras-right {
    display: flex;
    gap: 6px;
    align-items: center;
}
.extra .sun,
.extra .hwlw,
.extra .moon,
.extra .extreme {
    display: flex;
    gap: 6px;
    align-items: center;
}

.extra .extreme {
    color: #b00;
    font-weight: bold;
    font-size: 11px;
}

.sun, .hwlw, .moon, .extreme {
    display: flex;
    gap: 6px;
}

.extreme {
    color: #b00;
    /*font-weight: bold;*/
}



/* Slack cell container */
.cal-slack-cell {
  padding: 0px;
  display: flex;
  flex-direction: column;
}


/* ============================================================
   SLACK TRAFFIC BARS
   ============================================================ */
.slack-traffic {
  display: flex;
  height: var(--seg-height);
  border-radius: var(--seg-radius);
  overflow: hidden;
  margin: 2px 0;
  
  gap: 2px;
	
  width: 100%;
}

.slack-traffic .seg {
  flex: 1;
  min-width: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: var(--seg-fontsize);
  font-weight: 600;
  padding: 0 2px;
  white-space: nowrap;
  overflow: hidden;
  box-sizing: border-box;
}
.seg {
    padding: 1px 3px;
    border-radius: 3px;
    font-size: var(--seg-fontsize, 11px);
    line-height: 1.2;
    white-space: nowrap;
}

/* Container */
.day-extras-dropdown {
    position: relative;
    display: inline-block;
    font-size: 14px;
}

/* Button */
.day-extras-dropdown .dropdown-button {
    background: var(--panel-bg, #f0f8ff);
    border: 1px solid var(--panel-border, #bcd);
    padding: 6px 10px;
    border-radius: 4px;
    cursor: pointer;
    color: var(--text-colour, #222);
    font-weight: 500;
}

/* Menu container */
.day-extras-dropdown .dropdown-menu {
    display: none;
    position: absolute;
    top: 110%;
    left: 0;
    background: var(--panel-bg, #f0f8ff);
    border: 1px solid var(--panel-border, #bcd);
    border-radius: 4px;
    padding: 8px 12px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
    z-index: 1000;
    min-width: 180px;
}

/* Show menu when parent has .open */
.day-extras-dropdown.open .dropdown-menu {
    display: block;
}

/* Checkbox labels */
.day-extras-dropdown .dropdown-menu label {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 0;
    cursor: pointer;
    color: var(--text-colour, #222);
}

/* Checkbox styling (optional) */
.day-extras-dropdown input[type="checkbox"] {
    transform: scale(1.1);
}
/* ============================================================
   COLOUR MODES (AESTHETIC)
   ============================================================ */

.colour-mode-0 .seg {
    background: none;
    /*color: #000 !important;*/
	color: var(--seg-colour);
    border: none;
}

.colour-mode-1 .seg {
    background: color-mix(in srgb, var(--seg-colour) 33%, transparent);
    color: #000;
}

.colour-mode-2 .seg {
    background: color-mix(in srgb, var(--seg-colour) 67%, transparent);
    color: #000;
}

.colour-mode-3 .seg {
    background: var(--seg-colour);
    color: #fff;
}

.colour-mode-4 .seg {
    background: var(--seg-colour);
    color: #fff;
    font-weight: bold;
}