/* General Styles */
body {
    font-family: Arial, sans-serif;
    background-color: #f4f4f9;
    margin: 0;
    padding: 0;
}

.container {
    background-color: #ffffff;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    max-width: 90%;
    width: 100%;
    text-align: center;
    margin: 20px auto; /* Center the container horizontally and add vertical spacing */
}

h1, h2 {
    color: #333;
}

/* Form Styles */
form {
    display: flex;
    flex-direction: column;
    align-items: stretch;
}

label {
    margin-top: 10px;
    color: #555;
    text-align: center;
}

input[type="email"],
input[type="text"],
input[type="date"],
input[type="time"],
input[type="color"],
textarea,
select {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box; /* Ensures padding is included in width */
}

textarea {
    resize: vertical;
}

button {
    margin-top: 20px;
    padding: 10px 15px;
    border: none;
    border-radius: 4px;
    background-color: #007BFF;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
}

button:hover {
    background-color: #0056b3;
}

/* Calendar Styles */
.calendar {
    width: 100%;
    border-collapse: collapse;
}

.calendar th, .calendar td {
    width: 14.28%;
    padding: 10px;
    border: 1px solid #ddd;
    vertical-align: top;
    text-align: left;
}

.calendar th {
    background-color: #f2f2f2;
    color: #333;
}

.calendar td {
    height: 100px;
    position: relative;
}

.calendar td div {
    margin-bottom: 5px;
}

.calendar .event {
    background-color: #007BFF;
    color: #fff;
    padding: 5px;
    border-radius: 4px;
    text-decoration: none;
    display: flex; /* Change from block to flex */
    justify-content: space-between; /* Align title and icon */
    align-items: center; /* Vertically align */
    margin-bottom: 5px;
    white-space: nowrap; /* Prevent text wrapping */
}

.calendar .event:hover {
    background-color: #0056b3;
}

.status-icon {
    margin-left: 10px;
    font-size: 1.2em;
}

/* Attendees Table Styles */
.attendees-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

.attendees-table th, .attendees-table td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

.attendees-table th {
    background-color: #f2f2f2;
    color: #333;
}

.attendees-table td {
    background-color: #ffffff;
}

.attendees-table tr:nth-child(even) {
    background-color: #f9f9f9;
}

/* Admin Links Styles */
.admin-links {
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.admin-links li {
    margin: 10px 0;
}

.admin-links a {
    display: block;
    padding: 10px;
    background-color: #f4f4f9;
    border-radius: 4px;
    color: #007BFF;
    text-decoration: none;
}

.admin-links a:hover {
    background-color: #007BFF;
    color: #fff;
}

/* Responsive Design */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }

    button {
        padding: 10px;
        font-size: 14px;
    }

    input[type="email"],
    input[type="text"],
    input[type="date"],
    input[type="time"],
    input[type="color"],
    textarea,
    select {
        padding: 8px;
    }
}

/* For calendar.php pagination */
.pagination {
    display: flex;
    justify-content: space-between;
    list-style: none;
    padding: 0;
    margin: 20px 0;
}

.pagination a {
    display: inline-block;
    padding: 10px 20px;
    background-color: #007BFF;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
}

.pagination a:hover {
    background-color: #0056b3;
}

div.container p.success-message {
    color: green !important;
    font-weight: bold !important;
    margin: 10px 0 !important;
}

.legend {
    position: absolute;
    top: 50px;
    right: 100px;
    text-align: left;
    background-color: #f9f9f9;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    font-size: 14px;
}

.legend p {
    margin: 0;
    display: flex;
    align-items: center;
}

.legend .status-icon {
    margin-right: 5px;
    font-size: 1.2em;
}

/* Upcoming event list on edit_event.php */
.upcoming-event-list {
    margin: 10px 0;
    text-align: center;
}

.upcoming-event-list div {
    padding: 16px 0;
}

.upcoming-event-list a {
    text-decoration: none;
    color: #007bff;
}

.upcoming-event-list a:hover {
    text-decoration: underline;
}

.upcoming-event-list div.selected a::before {
    content: "\2714\0020";
}

.upcoming-event-list div.selected a {
    font-weight: bold;
    color: #0056b3;
}
