/* Custom Button Styles */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem; /* 8px */
    padding-left: 1rem; /* 16px */
    padding-right: 1rem; /* 16px */
    padding-top: 0.5rem; /* 8px */
    padding-bottom: 0.5rem; /* 8px */
    border-radius: 0.5rem; /* 8px */
    font-weight: 500;
    color: white;
    transition: background-color 0.2s ease-in-out;
    border: 1px solid transparent;
}


.btn-blue {
    background-color: #0174b9;
    border-color: #0174b9;
}
.btn-blue:hover {
    background-color: #015a8f;
    border-color: #015a8f;
}

.btn-light-blue {
    background-color: #00b8c4;
    border-color: #00b8c4;
}
.btn-light-blue:hover {
    background-color: #00939e;
    border-color: #00939e;
}

.btn-pink {
    background-color: #ce1f45;
    border-color: #ce1f45;
}
.btn-pink:hover {
    background-color: #a41937;
    border-color: #a41937;
}

.btn-purple {
    background-color: #7c3aed;
    border-color: #7c3aed;
}
.btn-purple:hover {
    background-color: #6d28d9;
    border-color: #6d28d9;
}

/* --- Outline Button Styles --- */

.btn-outline-blue {
    background-color: transparent;
    border-color: #0174b9;
    color: #0174b9;
}
.btn-outline-blue:hover {
    background-color: #0174b9;
    color: white;
}


.btn-outline-light-blue {
    background-color: transparent;
    border-color: #00b8c4;
    color: #00b8c4;
}
.btn-outline-light-blue:hover {
    background-color: #00b8c4;
    color: white;
}

.btn-outline-pink {
    background-color: transparent;
    border-color: #ce1f45;
    color: #ce1f45;
}
.btn-outline-pink:hover {
    background-color: #ce1f45;
    color: white;
}

.btn-outline-purple {
    background-color: transparent;
    border-color: #7c3aed;
    color: #7c3aed;
}
.btn-outline-purple:hover {
    background-color: #7c3aed;
    color: white;
}

.btn-outline-gray {
    background-color: transparent;
    border-color: #6b7280;
    color: #6b7280;
}
.btn-outline-gray:hover {
    background-color: #6b7280;
    color: white;
}

/* --- Text Color Utilities --- */
.text-brand-blue {
    color: #0174b9;
}

.bg-brand-blue {
    background-color: #0174b9;
    color: white;
}

/* Filter Styles */
.filter-select {
    background-color: #e6f0f6;
    color: black;
    border: 1px solid #00b8c4;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%230174b9'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5' /%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1.25em 1.25em;
    padding-right: 2.5rem;
    min-width: 180px;
}

/* Remove dropdown arrow for date input */
input[type="text"].filter-select {
    background-image: none;
    padding-right: 1rem;
    text-align: left;
}

/* Placeholder styling */
.filter-select::placeholder {
    color: black;
    opacity: 1;
}

/* For Firefox */
.filter-select::-moz-placeholder {
    color: black;
    opacity: 1;
}

/* For Chrome/Edge/Safari */
.filter-select::-webkit-input-placeholder {
    color: black;
    opacity: 1;
}

/* For Internet Explorer */
.filter-select:-ms-input-placeholder {
    color: black;
    opacity: 1;
}

.filter-select:focus {
    outline: none;
    border-color: #0174b9;
    box-shadow: 0 0 0 2px rgba(1, 116, 185, 0.2);
}

/* Style for dropdown options on hover (works in Chrome/Edge) */
.filter-select option:hover {
    background-color: #0174b9;
    color: white;
}

/* Style for the selected option in some browsers */
.filter-select option:checked {
    background-color: #0174b9 !important;
    color: white !important;
}

/* Ensure the placeholder/default option does not get the highlight */
.filter-select option[value=""] {
    background-color: white;
    color: black;
}

/* Flatpickr customization */
.flatpickr-input {
    background-color: #e6f0f6 !important;
}

.flatpickr-calendar {
    border: 1px solid #00b8c4 !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
}

.flatpickr-day.selected {
    background: #0174b9 !important;
    border-color: #0174b9 !important;
}

.flatpickr-day:hover {
    background: #e6f0f6 !important;
    border-color: #00b8c4 !important;
}

/* Event Card Hover Effect */
.event-card {
    transition: all 0.3s ease-in-out;
    width: 400px;
    height: 445px;
    border-radius: 1rem;
}

.event-card:hover {
    transform: translateY(-5px);
    border: 1px solid #0174b9;
    box-shadow: 0 8px 16px #0174b9, 0 4px 8px rgba(1, 116, 185, 0.2); /* Black shadow + Blue glow */
}

/* Event Card Image Styling */
.event-card img,
.event-card .img-placeholder {
    width: 361px;
    height: 237px;
    object-fit: cover;
    border-radius: 12px;
}

.status-badge-shape {
    border-radius: 19px 0 0 19px;
    height: 35px;
    display: inline-flex;
    align-items: center;
}

.public-link-card {
    background-color: #e6f0f6;
}

.event-detail-image {
    width: 361px;
    height: 237px;
    object-fit: cover;
    border-radius: 12px;
}

/* Custom Field Styling - Outlined with Blue Hover */
.form-field {
    background-color: transparent;
    border: 2px solid #0174b9;
    border-radius: 0.5rem;
    padding: 0.75rem 1rem;
    width: 100%;
    transition: all 0.3s ease;
    outline: none;
}

.form-field:hover {
    border-color: #e6f0f6;
    box-shadow: 0 0 0 3px rgba(1, 116, 185, 0.1);
}

.form-field:focus {
    border-color: #0174b9;
    box-shadow: 0 0 0 3px rgba(1, 116, 185, 0.2);
}

/* Select2 Tailwind Integration */
.select2-container {
    width: 100% !important;
}

.select2-container--default .select2-selection--multiple {
    border: 2px solid #0174b9;
    border-radius: 0.5rem;
    padding: 0.5rem 1rem;
    min-height: 2.5rem;
    background-color: transparent;
    transition: all 0.3s ease;
}

.select2-container--default .select2-selection--multiple:hover {
    border-color: #0174b9;
    box-shadow: 0 0 0 3px rgba(1, 116, 185, 0.1);
}

.select2-container--default .select2-selection--multiple:focus {
    border-color: #0174b9;
    outline: 2px solid transparent;
    outline-offset: 2px;
    box-shadow: 0 0 0 3px rgba(1, 116, 185, 0.2);
}

.select2-container--default .select2-selection--multiple .select2-selection__choice {
    background-color: #0174b9;
    border: 1px solid #0174b9;
    border-radius: 0.25rem;
    color: white;
    font-size: 0.875rem;
    padding: 0.25rem 0.5rem;
    margin: 0.125rem;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove {
    color: white;
    margin-right: 0.25rem;
}

.select2-container--default .select2-selection--multiple .select2-selection__choice__remove:hover {
    color: #fca5a5;
}

.select2-dropdown {
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.select2-container--default .select2-results__option--highlighted[aria-selected] {
    background-color: #0174b9;
    color: white;
}

.select2-search--dropdown .select2-search__field {
    border: 1px solid #d1d5db;
    border-radius: 0.25rem;
    padding: 0.5rem;
}

/* Range slider styling */
.range-slider {
    background-color: transparent;
    border: 2px solid #0174b9;
    border-radius: 0.5rem;
    padding: 0.75rem;
    transition: all 0.3s ease;
}

.range-slider:hover {
    border-color: #0174b9;
    box-shadow: 0 0 0 3px rgba(1, 116, 185, 0.1);
}

/* Checkbox styling */
.checkbox-field {
    accent-color: #0174b9;
    width: 1rem;
    height: 1rem;
}

.checkbox-field:hover {
    transform: scale(1.1);
}

/* DataTables Custom Styling */
/* DataTables Buttons */
.dt-buttons .dt-button {
    background-color: transparent !important;
    border: 1px solid #0174b9 !important;
    color: #0174b9 !important;
    border-radius: 0.5rem !important;
    padding: 0.5rem 1rem !important;
    font-weight: 500 !important;
    transition: all 0.2s ease-in-out !important;
    margin-right: 0.5rem !important;
    margin-left:0.5rem !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
}

.dt-buttons .dt-button:hover {
    background-color: #0174b9 !important;
    color: white !important;
    border-color: #0174b9 !important;
}

.dt-buttons .dt-button:active,
.dt-buttons .dt-button:focus {
    background-color: #0174b9 !important;
    border-color: #0174b9 !important;
    color: white !important;
    outline: none !important;
    box-shadow: 0 0 0 2px rgba(1, 116, 185, 0.2) !important;
}

/* DataTables Search Input */
.dataTables_filter input {
    background-color: transparent !important;
    border: 2px solid #0174b9 !important;
    border-radius: 0.5rem !important;
    padding: 0.5rem 1rem !important;
    transition: all 0.3s ease !important;
    outline: none !important;
    margin-left: 0.5rem !important;
}

.dataTables_filter input:hover {
    border-color: #e6f0f6 !important;
    box-shadow: 0 0 0 3px rgba(1, 116, 185, 0.1) !important;
}

.dataTables_filter input:focus {
    border-color: #0174b9 !important;
    box-shadow: 0 0 0 3px rgba(1, 116, 185, 0.2) !important;
}

/* DataTables Length Select */
.dataTables_length select {
    background-color: transparent !important;
    color: #0174b9 !important;
    border: 1px solid #0174b9 !important;
    border-radius: 0.5rem !important;
    padding: 0.5rem 1rem !important;
    margin: 0 0.5rem !important;
    outline: none !important;
    font-weight: 500 !important;
    transition: all 0.2s ease-in-out !important;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='%230174b9'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5' /%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0.5rem center !important;
    background-size: 1.25em 1.25em !important;
    padding-right: 2.5rem !important;
}

.dataTables_length select:hover {
    background-color: #0174b9 !important;
    color: white !important;
    border-color: #0174b9 !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5' /%3E%3C/svg%3E") !important;
}

.dataTables_length select:focus {
    background-color: #0174b9 !important;
    color: white !important;
    border-color: #0174b9 !important;
    box-shadow: 0 0 0 2px rgba(1, 116, 185, 0.2) !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 24 24' stroke-width='2' stroke='white'%3E%3Cpath stroke-linecap='round' stroke-linejoin='round' d='M19.5 8.25l-7.5 7.5-7.5-7.5' /%3E%3C/svg%3E") !important;
}

/* DataTables Pagination - More Specific Overrides */
.dataTables_wrapper .dataTables_paginate .paginate_button,
.dataTables_wrapper .dataTables_paginate .paginate_button.previous,
.dataTables_wrapper .dataTables_paginate .paginate_button.next {
    background-color: transparent !important;
    border: 1px solid #0174b9 !important;
    color: #0174b9 !important;
    border-radius: 0.5rem !important;
    padding: 0.5rem 0.75rem !important;
    margin: 0 0.25rem !important;
    transition: all 0.2s ease-in-out !important;
    text-decoration: none !important;
    background: transparent !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.previous:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.next:hover {
    background-color: #0174b9 !important;
    background: #0174b9 !important;
    color: white !important;
    border-color: #0174b9 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background-color: #0174b9 !important;
    background: #0174b9 !important;
    color: white !important;
    border-color: #0174b9 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover {
    background-color: #0174b9 !important;
    background: #0174b9 !important;
    color: white !important;
    border-color: #0174b9 !important;
}

/* Additional specificity for current button text color */
.dataTables_wrapper .dataTables_paginate .paginate_button.current,
.dataTables_wrapper .dataTables_paginate .paginate_button.current a {
    color: white !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.current:hover a {
    color: white !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.previous.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.next.disabled {
    background-color: #f9fafb !important;
    background: #f9fafb !important;
    color: #9ca3af !important;
    border-color: #d1d5db !important;
    cursor: not-allowed !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.previous.disabled:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.next.disabled:hover {
    background-color: #f9fafb !important;
    background: #f9fafb !important;
    color: #9ca3af !important;
    border-color: #d1d5db !important;
}

/* DataTables Info Text */
.dataTables_info {
    color: #0174b9 !important;
    font-weight: 500 !important;
}

/* DataTables Labels */
.dataTables_length label,
.dataTables_filter label {
    color: #374151 !important;
    font-weight: 500 !important;
}

/* DataTables Table Styling */
.dataTable {
    border: 2px solid #0174b9 !important;
    border-collapse: separate !important;
    border-spacing: 0 !important;
    border-radius: 0.5rem !important;
}

.dataTable thead th {
    background-color: #f9fafb !important;
    color: #374151 !important;
    font-weight: 600 !important;
    border: none !important;
    border-bottom: 2px solid #0174b9 !important;
    text-align: center !important;
}

.dataTable tbody td {
    border: none !important;
    border-bottom: 1px solid #e5e7eb !important;
}

.dataTable tbody tr:last-child td {
    border-bottom: none !important;
}

.dataTable tbody tr:hover {
    background-color: #f0f9ff !important;
}

/* Remove all internal borders */
.dataTable th,
.dataTable td {
    border-left: none !important;
    border-right: none !important;
}

/* DataTables Responsive */
.dtr-details {
    background-color: #f9fafb !important;
}

/* Export PDF Button States */
.loading-state {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hidden {
    display: none !important;
}

#exportPdfBtn:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

#exportPdfBtn .loading-state svg {
    margin-right: 0.5rem;
}

/* Ensure the button maintains its size during state changes */
#exportPdfBtn {
    min-width: 130px;
    justify-content: center;
}

/* Animation for the loading spinner */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}
