.search-container {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: center;
    margin: 20px auto;
    max-width: 600px;
}

.search-container input {
    flex: 1;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
}

.search-container button {
    padding: 8px 12px;
    border: none;
    border-radius: 6px;
    color: white;
    cursor: pointer;
}

#searchBtn {
    background-color: #007bff;
}

#clearBtn {
    background-color: #6c757d;
}

#results {
    max-width: 800px;
    margin: 0 auto;
    background: #fff;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.event-item {
    padding: 10px;
    border-bottom: 1px solid #eee;
    cursor: pointer;
}

.event-item:hover {
    background: #f1f1f1;
}

/* ====== Modal Overlay ====== */
#eventModal {
    display: none;
    /* Hidden by default */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    /* Dim background */
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
}

/* ====== Modal Box ====== */
.modal-content {
    background: #fff;
    padding: 24px 25px 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 480px;
    /* Keeps it compact on large screens */
    max-height: 85vh;
    overflow-y: auto;
    /* Scroll if content too tall */
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
    position: relative;
    animation: fadeIn 0.25s ease-in;
}

/* ====== Close Button ====== */
#closeModal {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 22px;
    font-weight: bold;
    color: #666;
    cursor: pointer;
    z-index: 10;
}

#closeModal:hover {
    color: #000;
}

/* ====== Modal Text ====== */
#modalTitle {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: #222;
}

#modalTime {
    font-weight: 600;
    color: #0056b3;
    margin-bottom: 12px;
    font-size: 1.05rem;
    /* Larger text */
    letter-spacing: 0.3px;
    background-color: #eaf2ff;
    padding: 6px 10px;
    border-radius: 6px;
    display: inline-block;
}


#modalDesc {
    font-size: 1.05rem;
    /* 👈 Increased for better readability */
    line-height: 1.6;
    /* Slightly more breathing room */
    color: #222;
    /* Darker for better contrast */
    margin-bottom: 16px;
    /* 👈 Adds gap before "View in Calendar" */
    white-space: pre-wrap;
    /* Preserves line breaks */
}


/* ====== Calendar Button ====== */
.calendar-link {
    display: inline-block;
    margin-top: 12px;
    margin-bottom: 16px;
    /* 👈 Added more space below */
    padding: 8px 14px;
    background-color: #007bff;
    color: #fff !important;
    text-decoration: none !important;
    border-radius: 6px;
    font-weight: 500;
    transition: background 0.2s, transform 0.1s;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.15);
}


.calendar-link:hover {
    background-color: #0056b3;
    color: #fff !important;
    transform: translateY(-1px);
}

.calendar-link:active {
    transform: translateY(1px);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.modal-btn-small {
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 4px;
    display: inline-block;
    margin: 6px 4px;
    text-decoration: none;
}

.btn-blue {
    background-color: #007bff;
    color: white;
}

.btn-blue:hover {
    background-color: #006ad6;
    color: white;
}

.btn-grey {
    background-color: #555;
    color: white;
}

.btn-grey:hover {
    background-color: #444;
    color: white;
}


/* ====== Animation ====== */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ====== Mobile Adjustments ====== */
@media (max-width: 600px) {
    .modal-content {
        width: 100%;
        max-width: none;
        height: auto;
        max-height: 90vh;
        padding: 16px 20px;
    }

    #modalTitle {
        font-size: 1.2rem;
    }

    #modalTime {
        font-size: 1rem;
    }

    #modalDesc {
        font-size: 1rem;
        line-height: 1.5;
    }
}

