/* ------------------------------------------------------------------------
 * Event Search
 * ------------------------------------------------------------------------ */

.tb-event-search {
	width: 100%;
}


/* Search form ------------------------------------------------------------ */

.tb-event-search-form {
	position: relative;

	display: flex;
	align-items: center;

	width: 100%;

	margin-bottom: 30px;
}

.tb-event-search-form .tb-event-search-input {
	width: 100%;
	height: 48px;
	padding-left: 52px;
	padding-right: 16px;

	font-size: 14px;

	border: 1px solid #e5e5e5;
	border-radius: 24px;
	background: #fff;
	color: #333;

	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
	outline: none;
}

.tb-event-search-form .tb-event-search-icon-wrapper {
	position: absolute;
    left: 8px;

	padding: .5rem;

	color: var(--e-global-color-accent);
}

/* Loading ---------------------------------------------------------------- */

.tb-event-search-loading {
	display: none;
	position: absolute;
	right: 120px;
	width: 18px;
	height: 18px;
	border: 2px solid #ddd;
	border-top-color: #777;
	border-radius: 50%;
	animation: tb-event-search-spin 0.7s linear infinite;
}

.tb-event-search-loading.is-active {
	display: block;
}

@keyframes tb-event-search-spin {
	to {
		transform: rotate(360deg);
	}
}


/* Results grid ----------------------------------------------------------- */

.events-search-grid {
	display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;

	/* Smooth opacity transition when loading */
	transition: opacity 0.2s ease-in-out;
}

/* Skeleton Card Shell */
.event-card-skeleton {
    display: flex;
    flex-direction: column;
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    height: 100%;
    min-height: 380px;
}

.skeleton-image {
    width: 100%;
    height: 180px;
}

.skeleton-body {
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    flex-grow: 1;
}

/* Line Placeholder Base Styling */
.skeleton-line {
    border-radius: 4px;
}

.skeleton-title {
    height: 20px;
    width: 85%;
    margin-bottom: 8px;
}

.skeleton-title-short {
    height: 20px;
    width: 50%;
    margin-bottom: 12px;
}

.skeleton-meta {
    height: 14px;
    width: 65%;
}

.skeleton-meta-short {
    height: 14px;
    width: 40%;
}

.skeleton-button {
    height: 44px;
    width: calc(100% - 40px);
    margin: 0 20px 20px 20px;
    border-radius: 8px;
}

/* Shimmer Animation Effect */
.skeleton-pulse {
    background: linear-gradient(
        90deg,
        #f1f5f9 0%,
        #e2e8f0 50%,
        #f1f5f9 100%
    );
    background-size: 200% 100%;
    animation: tb-skeleton-shimmer 1.5s infinite linear;
}

@keyframes tb-skeleton-shimmer {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}


/* Event card ------------------------------------------------------------- */

.tb-event-search-results .event-card {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	
	padding: 12px;
    padding-bottom: 16px;

	background: #fff;
    border: 2px solid #9696961a;
    border-radius: 12px;

    transition: all .15s ease-out;
}

.tb-event-search-results .event-card * {
	transition: all .15s ease-out;
}

.tb-event-search-results .event-card:hover {
    box-shadow: 0px 2px 16px 0px #00000029
}

.event-card:hover .event-button {
    color: #ff7c10;
}

/* Event image ------------------------------------------------------------ */

.tb-event-search-results .event-card-header img {
    display: block;
    
    height: 240px;
    width: 100%;
    aspect-ratio: 4/3;
    object-fit: cover;
    
    border-radius: 8px;
}

/* Event content ---------------------------------------------------------- */

.tb-event-search-results .event-card-body {
	flex-grow: 1;
    padding: 10px 0px;
}


/* One-line title --------------------------------------------------------- */

.one-line-ellipsis {
	display: -webkit-box;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 1;
	overflow: hidden;
}


/* Event details ---------------------------------------------------------- */
.tb-event-search-results .event-title {
	margin-bottom: 4px
}

.tb-event-search-results .event-description {
	margin-bottom: 16px;
}

.tb-event-search-results .event-date,
.tb-event-search-results .event-time,
.tb-event-search-results .event-location {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	margin-top: 9px;
	color: #333;
	font-size: 14px;
	line-height: 1.4;
}


/* Buy tickets button ----------------------------------------------------- */

.tb-event-search-results .event-button {
    display: flex;
    align-items: center;
    gap: 4px;

    margin-top: 12px;

    text-decoration: underline;
    font-weight: 600;
    color: #000;
}

/* Empty/error message ---------------------------------------------------- */

.tb-event-search-message {
	margin: 20px 0;
	color: #555;
	font-size: 15px;

    grid-column: 1 / -1; 
}

/* Style for typing instructions & errors */
.tb-event-search-message.tb-hint {
    color: #666;
    font-style: italic;
}

/* Responsive ------------------------------------------------------------- */

@media (max-width: 767px) {

	.tb-event-search-results {
		grid-template-columns: 1fr;
		gap: 18px;
	}

	.tb-event-search-input {
		padding-left: 44px;
		padding-right: 90px;
	}

	.tb-event-search-submit {
		padding: 0 15px;
	}

	.tb-event-search-loading {
		right: 95px;
	}

}


@media (max-width: 1280px) {
    .events-search-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 480px) {
    .events-search-grid {
        grid-template-columns: 1fr;
    }
}