/* ============================================================
   Kingswood Tri Club – Custom CSS
   AI1EC plugin CSS cache missing — recreated here.
   ============================================================ */

/* === HEADER ================================================ */
.custom-logo { max-height: 600px !important; width: auto !important; height: auto !important; }
.site-branding    { text-align: left; }
.custom-logo-link { text-align: center; }
.site-title       { text-align: left; }

/* ============================================================
   AI1EC CALENDAR
   ============================================================ */
.ai1ec-container, #ai1ec-container {
    width: 100% !important; max-width: 100% !important; overflow: visible !important;
}

/* --- Toolbar ----------------------------------------------- */
.ai1ec-calendar-toolbar {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px;
    padding: 8px 0;
    margin-bottom: 8px;
    border-bottom: 2px solid #c0392b;
}
.ai1ec-nav {
    display: flex !important;
    list-style: none !important;
    margin: 0 !important; padding: 0 !important;
    gap: 4px;
}
.ai1ec-nav > li { display: inline-block; }

/* Button styles shared across toolbar */
.ai1ec-nav > li > a,
.ai1ec-dropdown-toggle,
.ai1ec-btn.ai1ec-dropdown-toggle {
    display: inline-block;
    padding: 5px 10px;
    background: #c0392b;
    color: #fff !important;
    border-radius: 4px;
    text-decoration: none !important;
    font-size: 12px;
    cursor: pointer;
    white-space: nowrap;
    border: none;
}
.ai1ec-nav > li > a:hover,
.ai1ec-dropdown-toggle:hover,
.ai1ec-nav > li.ai1ec-active > a { background: #96281b; color: #fff !important; }
.ai1ec-pull-right { margin-left: auto !important; }
.ai1ec-caret {
    display: inline-block;
    width: 0; height: 0;
    margin-left: 4px;
    vertical-align: middle;
    border-top: 4px dashed #fff;
    border-right: 4px solid transparent;
    border-left: 4px solid transparent;
}

/* --- Dropdowns --------------------------------------------- */
.ai1ec-dropdown { position: relative; }
.ai1ec-views-dropdown { position: relative; display: inline-block; }

.ai1ec-dropdown-menu {
    display: none;
    position: absolute;
    top: 100%; left: 0;
    z-index: 9999;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    min-width: 120px;
    box-shadow: 0 4px 12px rgba(0,0,0,.15);
    padding: 4px 0;
}
.ai1ec-dropdown-menu a {
    display: block;
    padding: 6px 12px;
    color: #333 !important;
    text-decoration: none !important;
    font-size: 13px;
}
.ai1ec-dropdown-menu a:hover { background: #f5f5f5; }

/* Show on hover */
.ai1ec-dropdown:hover .ai1ec-dropdown-menu,
.ai1ec-views-dropdown:hover .ai1ec-dropdown-menu { display: block !important; }

/* --- Prev/Next navigation ---------------------------------- */
.ai1ec-title-buttons {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 6px 0;
}
.ai1ec-pagination.ai1ec-btn-group {
    display: flex !important;
    align-items: center;
    gap: 3px;
    flex-wrap: wrap;
}
.ai1ec-pagination a {
    display: inline-block !important;
    padding: 4px 10px;
    background: #c0392b;
    color: #fff !important;
    border-radius: 4px;
    text-decoration: none !important;
    font-size: 12px;
    white-space: nowrap;
}
.ai1ec-pagination a:hover { background: #96281b; }
.ai1ec-minical-trigger {
    background: transparent !important;
    color: #c0392b !important;
    font-weight: bold;
    font-size: 14px;
    padding: 4px 8px !important;
}
.ai1ec-clearfix::after { content: ""; display: table; clear: both; }

/* --- CRITICAL: hide all popups (month + week) -------------- */
.ai1ec-popup { display: none !important; }

/* ============================================================
   MONTH VIEW
   ============================================================ */
.ai1ec-month-view {
    width: 100% !important;
    border-collapse: collapse !important;
    table-layout: fixed !important;
}
.ai1ec-month-view th.ai1ec-weekday {
    background: #c0392b;
    color: #fff !important;
    text-align: center;
    padding: 8px 4px;
    font-size: 13px;
    font-weight: bold;
    border: 1px solid #a93226;
}
.ai1ec-month-view td {
    border: 1px solid #ddd !important;
    vertical-align: top;
    padding: 2px;
    height: 90px;
    overflow: hidden !important;
}
.ai1ec-month-view td.ai1ec-empty { background: #f9f9f9; }
.ai1ec-month-view td.ai1ec-today { background: #fff5f5; }

/* Date number */
.ai1ec-date a {
    display: block;
    font-weight: bold;
    color: #555 !important;
    font-size: 11px;
    text-decoration: none !important;
    text-align: right;
    padding: 0 2px 2px;
}

/* Day container inside month cells — static flow */
.ai1ec-month-view .ai1ec-day { overflow: hidden; }

/* Month event chips — key fix: ai1ec-event-container not ai1ec-event */
.ai1ec-month-view a.ai1ec-event-container {
    display: block !important; position: static !important; margin: 1px 0; padding: 1px 4px;
    background: #c0392b; color: #fff !important; border-radius: 3px; font-size: 10px; text-decoration: none !important;
    white-space: normal; overflow: hidden; line-height: 14px; max-height: 30px; box-sizing: border-box;
}
.ai1ec-month-view a.ai1ec-event-container:hover { background: #96281b !important; }
.ai1ec-month-view .ai1ec-event { display: block; overflow: hidden; white-space: normal; }

/* Event title + time inline */
.ai1ec-event-title { display: inline; }
.ai1ec-event-time  { display: inline; font-size: 10px; opacity: .85; margin-right: 3px; }

/* ============================================================
   WEEK VIEW
   ============================================================ */

/* Header row */
.tablescroll_head th.ai1ec-weekday {
    background: #c0392b;
    color: #fff !important;
    text-align: center;
    padding: 6px 4px;
    font-size: 12px;
    border: 1px solid #a93226;
    min-width: 80px !important;
    white-space: nowrap;
}
.tablescroll_head th.ai1ec-weekday a { color: #fff !important; text-decoration: none !important; }
.ai1ec-weekday-date, .ai1ec-weekday-day { display: inline; }

/* Body cells: positioned container */
.ai1ec-week-view-original td {
    position: relative !important;
    height: 1440px !important;
    min-width: 80px !important;
    padding: 0 !important;
    overflow: hidden;
    border-right: 1px solid #eee;
    vertical-align: top;
}

/* Time-label overlay (first column) */
.ai1ec-grid-container {
    position: absolute !important;
    top: 0; left: 0;
    width: 100%; height: 1440px;
    z-index: 1;
    pointer-events: none;
    overflow: hidden;
}
.ai1ec-hour-marker {
    position: absolute !important;
    left: 0; width: 100%;
    height: 60px;
    box-sizing: border-box;
    border-top: 1px solid #ddd;
    padding: 2px 4px 0;
    font-size: 10px;
    color: #999;
    white-space: nowrap;
    overflow: hidden;
}
.ai1ec-quarter-marker {
    position: absolute !important;
    left: 0; width: 100%;
    height: 15px;
    border-top: 1px dotted #f0f0f0;
}

/* Day column: overlay in week view only */
.ai1ec-week-view-original .ai1ec-day {
    position: absolute !important;
    top: 0; left: 0;
    width: 100%; height: 1440px;
    z-index: 2;
    overflow: hidden;
}

/* Week event chips */
.ai1ec-week-view-original a.ai1ec-event-container {
    position: absolute !important; display: block !important; overflow: hidden; background: #c0392b !important;
    color: #fff !important; border-radius: 3px; padding: 1px 4px; font-size: 10px; line-height: 1.3;
    text-decoration: none !important; white-space: normal; box-sizing: border-box;
    z-index: 3; min-height: 18px; right: 1px;
}
.ai1ec-week-view-original a.ai1ec-event-container:hover { background: #96281b !important; }

/* Current time line */
.ai1ec-now {
    position: absolute !important;
    left: 0; width: 100%;
    border-top: 2px solid #c0392b;
    z-index: 4;
    font-size: 9px;
    color: #c0392b;
    padding: 0 3px;
    white-space: nowrap;
}

/* ============================================================
   AGENDA VIEW
   ============================================================ */
.ai1ec-agenda-view table { width: 100% !important; border-collapse: collapse; }
.ai1ec-agenda-view td,
.ai1ec-agenda-view th { padding: 8px; border-bottom: 1px solid #eee; vertical-align: top; }
.ai1ec-agenda-day { font-weight: bold; color: #c0392b; }
.ai1ec-fa { font-style: normal; }

/* --- Fix: current period label (minical-trigger) ----------- */
/* Must beat .ai1ec-pagination a specificity with element selector */
.ai1ec-pagination a.ai1ec-minical-trigger {
    background: transparent !important;
    color: #333 !important;
    font-weight: bold;
    font-size: 13px;
    border: 1px solid #c0392b !important;
}
.ai1ec-pagination a.ai1ec-minical-trigger:hover { background: #fff5f5 !important; }

/* --- Fix: prev/next week buttons (no icon font) ------------ */
.ai1ec-prev-week,
.ai1ec-next-week {
    min-width: 36px !important;
    height: auto !important;
    line-height: 1.8 !important;
    text-align: center;
    font-size: 16px !important;
}
.ai1ec-prev-week::before { content: "\2039"; }
.ai1ec-next-week::after  { content: "\203A"; }