
body {
	font-family: Arial, sans-serif;
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}
h1, h2, h3 {
	color: #333;
}

/* Main container */
.container {
    display: block; /* Change to block instead of flex */
    width: 100%;
}

/* Calendar section */
.calendar {
    width: 100%;
    display: block;
    margin-bottom: 20px; /* Add space between calendar and controls */
}

/* Controls section */
.controls {
    width: 100%;
    display: block;
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
}
/*.container {
	display: flex;
	flex-direction: colum;
	gap: 20px;
}
.calendar {
	width: 100%;
    min-width: unset; /* Remove min-width restriction */
/*}
.controls {
    width: 100%;
    min-width: unset;
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
}*/
/* Center the sign-up form elements at the top */
.controls h3,
.controls p:first-of-type,
.controls label[for="name-select"],
.controls #name-select,
.controls #sign-up-btn,
.controls #lock-btn,
.controls .locked-message {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
    max-width: 400px;
}
.header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}
.calendar-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 5px;
}
.day-header {
	text-align: center;
	font-weight: bold;
	padding: 10px;
	background: #eee;
}
.day {
	border: 1px solid #ddd;
	min-height: 100px;
	padding: 5px;
	background: white;
	position: relative;
}
.day.other-month {
	background: #f5f5f5;
	color: #999;
}
.day.blocked {
	background: #ffebee;
}
.day-number {
	font-weight: bold;
	margin-bottom: 5px;
}

/* Enhanced highlight for selected day with !important to override other styles */
.day.selected {
    background-color: #d4edff !important; /* Slightly darker blue */
    border: 3px solid #0b7dda !important; /* Thicker, darker blue border */
    box-shadow: 0 0 8px rgba(11, 125, 218, 0.5) !important; /* More pronounced shadow */
    position: relative; /* Ensure positioning context for the highlight indicator */
    z-index: 1; /* Make sure it appears above other elements */
}

/* Add a highlight indicator in the corner */
.day.selected::after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 0 20px 20px 0;
    border-color: transparent #0b7dda transparent transparent; /* Creates a triangle */
}

/* Admin view highlight - distinct color scheme */
#admin-calendar-grid .day.selected {
    background-color: #ffe0b2 !important; /* Slightly darker orange */
    border: 3px solid #ef6c00 !important; /* Thicker, darker orange border */
    box-shadow: 0 0 8px rgba(239, 108, 0, 0.5) !important; /* More pronounced shadow */
}

/* Admin view highlight indicator */
#admin-calendar-grid .day.selected::after {
    border-color: transparent #ef6c00 transparent transparent;
}

/* Ensure the selected style takes precedence over other styling */
.day.selected.has-event,
.day.selected.event-full,
.day.selected.blocked,
.day.selected.other-month {
    background-color: #d4edff !important; /* Keep the selected blue background */
    border: 3px solid #0b7dda !important; /* Keep the selected blue border */
}

#admin-calendar-grid .day.selected.has-event,
#admin-calendar-grid .day.selected.event-full,
#admin-calendar-grid .day.selected.blocked,
#admin-calendar-grid .day.selected.other-month {
    background-color: #ffe0b2 !important; /* Keep the selected orange background */
    border: 3px solid #ef6c00 !important; /* Keep the selected orange border */
}

/* For the admin view */
#admin-calendar-grid .day.selected {
    background-color: #fff0e0;
    border: 2px solid #FF9800;
    box-shadow: 0 0 5px rgba(255, 152, 0, 0.3);
}
.appointment {
	background: #e3f2fd;
	border-radius: 4px;
	padding: 5px;
	margin-top: 5px;
	font-size: 12px;
	position: relative;
}
.appointment.locked {
	background: #c8e6c9;
	border-left: 3px solid #43a047;
}
.blocked-indicator {
	position: absolute;
	top: 5px;
	right: 5px;
	background: #f44336;
	color: white;
	border-radius: 50%;
	width: 20px;
	height: 20px;
	line-height: 20px;
	text-align: center;
	font-size: 12px;
	font-weight: bold;
}
select, button, input {
	width: 100%;
	padding: 8px;
	margin-bottom: 10px;
	border-radius: 4px;
	border: 1px solid #ddd;
}
button {
	background: #4caf50;
	color: white;
	border: none;
	cursor: pointer;
}
button:hover {
	background: #43a047;
}
button.secondary {
	background: #2196f3;
}
button.secondary:hover {
	background: #1976d2;
}
button.danger {
	background: #f44336;
}
button.danger:hover {
	background: #d32f2f;
}
.month-nav {
	display: flex;
	align-items: center;
	gap: 10px;
}
.month-nav button {
	width: auto;
	padding: 5px 10px;
}
.locked-message {
	display: none;
	color: red;
	margin-top: 10px;
}
.tabs {
	display: flex;
	margin-bottom: 20px;
	border-bottom: 1px solid #ddd;
}
.tab {
	padding: 10px 20px;
	cursor: pointer;
	background: #f5f5f5;
	border: 1px solid #ddd;
	border-bottom: none;
	margin-right: 5px;
	border-radius: 4px 4px 0 0;
}
.tab.active {
	background: white;
	border-bottom: 1px solid white;
	margin-bottom: -1px;
	font-weight: bold;
}
.tab-content {
	display: none;
}
.tab-content.active {
	display: block;
}
.admin-section {
	margin-top: 20px;
	padding: 20px;
	background: #f9f9f9;
	border-radius: 8px;
	border: 1px solid #ddd;
}
.appointments-list {
	margin-top: 10px;
}
.appointment-item {
	background: white;
	padding: 10px;
	margin-bottom: 5px;
	border-radius: 4px;
	border: 1px solid #ddd;
	display: flex;
	justify-content: space-between;
	align-items: center;
}
.appointment-item.locked {
	border-left: 4px solid #43a047;
}
.password-overlay {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	justify-content: center;
	align-items: center;
	z-index: 100;
}
.password-modal {
	background: white;
	padding: 20px;
	border-radius: 8px;
	max-width: 400px;
	width: 100%;
}
.event {
	background: #FF5722;
	border-radius: 4px;
	padding: 5px;
	margin-top: 5px;
	font-size: 12px;
	color: white;
	border-left: 3px solid #D84315;
}
.user-management {
    margin-top: 20px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.user-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.user-table th, .user-table td {
    padding: 8px;
    border: 1px solid #ddd;
    text-align: left;
}

.user-table th {
    background-color: #f2f2f2;
    font-weight: bold;
}

.user-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

.user-table tr:hover {
    background-color: #f1f1f1;
}

.user-form {
    margin-top: 15px;
    background: white;
    padding: 15px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.user-form label {
    display: block;
    margin-top: 10px;
}

.user-form-actions {
    margin-top: 15px;
    display: flex;
    justify-content: space-between;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

.user-actions button {
    width: auto;
    padding: 5px 10px;
}

.admin-badge {
    background-color: #ff9800;
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
    margin-left: 5px;
}

.user-search {
    margin-bottom: 15px;
    display: flex;
    gap: 10px;
}

.user-search input {
    flex: 1;
}

.user-search button {
    width: auto;
}

.tab-navigation {
    margin-bottom: 20px;
}

.certification-level-select {
    width: 100%;
    padding: 8px;
    margin-top: 5px;
    border-radius: 4px;
    border: 1px solid #ddd;
}

.event-details {
    display: flex;
    flex-wrap: nowrap; /* Prevent wrapping */
    padding: 15px;
    margin-top: 30px;
    background: #fff;
    border-radius: 8px;
    border: 1px solid #ddd;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.event-details h2 {
    margin-top: 0;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}

/* Event title spans the full width */
#event-title-display {
     width: 100%;
    text-align: center;
    margin-top: 0;
    margin-bottom: 15px;
}

/* Event content container (everything except the image) */
.event-content {
  flex: 1;
    min-width: 0; /* Allow content to shrink if needed */
    padding-right: 20px; /* Add some space between content and image */
}

/* Image container */
#event-image-container {
    flex: 0 0 300px; /* Fixed width, don't grow or shrink */
    width: 300px;
    max-width: 300px;
    align-self: flex-start; /* Align to top */
}

#event-image-container img {
     width: 100%;
    height: auto;
    border-radius: 8px;
    display: block;
}

/* Event details layout */
.event-meta,
.event-description,
.event-notes-container,
.signup-section,
.signup-list-container {
    width: 100%;
    margin-bottom: 15px;
}

/* Capacity section */
#event-capacity-container {
    margin-bottom: 15px;
}

/* Signup buttons */
#event-signup-btn,
#event-cancel-signup-btn {
    max-width: 200px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .event-details {
        flex-direction: column;
    }
	.event-content {
        padding-right: 0;
    }
    #event-image-container {
        margin-top: 20px;
        width: 100%;
        max-width: 100%;
    }
}
.event-meta {
    margin-bottom: 15px;
    color: #666;
}

.event-meta span {
    display: inline-block;
    margin-right: 15px;
}

.event-meta .material-icon {
    font-size: 16px;
    vertical-align: middle;
    margin-right: 5px;
}

.event-description {
    margin-bottom: 20px;
    line-height: 1.5;
}

.event-notes {
    background: #f9f9f9;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    border-left: 3px solid #2196F3;
}

.signup-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.signup-list {
    margin-top: 15px;
}

.signup-list h4 {
    margin-bottom: 10px;
}

.signup-user {
    background: #f5f5f5;
    padding: 8px 12px;
    margin-bottom: 5px;
    border-radius: 4px;
    display: flex;
    justify-content: space-between;
}

.capacity-indicator {
    margin-top: 10px;
    height: 10px;
    background: #e0e0e0;
    border-radius: 5px;
    overflow: hidden;
}

.capacity-fill {
    height: 100%;
    background: #4CAF50;
    border-radius: 5px;
}

.capacity-fill.near-full {
    background: #FFC107;
}

.capacity-fill.full {
    background: #F44336;
}

.capacity-text {
    font-size: 12px;
    color: #666;
    margin-top: 5px;
    text-align: right;
}

/* Admin event form styles */
.event-form {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border: 1px solid #ddd;
    margin-top: 20px;
}

.event-date-row {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
    align-items: center;
    padding: 10px;
    background: #f9f9f9;
    border-radius: 4px;
}

.event-date-row input, .event-date-row select {
    margin-bottom: 0;
}

.event-date-actions {
    display: flex;
    gap: 5px;
}

.date-controls {
    flex: 3;
    display: flex;
    gap: 10px;
}

.time-controls {
    flex: 4;
    display: flex;
    gap: 10px;
}

.add-date-btn {
    margin-top: 10px;
}

.btn-icon {
    width: 30px !important;
    height: 30px;
    padding: 0 !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
}

.event-form-section {
    margin-bottom: 20px;
}

.event-form-section h4 {
    margin-bottom: 10px;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

/* Calendar day with event styling */
.day.has-event {
    background: #e8f5e9;
    border-color: #81c784;
}

.day.has-event.event-full {
    background: #ffebee;
    border-color: #e57373;
}

.day.has-event .day-number::after {
    content: '•';
    color: #4CAF50;
    margin-left: 5px;
    font-size: 20px;
    line-height: 0;
    position: relative;
    top: 3px;
}

.day.has-event.event-full .day-number::after {
    color: #F44336;
}

.no-events-message {
    padding: 20px;
    text-align: center;
    background: #f5f5f5;
    border-radius: 8px;
    margin-top: 20px;
    color: #666;
}