/* Calendar styles */
.calendar-day {
    min-height: 120px;
    border: 1px solid #ddd;
}
.calendar-day-np {
    background: #f5f5f5;
}
.day-number {
    font-weight: bold;
    margin-bottom: 5px;
}
.game-entry {
    margin-bottom: 5px;
    padding: 5px;
    border-radius: 4px;
    font-size: 0.85rem;
}
.game-time {
    font-weight: bold;
}
.game-location {
    font-style: italic;
}
.today {
    background-color: #fffacd;
}

/* Custom team colors - defined dynamically in PHP */

/* Responsive adjustments */
@media (max-width: 767px) {
    .calendar-day {
	min-height: 80px;
    }
    .game-entry {
	font-size: 0.75rem;
    }
}

/* Print styles */
@media print {
    .no-print {
        display: none !important;
    }

    .list-game-card {
        page-break-inside: avoid;
    }

    .list-date-group {
        page-break-before: auto;
        page-break-after: auto;
        page-break-inside: avoid;
    }

    .calendar-day {
        min-height: auto;
        page-break-inside: avoid;
    }

    .game-entry {
        break-inside: avoid;
    }

    body {
        font-size: 0.9rem;
    }

    .container {
        max-width: 100%;
    }
}

@media (max-width: 767px) {
  .calendar-day {
    min-height: 80px;
  }
  .game-entry {
    font-size: 0.75rem;
    padding: 3px;
  }
}

/* List View Styles */
.list-view {
    margin-top: 20px;
}

.list-date-header {
    padding: 10px 15px;
    background-color: #f8f9fa;
    border-left: 5px solid #6c757d;
    margin-bottom: 15px;
    border-radius: 4px;
}

.today-list .list-date-header {
    background-color: #fff8e1;
    border-left-color: #ffc107;
}

.list-game-card {
    border: none;
    border-radius: 6px;
    transition: transform 0.2s;
}

.list-game-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Make cards readable with any background */
.list-game-card .card-body {
    background-color: rgba(255, 255, 255, 0.7);
    border-radius: inherit;
}

/* Fix buttons for view toggle */
.btn-group .btn.active {
    background-color: #6c757d;
    color: white;
    border-color: #6c757d;
}

/* Make weekday columns equal width */
.calendar-table th:nth-child(2),
.calendar-table th:nth-child(3),
.calendar-table th:nth-child(4),
.calendar-table th:nth-child(5),
.calendar-table th:nth-child(6),
.calendar-table td:nth-child(2),
.calendar-table td:nth-child(3),
.calendar-table td:nth-child(4),
.calendar-table td:nth-child(5),
.calendar-table td:nth-child(6) {
    width: 18%; /* 5 weekdays at 18% each = 90% total */
}

/* Weekend columns share remaining space */
.calendar-table th:nth-child(1),
.calendar-table th:nth-child(7),
.calendar-table td:nth-child(1),
.calendar-table td:nth-child(7) {
    width: 5%; /* 2 weekend days at 5% each = 10% total */
}

/* Base min-height for all devices */
.calendar-day {
    min-height: 100px;
    position: relative;
}

/* Empty day minimum height */
.calendar-day:empty::after {
    content: "";
    display: block;
    min-height: 100px;
}

/* Increase min-height specifically for mobile devices */
@media (max-width: 768px) {
    .calendar-day {
        min-height: 150px;
    }

    .calendar-day:empty::after {
        min-height: 150px;
    }
}

/* Directions link styling */
.directions-link {
    display: inline-block;
    margin-left: 5px;
    color: #007bff;  /* Bootstrap's primary blue */
    text-decoration: none;
    font-size: 0.8rem;  /* Smaller text */
}

.directions-link:hover, .directions-link:focus {
    color: #0056b3;  /* Darker blue on hover */
    text-decoration: underline;
}

/* Ensure it's still tappable on mobile */
@media (max-width: 768px) {
    .directions-link {
        padding: 2px 4px;
        font-size: 0.85rem;  /* Slightly larger on mobile for better tapping */
    }
}

/* Hide directions links when printing */
@media print {
    .directions-link {
        display: none !important;
    }

    /* Make game entries a bit more compact for print */
    .game-entry {
        padding: 5px !important;
        margin-bottom: 5px !important;
    }

    /* Ensure the calendar table uses all available space */
    .calendar-table {
        width: 100% !important;
    }

    /* Improve day spacing for print */
    .calendar-day {
        padding: 3px !important;
    }
}

/* Additional, stronger rule for print media */
@media print {
    a.directions-link, .directions-link, a.no-print, .no-print {
        display: none !important;
    }

    /* Ensure no link displays during print */
    .game-location a {
        display: none !important;
    }
}
