/* styles.css */
/* Version: 2025-07-23-v1.34.55 */
/* Changes: Fixed hamburger menu not toggling on desktop by removing min-width: 769px default-open rule for #navMenu, ensuring #navMenu is closed by default (right: -250px) on all screens to match mobile behavior, preserved #navMenu.active for toggling, kept .menu-bar hidden, maintained all existing mobile and desktop styles, including .nav-menu, #hamburger, and touch/click handlers (v1.34.55); Extended hamburger menu (#hamburger) to all screen sizes by removing min-width: 769px display: none rule; hid .menu-bar on all screens with display: none; set #navMenu to open by default on desktop (min-width: 769px) with .active and right: 0; preserved all existing mobile and desktop styles, including .nav-menu, #hamburger, and touch/click handlers (v1.34.54); Added min-height: 100vh, overflow: auto, -webkit-overflow-scrolling: touch to body to prevent Safari address bar from appearing during scrolling in standalone mode on iOS for home.php (v1.34.53); Added text-align: center to .header to ensure header image is centered when narrower than 600px in home.php, gigs.php, and manage.php, reinforced .header img centering with display: block; margin: 0 auto; (v1.34.52); Moved .large-button and .button-container styles to global scope to fix button styling on large screens (>768px) for home.php, preserved mobile-specific tweaks in media queries (v1.34.51); Fixed .settings-dropdown white flicker on hover exit by setting background: #121818 and adding transition: background 0.2s ease, border-color 0.2s ease; kept .settings-dropdown styles to match .menu-bar a (color, font-size, padding, border, border-radius, height: 28px) for desktop; hid .settings-dropdown on mobile; kept #hamburger position (right: 15px), size (font-size: 2em, width/height: 36px), .nav-menu ul gap: 8px, padding-top: 60px, and #hamburger z-index: 3000 (v1.34.50) */
/* Previous Changes: Adjusted #hamburger to right: 15px (from 10px) in mobile view; kept font-size: 2em, width/height: 36px; added .settings-dropdown styles; adjusted .nav-menu ul gap to 8px, padding-top to 60px (v1.34.49); Adjusted #hamburger to right: 10px, font-size: 2em, width/height: 36px (v1.34.48); Increased .large-button padding to 12px 18px, font-size to 1.1em, margin to 12px 5px (v1.34.46); Increased .large-button padding to 10px 15px, font-size to 1em (v1.34.45); Updated .button-container margin to 25px 0 20px (v1.34.44); Increased .large-button padding to 8px 12px, font-size to 0.9em (v1.34.43); Added margin-bottom: 10px to .header img (v1.34.42); Added .header { padding: 0; margin: 0; } in mobile media queries (v1.34.41); Updated .header img in mobile media queries to max-width: 100%; width: 100% (v1.34.40); Updated main .header img to max-width: 600px, max-height: 600px (v1.34.39); Fixed .settings-toggle to match .menu-bar a, reverted #hamburger to v1.0.8 styling (v1.34.38); Updated #hamburger tap area (v1.34.37); Added .settings-toggle (v1.34.36); Updated .large-button, .button-container, .submenu (v1.34.35) */
/* Purpose: Styling for manage.php, manage_ics.php, home.php, menu.php, including side-pullout menu, forms, and buttons */

:root {
    /*--background-color: #1c2526;*/
    --background-color: #121818;
    --text-color: #ffffff;
    --input-bg: #333;
}

body.login-page {
    font-family: Arial, sans-serif;
    background-color: #000000;
    color: #ffffff;
    margin: 0;
    padding: 20px;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    height: 100vh !important;
    min-height: 100vh;
    flex-direction: column;
    box-sizing: border-box;
}

.login-container {
    background-color: #1c2526;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(212, 175, 55, 0.2);
    max-width: 400px !important;
    width: 100%;
    text-align: center;
    box-sizing: border-box;
}

body {
    font-family: Arial, sans-serif;
    background-color: #000000;
    margin: 0;
    padding: 20px;
    color: var(--text-color);
    min-height: 100vh;
    overflow: auto;
    -webkit-overflow-scrolling: touch;
}

.header {
    text-align: center;
    margin-bottom: 20px;
}

.header img {
    max-width: 600px;
    max-height: 600px;
    width: auto;
    height: auto;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
    margin-bottom: 10px;
}

h1 {
    color: var(--primary-color);
    font-size: 2em;
    margin: 0;
}

.login-container h1 {
    color: var(--primary-color);
    margin-bottom: 20px;
}

.subtext {
    color: var(--text-color);
    font-size: 1em;
    margin-top: 5px;
}

.form-container, .delete-section {
    max-width: 600px !important;
    margin: 0 auto;
    background-color: var(--background-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(212, 175, 55, 0.2);
    box-sizing: border-box;
}

.feed-container {
    max-width: 1200px !important;
    margin: 0 auto;
    background-color: var(--background-color);
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(212, 175, 55, 0.2);
    box-sizing: border-box;
    text-align: center;
}

.description {
    margin-bottom: 20px;
    padding: 10px;
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    background-color: #2a3233;
}

.description p {
    margin: 5px 0;
}

.description strong {
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    color: var(--primary-color);
}

input[type="text"],
input[type="password"],
select,
input[type="file"],
textarea {
    width: 100%;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    background-color: var(--input-bg);
    color: var(--text-color);
}

.login-container input[type="password"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    background-color: #333;
    color: #ffffff;
    box-sizing: border-box;
}

input[type="checkbox"] {
    width: auto;
    margin-right: 10px;
}

button {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: #000000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    margin: 8px 10px 8px 0;
}

.login-container button {
    padding: 10px 20px;
    background-color: var(--primary-color);
    color: #000000;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 1em;
    margin: 8px 0;
}

button:hover {
    background-color: var(--hover-color);
}

.login-container button:hover {
    background-color: var(--hover-color);
}

.delete-image-button,
.settings-button {
    padding: 6px 10px;
    font-size: 0.8em;
    background-color: var(--input-bg);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    margin: 8px 5px 8px 0;
}

.delete-image-button:hover,
.settings-button:hover {
    background-color: #555;
    border-color: var(--hover-color);
    color: var(--text-color);
}

.settings-button.active {
    background-color: var(--primary-color);
    color: #000000;
    border: 1px solid var(--hover-color);
}

.embed-textarea {
    width: 100%;
    height: 80px;
    padding: 8px;
    box-sizing: border-box;
    border: 1px solid var(--primary-color);
    border-radius: 5px;
    background-color: var(--input-bg);
    color: var(--text-color);
    resize: none;
}

.embed-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 10px;
}

.embed-toggle label {
    margin: 0;
    font-size: 0.9em;
}

.settings-section {
    max-width: 600px !important;
    margin: 20px auto 0;
    padding: 15px;
    background-color: #1a1e1e;
    border-radius: 8px;
}

.settings-section h3 {
    color: var(--primary-color);
    margin-bottom: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.settings-section h3::after {
    content: '▶';
    font-size: 1em;
    color: var(--primary-color);
}

#toggle-settings h3::after,
#toggle-availabilities-settings h3::after,
#toggle-account-settings h3::after {
    content: '▶';
    font-size: 1em;
    color: var(--primary-color);
}

#toggle-settings,
#toggle-availabilities-settings,
#toggle-account-settings {
    margin-bottom: 10px;
}

.settings-section .form-group {
    margin-bottom: 10px;
}

.feed-link {
    margin-top: 20px;
    text-align: center;
}

.feed-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9em;
    margin-right: 10px;
    white-space: nowrap;
    display: inline-block;
}

.feed-link a:hover {
    text-decoration: underline;
}

.feed-entries {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 5px;
    max-width: 1060px !important;
    margin-left: auto;
    margin-right: auto;
}

.feed-display {
    margin-top: 20px;
}

.feed-entries ul, .feed-display ul {
    list-style-type: none;
    padding: 0;
}

.feed-entries li, .feed-display li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    width: 100%;
    box-sizing: border-box;
}

.feed-entries img, .feed-display img {
    max-width: 30px;
    max-height: 30px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 3px;
    margin-right: 5px;
}

.feed-entries input[type="checkbox"], .feed-display input[type="checkbox"] {
    margin-right: 10px;
}

.feed-entry {
    background-color: #2a3233;
    border: 1px solid var(--primary-color);
    border-radius: 8px;
    padding: 8px;
    min-width: 280px !important;
    max-width: 340px !important;
    display: inline-flex;
    align-items: center;
    gap: 0px;
    transition: transform 0.2s;
    box-sizing: border-box;
}

.feed-entry:hover {
    transform: translateY(-5px);
}

.feed-entry img {
    max-width: 50px;
    max-height: 50px;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 5px;
    border: 1px solid var(--primary-color);
}

.feed-entry .entry-content {
    flex: 1;
}

.feed-entry p {
    margin: 2px 0;
    font-size: 0.85em;
    display: flex;
    align-items: flex-start;
}

.feed-entry p strong {
    color: var(--primary-color);
    min-width: 60px;
    flex-shrink: 0;
    text-align: right;
    margin-right: 8px;
}

.feed-entry p span {
    flex: 1;
    text-align: left;
}

.no-entries {
    text-align: center;
    color: var(--primary-color);
    font-size: 1.1em;
    margin-top: 20px;
}

.error {
    color: red;
    text-align: center;
    margin-top: 20px;
}

.login-container .error {
    color: red;
    margin-bottom: 10px;
}

.logout-link {
    text-align: center;
    margin-top: 20px;
}

.logout-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1em;
}

.logout-link a:hover {
    text-decoration: underline;
}

.footer {
    text-align: center;
    margin-top: 20px;
    padding: 10px 0;
    color: #ffffff;
    font-size: 0.729em;
}

.footer .rg {
    color: #ff0000;
}

.large-button {
    padding: 12px 18px;
    font-size: 1.1em;
    background-color: var(--input-bg);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    margin: 12px 5px;
    border-radius: 5px;
    text-decoration: none;
    display: block;
    text-align: center;
    min-width: 200px;
}

.large-button:hover {
    background-color: #555;
    border-color: var(--hover-color);
    color: var(--text-color);
}

.button-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 25px 0 20px;
}

@media (max-width: 768px) {
    body.login-page {
        padding: 10px;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        height: 100vh !important;
    }
    body {
        padding: 0 !important;
    }
    .header {
        padding: 0;
        margin: 0;
        text-align: center;
    }
    .header img {
        max-width: 100%;
        width: 100%;
        max-height: 600px;
        height: auto;
        border-radius: 8px;
        display: block;
        margin: 0 auto;
        margin-bottom: 10px;
    }
    h1 {
        font-size: 1.5em;
    }
    .login-container h1 {
        font-size: 1.5em;
    }
    .subtext {
        font-size: 0.9em;
    }
    .form-container, .feed-container, .delete-section, .settings-section {
        max-width: 100% !important;
        padding: 15px;
        box-sizing: border-box;
    }
    .feed-container {
        max-width: 100% !important;
    }
    .feed-entries {
        max-width: 100% !important;
        flex-direction: column;
        align-items: center;
        margin-top: 5px;
    }
    .description {
        padding: 8px;
    }
    .form-group {
        margin-bottom: 10px;
    }
    label {
        font-size: 0.9em;
    }
    input[type="text"],
    input[type="password"],
    select,
    input[type="file"],
    textarea {
        padding: 6px;
        font-size: 0.9em;
        width: 100%;
        box-sizing: border-box;
    }
    .login-container input[type="password"] {
        padding: 6px;
        font-size: 0.9em;
    }
    input[type="checkbox"] {
        padding: 0;
    }
    button {
        font-size: 0.9em;
        padding: 8px 15px;
        margin: 6px 10px 6px 0;
        width: auto;
        min-width: 120px;
    }
    .login-container button {
        padding: 8px 15px;
        font-size: 0.9em;
        margin: 6px 0;
    }
    .delete-image-button,
    .settings-button {
        padding: 5px 8px;
        font-size: 0.75em;
        margin: 6px 5px 6px 0;
    }
    .settings-section {
        padding: 10px;
    }
    .settings-section .form-group {
        margin-bottom: 8px;
    }
    .settings-section h3 {
        font-size: 1em;
    }
    .feed-link a {
        font-size: 0.85em;
        margin: 0 8px;
    }
    .feed-entries, .feed-display {
        width: 100%;
    }
    .feed-entries {
        flex-direction: column;
        align-items: center;
    }
    .feed-entries li, .feed-display li {
        padding: 8px 0;
        font-size: 0.9em;
        flex-direction: row;
        align-items: flex-start;
        width: 100%;
    }
    .feed-entries img, .feed-display img {
        max-width: 30px;
        max-height: 30px;
        width: auto;
        height: auto;
        object-fit: contain;
        border-radius: 3px;
        margin-right: 5px;
    }
    .feed-entry {
        max-width: 100% !important;
        min-width: 280px !important;
    }
    .feed-entry p {
        font-size: 0.8em;
    }
    .logout-link a {
        font-size: 0.9em;
    }
    .embed-toggle {
        flex-direction: column;
        align-items: flex-start;
    }
    .footer {
        font-size: 0.6885em;
        padding: 8px 0;
    }
    .settings-dropdown {
        display: none; /* Hide dropdown on mobile */
    }
    .nav-menu ul {
        gap: 8px; /* Tighter spacing for 5–7 buttons */
        padding-top: 60px; /* Reduced to fit buttons */
    }
    .nav-menu ul li:last-child a {
        margin-bottom: 15px; /* Consistent spacing for Logout */
    }
    #hamburger {
        right: 15px; /* Kept inward position */
        font-size: 2em; /* Kept larger size */
        width: 36px; /* Kept larger size */
        height: 36px; /* Kept larger size */
        min-width: 36px;
        min-height: 36px;
        line-height: 36px;
    }
    /* Make utility action buttons slimmer on mobile, overriding generic button min-width */
.delete-image-button,
.settings-button,
.copy-button,
.delete-button {
    min-width: unset !important;
    width: auto !important;
    padding: 4px 8px !important;
    font-size: 0.75em !important;
}

}

@media (max-width: 400px) {
    body.login-page {
        padding: 8px;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        height: 100vh !important;
    }
    body {
        padding: 0 !important;
    }
    .header {
        padding: 0;
        margin: 0;
        text-align: center;
    }
    .header img {
        max-width: 100%;
        width: 100%;
        max-height: 600px;
        height: auto;
        border-radius: 8px;
        display: block;
        margin: 0 auto;
        margin-bottom: 10px;
    }
    h1 {
        font-size: 1.3em;
    }
    .login-container h1 {
        font-size: 1.3em;
    }
    .subtext {
        font-size: 0.85em;
    }
    .form-container, .feed-container, .delete-section, .settings-section {
        max-width: 100% !important;
        padding: 10px;
    }
    .feed-container {
        max-width: 100% !important;
    }
    .feed-entries {
        max-width: 100% !important;
        margin-top: 5px;
    }
    .description {
        padding: 6px;
    }
    .form-group {
        margin-bottom: 8px;
    }
    .label {
        font-size: 0.85em;
    }
    input[type="text"],
    input[type="password"],
    select,
    input[type="file"],
    textarea {
        padding: 5px;
        font-size: 0.85em;
    }
    .login-container input[type="password"] {
        padding: 5px;
        font-size: 0.85em;
    }
    .feed-container {
        padding: 10px;
    }
    button {
        font-size: 0.85em;
        padding: 6px 12px;
        margin: 4px 8px 4px 0;
        min-width: 100px;
    }
    .login-container button {
        padding: 6px 12px;
        font-size: 0.85em;
        margin: 4px 0;
    }
    .delete-image-button,
    .settings-button {
        padding: 4px 6px;
        font-size: 0.7em;
        margin: 4px 4px 4px 0;
    }
    .settings-section {
        padding: 8px;
    }
    .settings-section h3 {
        font-size: 0.9em;
    }
    .feed-link a {
        font-size: 0.8em;
        margin: 0 6px;
    }
    .feed-entries li, .feed-display li {
        padding: 6px 0;
        font-size: 0.85em;
    }
    .feed-entries img, .feed-display img {
        max-width: 30px;
        max-height: 30px;
        width: auto;
        height: auto;
        object-fit: contain;
        border-radius: 3px;
        margin-right: 5px;
    }
    .feed-entry {
        max-width: 100% !important;
        min-width: 280px !important;
    }
    .feed-entry p {
        font-size: 0.75em;
    }
    .logout-link a {
        font-size: 0.85em;
    }
    .footer {
        font-size: 0.648em;
        padding: 6px 0;
    }
    .settings-dropdown {
        display: none; /* Hide dropdown on mobile */
    }
    .nav-menu ul {
        gap: 8px; /* Tighter spacing for 5–7 buttons */
        padding-top: 60px; /* Reduced to fit buttons */
    }
    .nav-menu ul li:last-child a {
        margin-bottom: 15px; /* Consistent spacing for Logout */
    }
    #hamburger {
        right: 15px; /* Kept inward position */
        font-size: 2em; /* Kept larger size */
        width: 36px; /* Kept larger size */
        height: 36px; /* Kept larger size */
        min-width: 36px;
        min-height: 36px;
        line-height: 36px;
    }
    /* Make utility action buttons slimmer on mobile, overriding generic button min-width */
.delete-image-button,
.settings-button,
.copy-button,
.delete-button {
    min-width: unset !important;
    width: auto !important;
    padding: 4px 8px !important;
    font-size: 0.75em !important;
}

}

/* Add from manage.php and manage_ics.php */
.settings-content {
    display: none;
}
.settings-content[style*="block"] {
    display: block;
}
.edit-button {
    padding: 8px 12px;
    font-size: 0.9em;
    background-color: var(--input-bg);
    border: 1px solid var(--primary-color);
    color: var(--primary-color);
    margin: 10px 0;
    border-radius: 5px;
    cursor: pointer;
}
.edit-button:disabled {
    background-color: #ccc;
    border-color: #999;
    color: #666;
    cursor: not-allowed;
}
.edit-button:hover:not(:disabled) {
    background-color: #555;
    border-color: var(--hover-color);
    color: var(--text-color);
}
.tag-description {
    font-size: 0.9em;
    color: #ffffff;
    margin-bottom: 10px;
}

/* Flatpickr dark mode for date and time pickers */
.flatpickr-calendar {
    background: #333333;
    color: var(--text-color);
    border: 1px solid var(--primary-color);
}
.flatpickr-innerContainer,
.flatpickr-rContainer,
.flatpickr-weekdays,
.flatpickr-days,
.flatpickr-month {
    background: #333333;
    color: var(--text-color);
}
.flatpickr-day {
    color: var(--text-color);
    background: #333333;
}
.flatpickr-day.selected,
.flatpickr-day.startRange,
.flatpickr-day.endRange {
    background: var(--primary-color);
    color: #ffffff;
    border-color: var(--primary-color);
}
.flatpickr-day.today {
    border-color: var(--primary-color);
}
.flatpickr-day:hover {
    background: var(--hover-color);
    color: #000;
}
.flatpickr-weekday {
    color: var(--text-color) !important;
}
.flatpickr-monthDropdown-months,
.flatpickr-current-month,
.flatpickr-current-month span.cur-month,
.flatpickr-current-month select {
    background: #333333;
    color: var(--text-color) !important;
}
.flatpickr-time {
    background: #333333;
    color: var(--text-color);
    border: 1px solid var(--primary-color);
}
.flatpickr-time input {
    background: #333333;
    color: var(--text-color);
    border: none;
}
.flatpickr-time .flatpickr-am-pm,
.flatpickr-time .flatpickr-time-separator {
    color: var(--text-color);
}

/* Menu Styles (Aligned with manage.php v1.27.105.39 and gigs.php v1.9) */
.menu-bar {
    display: none; /* Hide desktop menu bar on all screens */
}
.menu-bar a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9em;
    padding: 5px 10px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
}
.menu-bar a:hover {
    background: #2a3233;
    border-color: var(--hover-color);
}
.settings-dropdown {
    background: #121818; /* Match --background-color to prevent flicker */
    color: var(--primary-color);
    font-size: 0.9em;
    padding: 5px 10px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    cursor: pointer;
    height: 28px; /* Match .menu-bar a height */
    line-height: normal;
    transition: background 0.2s ease, border-color 0.2s ease; /* Smooth transition */
}
.settings-dropdown:focus, .settings-dropdown:hover {
    background: #2a3233;
    border-color: var(--hover-color);
}
#hamburger {
    display: block; /* Show hamburger on all screens */
    font-size: 1.75em;
    background: none;
    border: 0;
    color: var(--primary-color);
    cursor: pointer;
    position: fixed;
    top: 15px;
    right: 15px; /* Kept inward position */
    padding: 0;
    margin: 0;
    line-height: 36px;
    z-index: 3000; /* Kept to prevent overlap */
    pointer-events: auto;
    touch-action: manipulation;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    width: 36px; /* Kept larger size */
    height: 36px; /* Kept larger size */
    min-width: 36px;
    min-height: 36px;
    text-align: center;
    box-sizing: content-box;
    clip-path: inset(0 0 0 0);
    appearance: none;
    -webkit-appearance: none;
}
#hamburger::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
    z-index: -1;
    transition: background-color 0.2s ease;
    border-radius: 6px;
}
#hamburger:active::after {
    background: var(--background-color);
}
#hamburger:focus, #hamburger:active, #hamburger:focus-visible, #hamburger:hover, #hamburger:visited {
    outline: none;
}
@media (pointer: coarse) {
    #hamburger {
        pointer-events: auto;
        touch-action: manipulation;
        -webkit-user-select: none;
        -moz-user-select: none;
        -ms-user-select: none;
        user-select: none;
        outline: none;
    }
    #hamburger:focus, #hamburger:active, #hamburger:focus-visible {
        outline: none;
    }
}
@media (max-width: 768px) {
    .menu-bar {
        display: none;
    }
    #hamburger {
        display: block;
        font-size: 2em; /* Kept larger size */
        right: 15px; /* Kept inward position */
        width: 36px; /* Kept larger size */
        height: 36px; /* Kept larger size */
        min-width: 36px;
        min-height: 36px;
        line-height: 36px;
    }
    .settings-dropdown {
        display: none; /* Hide dropdown on mobile */
    }
    .nav-menu ul {
        gap: 8px; /* Tighter spacing for 5–7 buttons */
        padding-top: 60px; /* Reduced to fit buttons */
    }
    .nav-menu ul li:last-child a {
        margin-bottom: 15px; /* Consistent spacing for Logout */
    }
}
#navMenu {
    display: none; /* Hidden by default, shown via JS */
    position: fixed;
    top: 0;
    right: -250px;
    width: 250px;
    height: 100%;
    background: var(--background-color);
    border-left: 2px solid var(--primary-color);
    transition: right 0.3s ease-in-out;
    z-index: 1000;
}
@media (max-width: 768px) {
    #navMenu {
        display: block;
    }
}
#navMenu.active {
    display: block;
    right: 0;
}
#navMenu ul {
    list-style: none;
    padding: 20px;
    padding-top: 60px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
#navMenu ul li a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 1.2em;
    padding: 10px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    display: block;
    -webkit-tap-highlight-color: transparent;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
}
#navMenu ul li a:hover {
    background: #2a3233;
    border-color: var(--hover-color);
}

/* Settings Menu for menu.php v1.0.16 */
.settings-menu {
    position: relative;
    display: inline-block;
}
.settings-toggle {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9em;
    padding: 5px 10px;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    background: none;
    cursor: pointer;
}
@media (max-width: 768px) {
    .settings-toggle {
        font-size: 1.2em;
        padding: 10px;
    }
}
.settings-toggle:hover {
    background: #2a3233;
    border-color: var(--hover-color);
}
.settings-menu .submenu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: #2a3233;
    border: 1px solid var(--primary-color);
    border-radius: 4px;
    padding: 10px;
    min-width: 150px;
    z-index: 1000;
}
.settings-menu .submenu.active {
    display: block;
}
.submenu li {
    list-style: none;
    margin: 5px 0;
}
.submenu a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.85em;
    padding: 5px 10px;
    display: block;
}
.submenu a:hover {
    background: #333;
    border-color: var(--hover-color);
}
@media (max-width: 768px) {
    .settings-menu .submenu {
        position: static;
        background: #121818;
        border: none;
        padding: 0 20px 10px;
        margin-top: -10px;
    }
    .nav-menu ul li {
        margin-bottom: 5px;
    }
    .submenu li {
        margin: 0;
    }
    .nav-menu ul li:last-child a {
        margin-bottom: 15px;
    }
}

/* iCal Toggle Styles (Restored from manage.php v1.27.105.38) */
.mode-toggle-container {
    position: absolute;
    right: 0px;
    top: 50%;
    transform: translateY(-50%);
}
.mode-toggle {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin-right: 2px;
}
.mode-toggle label {
    color: #ffffff;
    font-size: 0.9em;
    margin: 0;
}
.mode-toggle input[type="checkbox"] {
    appearance: none;
    width: 36px;
    height: 18px;
    background: #555;
    border-radius: 9px;
    position: relative;
    cursor: pointer;
    transition: background-color 0.3s ease;
}
.mode-toggle input[type="checkbox"]:checked {
    background: var(--primary-color) !important;
}
.mode-toggle input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 14px;
    height: 14px;
    background: #fff;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.3s ease;
}
.mode-toggle input[type="checkbox"]:checked::before {
    transform: translateX(18px);
}

/* Force rounded corners for all settings buttons */
.settings-button {
    border-radius: 5px !important;
}
