/* ============================================
   SEARCH MODAL
   Global search modal with event results and filters
============================================ */

/* Search Modal */
.af-search-modal {
    scrollbar-width: none;
    z-index: 1055;
}

.af-search-modal .modal-dialog {
    max-width: 80%;
    margin: 1.75rem auto;
    z-index: 1056;
}

@media (max-width: 991px) {
    .af-search-modal .modal-dialog {
        max-width: 95%;
    }
}

.af-search-modal .modal-content {
    border: none;
    border-radius: 16px;
    max-height: 90vh;
    overflow: hidden;
    position: absolute;
    top: 0;
    margin: 1.75rem 0;
}

.af-search-modal .modal-header {
    border: none;
    padding: 0;
    position: absolute;
    top: 15px;
    right: 15px;
    z-index: 10;
}

.af-search-modal .modal-header .close {
    position: fixed;
    top: 4%;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    transition: all 0.3s ease;
    opacity: 1;
    padding: 0;
    margin: 0;
    cursor: pointer;
    color: #999;
}

@media (max-width: 767px) {
    .af-search-modal .modal-header .close {
        right: 4%;
    }
}

.af-search-modal .modal-header .close img {
    width: 19px;
    height: 19px;
    filter: brightness(0);
}

.af-search-modal .modal-header .close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.af-search-modal .modal-header .close:hover img {
    filter: brightness(0);
    opacity: 0.7;
}

.af-search-modal .modal-body {
    padding: 24px;
    max-height: 90vh;
    overflow-y: auto;
}

@media (max-width: 767px) {
    .af-search-modal .modal-body {
        padding: 16px;
    }
}

/* Global Search */
.global-search {
    width: 100%;
}

.global-search-inner {
    width: 100%;
    height: 58px;
    background-color: #E6E6F0;
    border-radius: 100px;
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 24px;
    margin-bottom: 24px;
}

@media (max-width: 767px) {
    .global-search-inner {
        margin-bottom: 16px;
    }
}

.global-search-inner .form-control {
    width: 100%;
    height: 58px;
    font-size: 16px;
    font-weight: 500;
    line-height: 1;
    color: #fff !important;
    border: none;
    background-color: transparent !important;
}

.global-search-inner .form-control:focus {
    box-shadow: none !important;
    outline: none !important;
    background-color: transparent !important;
    color: #fff !important;
}

.global-search-inner .form-control::placeholder {
    color: #999 !important;
    opacity: 1;
}

.global-search-inner .search-btn {
    background-color: transparent;
    border: none;
    padding: 0;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    cursor: pointer;
}

.global-search-inner .search-btn svg {
    width: 24px;
    height: 24px;
}

/* Search Results Section */
.global-search-results {
    margin-top: 24px;
}

/* Category Filter Tags */
.search-category-tags {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.search-tag {
    background: #2A2A2A;
    border: none;
    border-radius: 24px;
    padding: 8px 20px;
    font-size: 14px;
    font-weight: 500;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
}

.search-tag:hover {
    background: #3A3A3A;
}

.search-tag.active {
    background: #fff;
    color: #000;
}

/* Loading Spinner */
.search-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
    color: #fff;
}

.search-loading .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #2A2A2A;
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.search-loading p {
    font-size: 14px;
    color: #999;
    margin: 0;
}

/* Search Results Container */
.search-results-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Search Event Card - Based on attached design */
.search-event-card {
    display: flex;
    align-items: flex-start;
    gap: 16px;
    padding: 16px;
    background: #1A1A1A;
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.3s ease;
}

.search-event-card:hover {
    background: #2A2A2A;
}

/* Event Image */
.search-event-image {
    position: relative;
    flex-shrink: 0;
    width: 115px;
    height: 115px;
    border-radius: 8px;
    overflow: hidden;
}

.search-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Event Icon Badge */
.search-event-icon {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 24px;
    height: 24px;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.search-event-icon svg {
    width: 12px;
    height: 12px;
    stroke: #fff;
}

/* Event Content */
.search-event-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 0;
}

.search-event-title {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.3;
    color: #fff;
    margin: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
}

.search-event-date {
    font-size: 14px;
    font-weight: 400;
    line-height: 1.4;
    color: #999;
    margin: 0;
}

.search-event-venue {
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    color: #6C5CE7;
    margin: 0;
}

/* No Results Message */
.search-no-results {
    text-align: center;
    padding: 40px 20px;
}

.search-no-results p {
    font-size: 16px;
    color: #999;
    margin: 0;
}

/* Modal Backdrop */
.af-search-modal-backdrop,
.modal-backdrop.af-search-modal-backdrop {
    background-color: rgba(0, 0, 0, 0.98) !important;
    opacity: 1 !important;
}

.modal-backdrop.show {
    opacity: 0.98 !important;
}

/* Responsive adjustments */
@media (max-width: 767px) {
    .search-event-card {
        gap: 12px;
        padding: 12px;
    }

    .search-event-image {
        width: 80px;
        height: 80px;
    }

    .search-event-title {
        font-size: 14px;
    }

    .search-event-date,
    .search-event-venue {
        font-size: 12px;
    }
}
