/* General styles */
body {
    background-color: #121212;
    color: #e0e0e0;
    font-family: Arial, sans-serif;
}

h1 {
    color: #ffffff;
    font-size: 3em;
    margin: 0;
    padding: 0;
    text-align: center;
}

h2 {
    color: #ffffff;
    margin: 5px;
}

/* Form styles */
form,
.filter-form {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    background-color: #1e1e1e;
    padding: 15px;
    border-radius: 8px;
    gap: 5px;
}

/* Timeline selection and menu styles */
.timeline-selection {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    position: absolute;
    /* Position it absolutely and lower */
    top: 45px;
    left: 0;
    right: 0;
    z-index: 10;
    margin: 15px 0;
    padding: 10px;
}

.timeline-badge {
    display: inline-flex;
    align-items: center;
    background-color: rgba(50, 50, 50, 1);
    color: #000;
    border-radius: 50px;
    padding: 0px 2px 0px 10px;
    font-size: 0.9em;
    cursor: default;
    position: relative;
}

.timeline-badge:first-of-type {
    padding: 0 6px;
}

.timeline-badge .remove-timeline {
    margin-left: 10px;
    background-color: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8em;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.timeline-badge .remove-timeline:hover {
    background-color: #cc0000;
    /* Darker red on hover */
}

.timeline-badge:first-child .timeline-menu {
    margin-left: 0;
    padding: 4px;
}

.timeline-badge:first-child .menu-content {
    left: 0;
}

/* Timeline menu styles */
.timeline-menu {
    position: relative;
    display: inline-block;
    margin-left: 5px;
    cursor: pointer;
    padding: 8px;
    /* Larger clickable area */
}

.timeline-menu i {
    position: relative;
    z-index: 2;
    font-size: 1.1em;
    /* Slightly larger icon */
}

.menu-content {
    display: none;
    position: absolute;
    background-color: rgba(100, 100, 100, 1);
    min-width: 120px;
    box-shadow: 0px 8px 16px 0px rgba(0, 0, 0, 0.2);
    z-index: 100;
    border-radius: 4px;
    padding: 5px 0;
    left: -70px;
    top: 100%;
    /* Position below the menu icon */
    margin-top: 6px;
    /* Add small gap */
}

/* Extended click/hover zone */
.menu-content::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 0;
    right: 0;
    height: 10px;
}

/* Keep hover display and add active state */
.timeline-menu:hover .menu-content,
.menu-content.menu-active {
    display: block;
}

.menu-item {
    padding: 5px 5px;
    display: flex;
    align-items: center;
    gap: 6px;
    color: #e0e0e0;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.menu-item:hover {
    background-color: #3c3c3c;
}

.current-group-name {
    color: #e0e0e0;
    margin: 8px 2px 0 3px;
    font-size: 0.9em;
    font-style: italic;
}

.color-picker {
    display: none;
}

/* Define timeline colors */
:root {
    --timeline-color-1: #36a2eb;
    --timeline-color-2: #ff6384;
    --timeline-color-3: #4bc0c0;
    --timeline-color-4: #ffce56;
    --timeline-color-5: #9966ff;
    --timeline-color-6: #ff9f40;
    --timeline-color-7: #c9cbcf;
    --timeline-color-8: #ffcd56;
    --timeline-color-9: #36eb9f;
    --timeline-color-10: #8463ff;
    --timeline-color-11: #c04bc0;
    --timeline-color-12: #56ceff;
    --timeline-color-13: #ff9966;
    --timeline-color-14: #409fff;
    --timeline-color-15: #cfcbcf;
    --timeline-color-16: #56ffcd;
    --timeline-color-17: #a236eb;
    --timeline-color-18: #ff8463;
    --timeline-color-19: #c0c04b;
    --timeline-color-20: #ce56ff;
    --timeline-color-21: #66ff99;
    --timeline-color-22: #9f40ff;
    --timeline-color-23: #cbcfcb;
    --timeline-color-24: #cd56ff;
    --timeline-color-25: #eba236;
    --timeline-color-26: #63ff84;
}

/* Chart container styles */
.chart-container {
    position: relative;
    max-height: 400px;
    /* Set maximum height */
    margin: 0 0 10px 0;
    padding-top: 0;
    display: flex;
    /* Ensure the container adapts to content */
    align-items: center;
    justify-content: center;
}

canvas#timelineChart {
    width: 100%;
    /* Ensure the chart takes full width */
    height: auto;
    /* Allow height to adapt dynamically */
    max-height: 500px;
    /* Set maximum height for the chart */
}

.filterForm {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center;
    padding-top: 2em;
    margin-bottom: 1em;
    background-color: #0000;
}

.filterForm-elemt {
    flex: 1;
    margin: 0 5px;
    padding: 0;
    min-width: 100px;
}

.filterForm-elemt-short {
    flex: none;
    max-width: 140px;
    margin: 0 5px;
    padding: 0;
}

#date_slider {
    width: auto;
    flex: 1;
    min-width: 200px;
    max-width: 500px;
}

.noUi-connect {
    background: #6e588e;
}

.noUi-target {
    background: #1a003d;
    box-shadow: none;
    border: 1px solid #d3d3d399;
}

.noUi-horizontal {
    height: 10px;
}

.noUi-handle {
    background: #1a003d;
    /* Change handle color */
    width: 10px;
    /* Adjust handle width */
    height: 15px;
    /* Adjust handle height */
    box-shadow: none;
    /* Add a shadow for better visibility */
    cursor: grab;
    /* Change cursor to grab */
}

.noUi-handle:hover {
    background: #6e588e;
    /* Change handle color on hover */
    cursor: grabbing;
    /* Change cursor to grabbing */
}

.noUi-tooltip {
    font-size: 0.8em;
}

/* Align and move the "Filtrer" submit button up 5px in the filter form */
.filterForm-elemt:last-child {
    align-self: flex-end;
    transform: translateY(-5px);
}

.dropdown-adapt {
    width: auto;
    max-width: 150px;
    min-width: 100px;
    display: inline-block;
    white-space: nowrap;
    padding-left: 2em;
}

.filterForm-elemt-button {
    vertical-align: middle;
    width: 40px;
    flex: 0 0 auto;
}

#timeline-table h2 {
    margin: 0.8em 0 0.5em 0;
    padding: 0;
    font-size: 1.2em;
    color: #ffffff;
}

.event-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 12px;
    /* Smaller text size */
}

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

.event-table th {
    background-color: #333;
    color: #ffffff;
}

.event-table td {
    background-color: #1e1e1e;
}

.event-table .date-column {
    width: 100px;
    /* Fixed width for date columns */
}

/* Consistent column widths for timeline tables */
.event-table .col-title {
    width: 180px;
    min-width: 120px;
    max-width: 240px;
    word-break: break-word;
}

.event-table .col-description {
    width: 320px;
    min-width: 160px;
    max-width: 480px;
    word-break: break-word;
}

.event-table .col-date {
    width: 110px;
    min-width: 90px;
    max-width: 140px;
    white-space: nowrap;
}

.event-table .col-location {
    width: 140px;
    min-width: 100px;
    max-width: 200px;
    word-break: break-word;
}

/* Responsive: shrink columns on small screens */
@media (max-width: 900px) {
    .event-table .col-title {
        width: 100px;
        max-width: 140px;
    }

    .event-table .col-description {
        width: 160px;
        max-width: 220px;
    }

    .event-table .col-date {
        width: 70px;
        max-width: 90px;
    }

    .event-table .col-location {
        width: 80px;
        max-width: 120px;
    }
}

/* Compact table form styles */
.eventsTable-form {
    padding: 5px;
    margin-bottom: 5px;
}

.eventsTable-form table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 5px;
}

.eventsTable-form th,
.eventsTable-form td {
    padding: 2px;
    border: 1px solid #333;
    /* border: none; */
}

.eventsTable-form th {
    background-color: #5f5f5f;
    color: #ffffff;
    text-align: left;
    padding-left: 4px;
}

.eventsTable-form td {
    background-color: #5f5f5f;
}

.eventsTable-form input[type="text"],
.eventsTable-form input[type="date"] {
    width: 100%;
    padding: 1px;
    margin: 0;
    background-color: #5f5f5f;
    /* border: 1px solid #444; */
    border: none;
    border-radius: 0;
    color: #e0e0e0;
}

.eventsTable-form select {
    width: 100%;
    padding: 1px;
    margin: 0;
    background-color: #5f5f5f;
    /* border: 1px solid #444; */
    border: none;
    color: #e0e0e0;
}

.eventsTable-form .button-container {
    text-align: right;
    margin-top: 10px;
}

.eventsTable-form .button-container button {
    margin-left: 10px;
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.eventsTable-form .button-container .save-btn {
    background-color: #00e974;
    color: white;
}

.eventsTable-form .button-container .cancel-btn {
    background-color: #ff4444;
    color: white;
}

/* Remove row button for eventsTable-form */
.remove-row-btn {
    background: none;
    border: none;
    color: #ff4444;
    font-size: 0.95em;
    cursor: pointer;
    padding: 0 2px;
    border-radius: 3px;
    transition: background 0.2s;
    vertical-align: middle;
    line-height: 1;
    height: 18px;
    width: 18px;
    min-width: 18px;
    min-height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.remove-row-btn:hover {
    background: #333;
    color: #fff;
}

/* .eventsTable-form td:last-child,
.eventsTable-form th:last-child {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    min-width: 20px;
} */

/* Form group styles */
.form-group {
    flex: 1;
    margin: 0 5px;
    padding: 0;
    min-width: 100px;
}

.form-group-short {
    flex: none;
    max-width: 140px;
    margin: 0 5px;
    padding: 0;
}

label {
    display: block;
    margin-bottom: 5px;
    color: #b0b0b0;
}

.greytext {
    color: #b0b0b0;
}

input[type="text"],
input[type="date"],
input[type="number"],
select,
textarea {
    /* width: 100%; */
    padding: 8px;
    margin: 5px 0;
    border: 1px solid #333;
    border-radius: 4px;
    background-color: #505050;
    color: #e0e0e0;
}

input[type="date"] {
    max-width: 120px;
    /* reduced width for date inputs */
}

select[multiple] {
    height: auto;
    min-height: 100px;
}

input[type="submit"] {
    background-color: #00e974;
    color: #ffffff;
    border: none;
    padding: 5px 5px;
    border-radius: 4px;
    cursor: pointer;
    flex: 0 0 auto;
}

input[type="submit"]:hover {
    background-color: #3700b3;
}

/* Remove autofill styling for all inputs in manage_events */
input:-webkit-autofill,
input:-webkit-autofill:focus,
input:-webkit-autofill:hover,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px #505050 inset !important;
    box-shadow: 0 0 0 1000px #505050 inset !important;
    -webkit-text-fill-color: #e0e0e0 !important;
    caret-color: #e0e0e0 !important;
    transition: background-color 9999s ease-in-out 0s;
}

/* Remove autofill styling for textarea and select as well */
textarea:-webkit-autofill,
select:-webkit-autofill {
    -webkit-box-shadow: 0 0 0 1000px #505050 inset !important;
    box-shadow: 0 0 0 1000px #505050 inset !important;
    -webkit-text-fill-color: #e0e0e0 !important;
    caret-color: #e0e0e0 !important;
    transition: background-color 9999s ease-in-out 0s;
}

/* Table styles */
table,
th,
td {
    border: 1px solid #333;
}

th,
td {
    padding: 10px;
    text-align: left;
}

th {
    background-color: #333;
    color: #ffffff;
}

td {
    background-color: #1e1e1e;
}

/* Login specific styles */
input[type="email"],
input[type="password"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 10px;
    border: 1px solid #333;
    border-radius: 4px;
    background-color: #2c2c2c;
    color: #e0e0e0;
}

.login-container {
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

/* Align login button vertically with inputs inside the login container */
.login-container form {
    /* keep existing flex display but center items vertically for this specific form */
    align-items: center;
    gap: 10px;
}

/* Make the login inputs and button the same height and add spacing */
.login-container input[type="email"],
.login-container input[type="password"] {
    height: 40px;
    box-sizing: border-box;
    /* include padding/border in height */
}

.login-container input[type="submit"] {
    height: 40px;
    /* match inputs */
    box-sizing: border-box;
    align-self: center;
    /* prevent the button from stretching full width and keep consistent size */
    flex: 0 0 auto;
    min-width: 90px;
    padding: 0 12px;
    /* horizontal padding to keep text padded */
    margin-left: 12px;
    /* left margin to separate from inputs */
    margin-top: 12px;
    /* left margin to separate from inputs */
}

.user-info {
    float: right;
    margin: 10px;
    color: #e0e0e0;
    display: flex;
    align-items: center;
    /* vertical centered */
    gap: 10px;
}

.logout-btn {
    background-color: #ff4444;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    font-size: 14px;
}

.logout-btn:hover {
    background-color: #cc0000;
}

/* Event form styles */
.event-form {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 1fr 2fr;
    grid-template-rows: 1fr 1fr;
    row-gap: 5px;
    column-gap: 10px;
    padding: 10px 10px 0px 10px;
    background-color: #2b2b2b;
    border-radius: 8px;
    margin-top: 10px;
}

.event-form .form-group {
    margin: 0;
    padding: 0;
}

.event-form .title-field {
    grid-row: 1 / 2;
    grid-column: 1;
}

.event-form .desc-field {
    grid-row: 1 / 5;
    grid-column: 2;
}

.event-form textarea {
    min-height: 95px;
    width: 100%;
    /* Ensure it takes full width of the grid cell */
    box-sizing: border-box;
    /* Include padding and border in the element's total width and height */
}

.event-form input[type="text"] {
    width: 100%;
    /* Ensure it takes full width of the grid cell */
    box-sizing: border-box;
    /* Include padding and border in the element's total width and height */
}

.event-form .start-date-field {
    grid-row: 1 / 2;
    grid-column: 3;
}

.event-form .end-date-field {
    grid-row: 2 / 5;
    grid-column: 3;
}

.event-form .timelines-field {
    grid-row: 1 / 3;
    grid-column: 4;
}

.event-form select[multiple] {
    height: 100%;
    max-height: 70px;
    width: 100%;
    /* Ensure it takes full width of the grid cell */
    box-sizing: border-box;
    /* Include padding and border in the element's total width and height */
}

.event-form .keywords-field {
    grid-row: 1 / 2;
    grid-column: 6;
}

.event-form .pictures-field {
    grid-row: 1 / 5;
    grid-column: 5;
    /* overflow: hidden; */
    max-width: 100%;
    border: 1px solid #333;
    /* Add visual container */
    border-radius: 4px;
    background-color: #2b2b2b;
}

#pictures-preview {
    display: flex;
    flex-wrap: nowrap;
    /* Change from grid to flex */
    gap: 5px;
    max-height: 130px;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 5px;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

#pictures-preview::-webkit-scrollbar {
    height: 8px;
}

#pictures-preview::-webkit-scrollbar-thumb {
    background: #444444;
    border-radius: 4px;
}

#pictures-preview::-webkit-scrollbar-track {
    background: #2b2b2b;
    border-radius: 4px;
}

#pictures-preview {
    scrollbar-width: thin;
    scrollbar-color: #444444 #2b2b2b;
}

.pictures-thumbnail {
    flex: 0 0 60px;
    /* Don't allow thumbnails to grow or shrink */
    width: 60px;
    height: 60px;
    margin: 0;
    object-fit: cover;
    display: block;
}

.pictures-thumbnail.main-picture {
    border: 2px solid #c0d4ca;
}

.event-form .location-field {
    grid-row: 2 / 5;
    grid-column: 1;
}

.event-form .participate-field {
    /* grid-row: 2 / 3; */
    grid-row: 2 / 5;
    grid-column: 6;
}

/* Timeline form styles */
.timeline-form {
    max-height: 200px;
    display: grid;
    grid-template-columns: fit-content(100%) minmax(0, 220px) minmax(0, 380px) minmax(0, 200px) minmax(0, 220px);
    row-gap: 5px;
    column-gap: 10px;
    padding: 10px;
    background-color: #2b2b2b;
    border-radius: 8px;
    margin-top: 10px;
}

.timeline-list {
    overflow-y: auto;
    max-height: 200px;
    width: max-content;
    max-width: 180px;
    white-space: nowrap;
    overflow-x: hidden;
}

.timeline-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    font-size: 0.9em;
}

.timeline-title {
    margin-right: 10px;
}

.timeline-item .edit-btn {
    margin-right: 10px;
}

.timeline-form-fields {
    padding-left: 5px;
}

.timelinegroups-list {
    padding: 0px;
    max-height: 200px;
    overflow-y: auto;
    font-size: 0.9em;
}

.timelinegroup-item {
    display: flex;
    padding: 0 0 2px 5px;
    cursor: pointer;
}

.check-wrapper {
    width: 20px;
    margin-right: 10px;
    text-align: center;
}

.checkmark.clickable {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 1px solid #999;
    border-radius: 3px;
    background-color: #666;
}

.checkmark.clickable.checked {
    background-color: white;
}

.group-name {
    flex: 1;
}

.timeline-form-fields .form-group {
    margin-bottom: 10px;
}

.timeline-form-fields .desc-field textarea {
    resize: none;
}

.timeline-form .form-group {
    margin: 0;
    padding: 0;
}

.timeline-form .title-field {
    /* grid-row: 1 / 4;
    grid-column: 1; */
}

.timeline-form .desc-field {
    /* grid-row: 1 / 6;
    grid-column: 2; */
}

.timeline-form textarea {
    min-height: 30px;
}

.timeline-form .createbutton-field {
    /* grid-row: 4 / 6;
    grid-column: 5; */
    display: flex;
    gap: 10px;
    margin-top: 10px;
}

.timeline-event-item {
    display: flex;
    font-size: 0.9em;
    margin-bottom: 2px;
    white-space: nowrap;
}

.timeline-event-item .event-title,
.timeline-event-item .event-date {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.timeline-event-item .edit-btn {
    padding: 2px 4px;
}

.timeline-event-item .delete-btn {
    padding: 2px 4px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 5px;
    text-decoration: none;
}

.timeline-event-item .event-title {
    font-weight: normal;
}

.timeline-event-fields {
    max-height: 180px;
    overflow-y: auto;
    padding-right: 10px;
}

.timeline-event-fields::-webkit-scrollbar,
.timeline-list::-webkit-scrollbar {
    width: 8px;
}

.timeline-event-fields::-webkit-scrollbar-thumb,
.timeline-list::-webkit-scrollbar-thumb {
    background: #444444;
    border-radius: 4px;
}

.timeline-event-fields::-webkit-scrollbar-track,
.timeline-list::-webkit-scrollbar-track {
    background: #2b2b2b;
}

.timeline-event-fields,
.timeline-list {
    scrollbar-width: thin;
    scrollbar-color: #444444 #2b2b2b;
}

.delete-btn {
    background-color: #ff4444;
    color: white;
    border: none;
    padding: 10px 10px;
    border-radius: 4px;
    cursor: pointer;
}

.delete-btn:hover {
    background-color: #cc0000;
}

/* Red text message styles */
.red-text {
    color: red;
    margin-left: 10px;
}

/* Event item styles */
.event-item,
.event-list-header {
    max-width: 1200px;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr) 2fr 1fr 1fr 1fr;
    font-size: 0.9em;
    gap: 5px;
    align-items: center;
    background-color: #2b2b2b;
    padding: 0px;
    border-radius: 4px;
}

.event-title {
    font-weight: bold;
    min-width: 150px;
    max-width: 200px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-dates {
    color: #b0b0b0;
    min-width: 50px;
}

.event-location,
.event-timelines {
    color: #b0b0b0;
    min-width: 100px;
    max-width: 150px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-description {
    color: #888;
    flex: 1;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.edit-btn {
    background-color: #6200ea;
    color: white;
    border: none;
    padding: 4px 6px;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.8em;
    min-width: 30px;
}

.edit-btn:hover {
    background-color: #3700b3;
}

/* Back button styles */
.back-btn {
    display: inline-block;
    background-color: #6200ea;
    color: white;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 4px;
    margin: 10px 0;
}

.back-btn:hover {
    background-color: #3700b3;
}

/* Success message styles */
.success-message {
    position: relative;
    background-color: #43a047;
    color: white;
    padding: 10px;
    border-radius: 4px;
    margin: 10px 0;
}

.success-message .close-btn {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

.event-list-header a,
.noSortHeader {
    color: #fff;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.event-list-header a:hover {
    color: #6200ea;
}

.event-list-header .sort-arrows {
    font-size: 0.8em;
    margin-left: 5px;
}

.event-list-header .sort-arrows span {
    display: inline-block;
    color: #fff;
}

.event-list-header .sort-arrows .active {
    color: #6200ea;
}

/* Filter form styles */
.filter-form .form-group {
    margin: 0;
    padding: 0;
}

.filter-form .button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 24px 0 0 0;
}

.filter-form button,
.filter-form a {
    background-color: #6200ea;
    color: #ffffff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    min-width: 100px;
    font-size: 1em;
}

.filter-form a {
    display: inline-block;
}

.filter-form button:hover,
.filter-form a:hover {
    background-color: #3700b3;
}

/* Filter form toggle button styles */
.filter-toggle-btn {
    background-color: #6200ea;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin: 10px 5px;
    min-width: 120px;
    height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

.filter-toggle-btn:hover {
    background-color: #3700b3;
}

/* Inline import button for events table form */
.eventImportCSV-btn.import-btn-inline {
    background-color: #009688;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-left: 4px;
    min-width: 120px;
    height: 35px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
    vertical-align: middle;
}

.eventImportCSV-btn.import-btn-inline:hover {
    background-color: #00796b;
}

/* Upload picture */
.new-picture {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    padding: 5px;
    background-color: #2b2b2b;
    border-radius: 8px;
    margin-top: 5px;
}

.new-picture .form-group {
    padding: 5px;
    margin-top: 5px;
    width: auto;
    max-width: 100%;
    flex: 0 0 auto;
    text-align: left;
}

#picture-preview {
    max-width: 150px;
    display: none;
    margin-left: 5px;
}

.new-picture .form-group .caption {
    width: 150px;
}

.new-picture .form-group .submit-btn {
    margin-top: 25px;
}

.manage-btn {
    background-color: #6200ea;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    margin-left: 10px;
    text-decoration: none;
}

.manage-btn:hover {
    background-color: #3700b3;
}

/* Discrete button style */
.discrete-button {
    background-color: #6200ea00;
    color: white;
    border: none;
    padding: 3px 5px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
    margin-left: 5px;
    text-decoration: none;
}

.discrete-button:hover {
    background-color: #3700b3;
}

/* Event details styles */
.event-title,
.event-description,
.event-dates,
event-location {
    text-align: left;
    padding: 5px;
}

/* Events list styles */
.events-rubrik {
    padding-top: 5px;
    border-top: 2px solid #6200ea;
}

.events-list {
    display: block;
    margin-top: 20px;
}

.clear-btn {
    background-color: #ffcc00;
    color: white;
    border: none;
    padding: 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
}

.clear-btn:hover {
    background-color: #cc9900;
}

/* Header container styles */
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    border-bottom: 2px solid #6200ea;
    padding-bottom: 10px;
}

.header-container a.back-btn {
    margin-right: 10px;
}

input#max_events {
    max-width: 100px;
}

/* Picture editing styles */
.picture-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 5px;
}

.picture-container {
    display: flex;
    flex-direction: column;
    border: 1px solid #333;
    border-radius: 5px;
    background-color: #2b2b2b;
    padding: 10px 10px 10px 10px;
}

.picture-container .img-wrapper {
    width: 100%;
    height: 150px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.picture-container img {
    max-width: 100%;
    max-height: 100%;
    object-fit: cover;
    margin-bottom: 5px;
}

.picture-actions {
    display: flex;
    gap: 10px;
    margin-top: 4px;
    width: 100%;
}

.picture-actions .delete-btn {
    background-color: #ff4444;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

.picture-actions .delete-btn:hover {
    background-color: #cc0000;
}

/* New filter form styles for edit_pictures.php */
.filter-form-edit-pictures {
    padding: 0px;
    background-color: #2b2b2b;
    border-radius: 8px;
    margin: 0;
    display: flex;
    flex-direction: column;
    width: 100%;
}

.filter-form-edit-pictures .form-group {
    margin: 0;
    padding: 0;
    min-width: 70px;
}

.filter-form-edit-pictures label {
    margin: 0;
}

.filter-form-edit-pictures input.caption {
    width: 90%;
    padding: 2px 5px 2px 2px;
    margin: 0;
}

.filter-form-edit-pictures .button-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 24px 0 0 0;
}

.filter-form-edit-pictures button,
.filter-form-edit-pictures a {
    background-color: #6200ea;
    color: #ffffff;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    text-align: center;
    font-size: 0.8em;
}

.filter-form-edit-pictures a {
    display: inline-block;
}

.filter-form-edit-pictures button:hover,
.filter-form-edit-pictures a:hover {
    background-color: #3700b3;
}

.events-using-picture {
    font-size: 0.8em;
    padding: 0px;
    color: #b0b0b0;
}

.events-using-picture ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

.events-using-picture li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 2px 0;
    padding: 2px 0;
    gap: 10px;
}

.event-link {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 5px;
}

.event-link span {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.event-main {
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.event-main label {
    display: flex;
    align-items: center;
    gap: 5px;
    margin: 0;
    cursor: pointer;
}

.events-using-picture input[type="checkbox"] {
    margin: 0;
    cursor: pointer;
}

.event-picture {
    max-width: 200px;
}

.event-picture .img-wrapper {
    height: 150px;
}

.event-picture img.main-picture {
    border: 2px solid #00e974;
}

.event-picture .picture-actions {
    display: flex;
    justify-content: space-between;
    gap: 5px;
    margin-top: 5px;
}

.event-picture .picture-actions form {
    margin: 0;
    padding: 0;
    flex: 1;
}

.event-picture .picture-actions button {
    width: 100%;
    padding: 5px;
    font-size: 0.8em;
}

.event-picture .picture-caption {
    font-size: 0.9em;
    color: #b0b0b0;
    margin-top: 5px;
    text-align: center;
}

.fa-circle-plus {
    font-size: 1.2em;
    cursor: pointer;
}

/* Custom popup styles */
.popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
}

.popup-content {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background-color: #2b2b2b;
    padding: 20px;
    border-radius: 8px;
    min-width: 300px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
}

.popup-message {
    color: #e0e0e0;
    margin-bottom: 20px;
    text-align: center;
}

.popup-buttons {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.popup-confirm,
.popup-cancel {
    padding: 8px 15px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    min-width: 80px;
}

.popup-confirm {
    background-color: #00e974;
    color: white;
}

.popup-cancel {
    background-color: #ff4444;
    color: white;
}

/* Add new styles for sharing info */
.shared-info {
    color: #e0e0e0;
    font-size: 0.9em;
}

.shared-users-list {
    list-style: none;
    padding: 0 0 0 10px;
    margin: 5px 0;
}

.shared-user-item {
    display: flex;
    align-items: center;
    padding: 2px 0;
}

.shared-user-name {
    color: #b0b0b0;
}

.shared-user-access {
    font-size: 0.8em;
    padding: 2px 6px;
    border-radius: 3px;
    background-color: #333;
}

.access-read {
    color: #64B5F6;
}

.access-write {
    color: #4CAF50;
}

.shared-label {
    font-weight: bold;
    margin-bottom: 5px;
}

.shared-type {
    color: #ffb347;
    margin-bottom: 8px;
}