/* Stylesheet entry point. Section styles are split into styles/*.css. */
@import url("styles/foundation.css");
@import url("styles/club-sections.css");
@import url("styles/membership-footer.css");
@import url("styles/timelines.css");
@import url("styles/modals.css");
@import url("styles/competition-draws.css");

/* 3-Column Layout */
.timeline-grid-3col {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

/* Vertical divider lines between 1st & 2nd and 2nd & 3rd columns */
@media (min-width: 769px) {
    .timeline-grid-3col > .timeline-block:not(:last-child) {
        border-right: 1px solid rgba(0, 0, 0, 0.12);
        padding-right: 30px;
    }
}

/* Horizontal dividers for mobile view */
@media (max-width: 768px) {
    .timeline-grid-3col {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    .timeline-grid-3col > .timeline-block:not(:last-child) {
        border-right: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.12);
        padding-bottom: 20px;
    }
}

.draw-sheet-frame {
    width: 100%;
    height: 600px;
    border: none;
}

/* ============================================================================
   FIXTURE MATCH POPUP SYSTEM HOOK STYLES (HOME VS AWAY)
   ============================================================================ */

.fixture-popup-card {
    text-align: center;
    padding: 16px 0 !important;
}

.fixture-team-badge-header {
    display: inline-block;
    background: #173b32;
    color: #ffcc00;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 12px;
    border: 1px solid #ffcc00;
}

.fixture-badge-grid {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    max-width: 460px;
    margin: 4px auto 20px auto;
}

.fixture-team-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

/* Rounded Vector Style Placeholder Circle Badges */
.club-badge-placeholder {
    width: 76px;
    height: 76px;
    border-radius: 50%;
    background-color: #173b32; /* Goldenacre Primary Corporate Green */
    color: #ffcc00;            /* Goldenacre Yellow Accent Trim */
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: Georgia, serif;
    font-weight: 700;
    font-size: 1.3rem;
    box-shadow: 0 4px 12px rgba(23, 59, 50, 0.08);
    border: 3px solid #ffcc00;
    margin-bottom: 10px;
}

/* Shift Away club badge options to distinct structural blue colors */
.fixture-team-col.away-team .club-badge-placeholder {
    background-color: #0369a1; /* Association Sport Blue */
    color: #ffffff;
    border-color: #e2e8f0;
}

.fixture-team-name {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.15rem;
    font-weight: 700;
    color: #173b32;
    margin-bottom: 6px;
    line-height: 1.25;
    overflow-wrap: anywhere;
}

.fixture-vs-divider {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 0.8rem;
    font-weight: 800;
    color: #64748b;
    background: #eef3ee;
    padding: 6px 10px;
    border-radius: 4px;
    letter-spacing: 0.06em;
}

/* Home / Away Venue Label Tags */
.venue-tag {
    display: inline-block;
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 4px;
    letter-spacing: 0.04em;
}
.tag-home {
    background-color: #fff8df;
    color: #b45309;
    border: 1px solid #ffcc00;
}
.tag-away {
    background-color: #f1f4f1;
    color: #475569;
    border: 1px solid #cbd5e1;
}

.fixture-meta-info {
    margin: 12px 0;
    padding: 0 10px;
}
.fixture-description {
    font-size: 0.88rem;
    color: #475569;
    line-height: 1.5;
    margin-top: 4px;
}

/* Push Notification Activation Display Area */
.reminder-action-panel {
    margin-top: 22px;
    padding: 16px;
    background: #f8fafc;
    border-radius: 8px;
    border: 1px dashed #cbd5e1;
}

.btn-set-reminder {
    background: #173b32;
    color: #ffffff;
    border: 1px solid #173b32;
    padding: 10px 20px;
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    transition: background 0.2s ease, transform 0.2s ease;
}

.btn-set-reminder:hover {
    background: #245747;
    transform: translateY(-1px);
}
.btn-set-reminder:disabled {
    background: #cbd5e1;
    border-color: #cbd5e1;
    color: #64748b;
    cursor: not-allowed;
    transform: none;
}

.reminder-status-text {
    font-size: 0.8rem;
    margin-top: 10px;
    color: #334155;
    font-weight: 500;
    line-height: 1.4;
}

/* Responsive constraints for narrow mobile screens */
@media (max-width: 480px) {
    .fixture-badge-grid { gap: 10px; }
    .club-badge-placeholder { width: 64px; height: 64px; font-size: 1.1rem; }
    .fixture-team-name { font-size: 1rem; }
}

/* ============================================================================
   CALENDAR DAY CELL & INDIVIDUAL EVENT HOVER STYLES
   ============================================================================ */

/* Disable whole-day box dark border on hover */
.calendar-day:hover,
.calendar-day-has-events:hover {
    border-color: rgba(0, 0, 0, 0.12) !important;
    box-shadow: none !important;
    background-color: transparent !important;
    cursor: default !important;
}

/* Default border accent color for generic match entries */
.calendar-event.fixture-event-tag {
    border-left: 3px solid #0369a1 !important;
    background: #f0f7ff !important;
    font-weight: 600;
}

/* Team Color Coding: 1st 16 (Blue Accent) */
.calendar-event.fixture-team-1st {
    border-left: 4px solid #0369a1 !important;
    background: #e0f2fe !important;
    color: #0369a1 !important;
    font-weight: 600;
}

/* Team Color Coding: 2nd 16 (Purple Accent) */
.calendar-event.fixture-team-2nd {
    border-left: 4px solid #7c3aed !important;
    background: #f3e8ff !important;
    color: #6b21a8 !important;
    font-weight: 600;
}

/* Individual Event Tag Hover Animations */
.calendar-day .calendar-event {
    cursor: pointer !important;
    transition: transform 0.15s ease, filter 0.15s ease, box-shadow 0.15s ease;
}

.calendar-day .calendar-event:hover {
    transform: translateY(-1px);
    filter: brightness(0.95);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.calendar-event.fixture-team-1st:hover {
    background: #bae6fd !important;
}

.calendar-event.fixture-team-2nd:hover {
    background: #e9d5ff !important;
}

/* ============================================================================
   EVENTS DIALOG MODAL SIZING & PERFECT CENTERING RESET
   ============================================================================ */

/* Backdrop Overlay */
dialog.events-detail-dialog::backdrop {
    background-color: rgba(0, 0, 0, 0.5);
}

/* Centered fixed positioning for desktop, vertical mobile, and horizontal mobile */
dialog#events-detail-dialog,
dialog.events-detail-dialog {
    position: fixed !important;
    top: 50% !important;
    left: 50% !important;
    bottom: auto !important;
    right: auto !important;
    transform: translate(-50%, -50%) !important;
    margin: 0 !important;
    width: min(88vw, 440px) !important;
    max-width: 440px !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: 85vh !important;
    padding: 1.25rem !important;
    border-radius: 12px !important;
    border: none !important;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25) !important;
    box-sizing: border-box !important;
    overflow-y: auto !important;
}

/* Force inner container to wrap tightly without flex stretching */
dialog.events-detail-dialog .events-detail-content {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
}

dialog.events-detail-dialog #events-detail-list {
    display: table !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
}

/* Clean up spacing inside popup items */
.events-detail-item {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 !important;
}

.events-detail-item h3 {
    margin-top: 0 !important;
    margin-bottom: 6px !important;
    font-size: 1.1rem !important;
    line-height: 1.3 !important;
}

.events-detail-item p {
    margin-top: 0 !important;
    margin-bottom: 6px !important;
}

.events-detail-item p:last-child {
    margin-bottom: 0 !important;
}

/* Horizontal / Short height mobile screen handling */
@media (max-height: 500px) {
    dialog#events-detail-dialog,
    dialog.events-detail-dialog {
        max-height: 90vh !important;
        padding: 0.75rem 1rem !important;
    }
}

/* ============================================================================
   UPCOMING EVENTS HOMEPAGE WIDGET STYLING
   ============================================================================ */

.upcoming-events-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-width: 700px;
    margin: 0 auto;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    padding: 8px 20px;
    box-shadow: 0 2px 6px rgba(23, 59, 50, 0.03);
}

.event-badge-card {
    display: flex;
    align-items: center; /* Vertically centers date box when multiple events share a date */
    background: transparent;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    border-radius: 0;
    padding: 14px 0;
    box-shadow: none;
    transition: none;
}

.event-badge-card:hover {
    transform: none;
    box-shadow: none;
    background-color: transparent;
}

.event-badge-card:last-child {
    border-bottom: none;
}

/* Date Badge Container (Goldenacre Green & Yellow Theme) */
.event-date-badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    height: 48px;
    background-color: #173b32; /* Primary Corporate Green */
    color: #ffcc00;            /* Accent Yellow */
    border-radius: 6px;
    padding: 2px;
    margin-right: 16px;
    text-align: center;
    border: 1px solid #ffcc00;
    flex-shrink: 0;
}

.badge-month {
    font-size: 0.55rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    line-height: 1;
}

.badge-day {
    font-size: 1.25rem;
    font-weight: 800;
    line-height: 1.1;
    font-family: Georgia, serif;
}

/* Event Details Body */
.event-info-body {
    flex-grow: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.event-info-body h3 {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 1.05rem;
    color: #173b32;
    margin: 0 0 2px 0;
    line-height: 1.3;
}

.event-time-meta {
    font-size: 0.8rem;
    font-weight: 600;
    color: #0369a1;
    margin: 0 0 2px 0;
}

.event-desc {
    font-size: 0.8rem;
    color: #475569;
    margin: 0;
    line-height: 1.35;
}

/* Internal divider when 2+ events fall on the same day */
.event-entry-divider {
    border: none;
    border-top: 1px dashed #e2e8f0;
    margin: 10px 0;
}

/* Colored Team Badge Tags */
.fixture-team-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 2px 8px;
    border-radius: 4px;
    margin-bottom: 4px;
}

/* 1st 16 (Blue Accent) */
.tag-fixture-1st {
    background-color: #e0f2fe;
    color: #0369a1;
    border: 1px solid #bae6fd;
}

/* 2nd 16 (Purple Accent) */
.tag-fixture-2nd {
    background-color: #f3e8ff;
    color: #6b21a8;
    border: 1px solid #e9d5ff;
}

/* Generic Fixture (Navy Accent) */
.tag-fixture-default {
    background-color: #f0f7ff;
    color: #0369a1;
    border: 1px solid #cbd5e1;
}

.events-empty {
    text-align: center;
    color: #64748b;
    font-style: italic;
    padding: 15px 0;
}

/* Responsive adjustments for mobile screens */
@media (max-width: 480px) {
    .upcoming-events-list {
        padding: 4px 14px;
    }
    .event-date-badge {
        min-width: 42px;
        height: 42px;
        margin-right: 12px;
    }
    .badge-day {
        font-size: 1.1rem;
    }
    .event-info-body h3 {
        font-size: 0.98rem;
    }
}
