/* General styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    background: #e0f7fa;
    color: #013a63;
}

header {
    background: #0288d1;
    color: #fff;
    padding: 1rem;
    text-align: center;
}

header nav {
    margin-top: 1rem;
}

header button {
    margin: 0 0.5rem;
    padding: 0.5rem 1rem;
    border: none;
    background: #01579b;
    color: #fff;
    border-radius: 4px;
    cursor: pointer;
}

header button:hover,
header button.active {
    background: #012f56;
}

main {
    padding: 1rem;
}

.view {
    margin-top: 1rem;
}

.hidden {
    display: none;
}

/* Wheel styles */
.wheel {
    position: relative;
    /* Make wheel responsive: width/height adapt to viewport but remain square */
    width: 80vw;
    height: 80vw;
    max-width: 600px;
    max-height: 600px;
    margin: 0 auto;
    border-radius: 50%;
    /* Use a very soft gradient to keep focus on the ring segments */
    background: radial-gradient(circle, #e0f7fa 0%, #b2ebf2 70%, #e1f5fe 100%);
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}


/* Wheel canvas styling */
#wheelCanvas {
    width: 100%;
    height: 100%;
    display: block;
    border-radius: 50%;
}

/* Tooltip for wheel slices */
#wheelTooltip {
    position: absolute;
    pointer-events: none;
    background: rgba(255, 255, 255, 0.95);
    color: #01579b;
    padding: 0.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    font-size: 0.75rem;
    max-width: 220px;
    z-index: 100;
    display: none;
}

/* List view */
#listEvents {
    list-style: none;
    padding: 0;
}

#listEvents li {
    background: #ffffff;
    margin: 0.5rem 0;
    padding: 0.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* Calendar view */
#calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-top: 1rem;
}

.calendar-cell {
    background: #ffffff;
    border: 1px solid #b3e5fc;
    border-radius: 4px;
    padding: 0.25rem;
    min-height: 80px;
    position: relative;
    overflow: hidden;
}

.calendar-cell span.date {
    font-weight: bold;
    color: #01579b;
}

.calendar-cell ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.calendar-cell li {
    font-size: 0.75rem;
    margin-bottom: 0.2rem;
    word-wrap: break-word;
}

/* Admin section */
.admin-section {
    margin-bottom: 1.5rem;
    background: #fff;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.admin-section h3 {
    margin-top: 0;
}

#userList li,
#adminEventList li {
    margin: 0.5rem 0;
    background: #f1f8e9;
    padding: 0.5rem;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

#userList button,
#adminEventList button {
    margin-left: 0.5rem;
    border: none;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    background: #ff7043;
    color: #fff;
    cursor: pointer;
}

#userList button:hover,
#adminEventList button:hover {
    background: #e64a19;
}

/* Footer */
footer {
    text-align: center;
    padding: 1rem 0;
    background: #0288d1;
    color: #fff;
}

footer a {
    color: #fff;
    text-decoration: underline;
}

/* === Additional styles for filters, info boxes and DD tables === */

/* Info box for click details */
.info-box {
    /* Fixed positioning so coordinates are relative to the viewport. */
    position: fixed;
    background: rgba(255, 255, 255, 0.95);
    color: #01579b;
    padding: 0.5rem;
    border-radius: 4px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3);
    font-size: 0.75rem;
    max-width: 260px;
    z-index: 200;
    /* Hidden by default via .hidden class; do not set display here */
}

.info-box.hidden {
    display: none;
}

/* Controls wrapper for filters above the wheel */
.controls {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.controls label {
    font-weight: bold;
}

#eventFilter {
    padding: 0.25rem;
    border-radius: 4px;
    border: 1px solid #b3e5fc;
}

/* DD filters and tables */
.dd-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.dd-filters input,
.dd-filters select,
.dd-filters button {
    padding: 0.25rem 0.5rem;
    border: 1px solid #b3e5fc;
    border-radius: 4px;
    font-size: 0.9rem;
}

.dd-filters button {
    background: #01579b;
    color: #fff;
    cursor: pointer;
}

.dd-filters button:hover {
    background: #013a63;
}

.dd-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem;
    margin-bottom: 1rem;
}

.dd-table th,
.dd-table td {
    border: 1px solid #b3e5fc;
    padding: 0.25rem 0.4rem;
    text-align: left;
}

.dd-table thead {
    background: #0288d1;
    color: #fff;
}

.dd-table tbody tr:nth-child(odd) {
    background: #e0f7fa;
}