#xylusec-event-search {
    padding: 10px 15px;
    width: 100%;
    max-width: 400px;
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 16px;
}

#xylusec-search-events {
  text-transform: lowercase;
}

#xylusec-search-events:first-letter {
  text-transform: uppercase;
}

/* Calendar Element */
#xylusec-calendar {
    flex-grow: 1;
    margin: 0;
}

/* Event styling */
#xylusec-calendar .fc-event {
    cursor: pointer;
    padding: 5px;
    margin: 2px;
    border-radius: 4px;
    border: none;
    font-size: 12px;
    overflow: hidden;
    text-overflow: ellipsis;
    border-radius: 5px;
}

#xylusec-calendar .fc-xylusec-event-image {
    width: 100%;
    height: auto;
    margin-bottom: 5px;
    border-radius: 2px;
}


/* Tooltip Styles */
.xylusec-event-tooltip {
	position: absolute;
	z-index: 99999;
    width: 250px;
	background: #fff;
	padding: 10px;
	border: 1px solid #ccc;
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
	border-radius: 6px;
	transition: opacity 0.2s ease;
	opacity: 0;
	visibility: hidden;
	pointer-events: auto;
	display: none;
    transform: translateX(-50%);
}

.xylusec-event-tooltip p{
    line-height: unset;
}

.xylusec-event-tooltip img {
    width: 100%;
    height: auto;
    border-radius: 3px;
    margin-bottom: 8px;
}

.xylusec-event-tooltip h4 {
    margin: 0 0 5px 0;
    font-size: 16px;
    color: #333;
    cursor: pointer; /* clickable title */
}

.xylusec-event-tooltip .xylusec-event-date {
    font-size: 13px;
    color: #666;
    margin-bottom: 5px;
}

/* Popup Overlay */
.xylusec-event-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 1000000000;
}

/* Popup Content */
.xylusec-event-popup {
    background: white;
    padding: 20px;
    width: 400px;
    border-radius: 8px;
    position: relative;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.xylusec-event-popup .close-popup {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 22px;
    cursor: pointer;
}

.xylusec-event-popup img {
    width: 100%;
    border-radius: 4px;
    margin-top: 10px;
}

/* grid view css start */
.xylusec-event-grid-container {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columns */
    gap: 25px;
    padding: 20px 0;
}

.xylusec-event-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex;
    flex-direction: column;
}

/* Responsive adjustments */
@media (max-width: 1200px) {
    .xylusec-event-grid-container {
        grid-template-columns: repeat(3, 1fr); /* 3 columns */
    }
}

@media (max-width: 900px) {
    .xylusec-event-grid-container {
        grid-template-columns: repeat(2, 1fr); /* 2 columns */
    }
}

@media (max-width: 600px) {
    .xylusec-event-grid-container {
        grid-template-columns: 1fr; /* 1 column */
    }
}

/* Rest of your existing CSS remains the same */
.xylusec-event-img img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    display: block;
}

.xylusec-event-info {
    padding: 20px;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
}

.xylusec-event-title {
    font-size: 18px;
    margin: 0 0 12px 0;
    color: #222;
    line-height: 1.3;
    font-weight: 600;
}

.xylusec-event-meta {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 14px;
    color: #555;
}

.xylusec-event-location {
    font-weight: 500;
}

.xylusec-event-date {
    color: #666;
}

.xylusec-event-excerpt {
    font-size: 14px;
    color: #555;
    line-height: 1.5;
    margin: 0 0 20px 0;
    flex-grow: 1;
}

.xylusec-event-footer {
    margin-top: auto;
}

/* grid view css end */


/* row view css start */
.xylusec-event-row {
    padding: 0;
    margin-bottom: 30px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.xylusec-event-row-content {
    display: flex;
    width: 100%;
}

.xylusec-event-image {
    width: 300px;
    height: auto;
    object-fit: cover;
    flex-shrink: 0;
}

.xylusec-image-anchor-container {
    min-width: 30%;
    display: block;
    overflow: hidden;
    width: 30%;
}

.xylusec-image-anchor-container img {
    width: 100%;
    object-fit: cover;
    object-position: center;
    overflow: hidden;
    height: 280px;
}

.xylusec-event-details {
    padding: 25px;
    flex-grow: 1;
}

.xylusec-event-title {
    font-size: 24px;
    margin: 0 0 10px 0;
    color: #333;
}

.xylusec-event-location {
    font-size: 16px;
    color: #555;
    margin-bottom: 15px;
    font-weight: 500;
}

.xylusec-event-excerpt {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.xylusec-event-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.xylusec-event-date {
    font-size: 14px;
    color: #555;
    font-weight: 500;
}

.xylusec-event-meta-row{
    display: flex;
    flex-direction: row;
    margin-bottom: 0;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .xylusec-event-row-content {
        flex-direction: column;
    }
    
    .xylusec-event-image {
        width: 100%;
        height: 200px;
    }

    .xylusec-image-anchor-container {
        width: 100%;
    }
}

@media (max-width: 600px) {
  .xylusec-event-meta-row {
    display: flex;
    flex-direction: column;
  }
  .xylusec-event-meta-row a{
    width: 100% !important;
  }
  .xylusec-image-anchor-container {
    width: 100%;
  }
}

/* row view css end */

/* Button Styles */

.xylusec-event-button {
    display: inline-block;
    background: #000;
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    transition: background 0.3s;
    box-sizing: border-box;
}
#xylusec-calendar-container .fc-button {
    padding: 8px 14px;
    background-color: #2c3e50;
    color: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 0;
    font-size: 14px;
    display: flex;
    align-items: center;
}

#xylusec-calendar-container .fc-toolbar-chunk{
    display: flex;
}



#xylusec-calendar-container .fc-button:first-child {
    border-radius: 5px 0 0 5px;
}

#xylusec-calendar-container .fc-button:last-child {
    border-radius: 0 5px 5px 0;
}

#xylusec-calendar-container .fc-button:hover {
    background-color: #2c3e50;
}


/* Responsive (Mobile View) */
@media (max-width: 768px) {
    #xylusec-calendar-container .fc-button-group {
        justify-content: space-between;
        width: 100%;
    }

    #xylusec-calendar-container .fc-button {
        flex: 1 1 auto;
        font-size: 16px;
    }

    #xylusec-search-events {
        width: 100%;
    }
}
/*button css end*/

/* calendar css start */
@media ( max-width: 768px ) {
    #xylusec-calendar-container {
        height: auto;
        min-height: 100vh;
        padding: 10px;
    }
    
    #xylusec-calendar .fc-toolbar {
        flex-direction: column;
    }
    
    #xylusec-calendar .fc-toolbar-title {
        margin: 10px 0;
        font-size: 1.2em;
    }
    
    #xylusec-event-search {
        max-width: 100%;
    }
}

#xylusec-calendar  .fc-dayGridMonth-view tr.fc-scrollgrid-section.fc-scrollgrid-section-header th {
    width: 100% !important;
    padding: 0 !important;
}

#xylusec-calendar tr.fc-scrollgrid-section.fc-scrollgrid-section-body td{
    padding: 0 !important;
}

#xylusec-calendar table.fc-scrollgrid-sync-table {
    width: 100% !important;
}

#xylusec-calendar-container .fc-header-toolbar.fc-toolbar.fc-toolbar-ltr{
    border: 1px solid #d3d3d3;
    border-radius: 5px;
    padding: 1em;
}
#xylusec-calendar-container a.fc-col-header-cell-cushion {
    padding: 10px !important;
}

#xylusec-calendar-container .fc-daygrid-day-frame {
  border-radius: 4px;
}

#xylusec-calendar-container .fc-col-header {
    border-radius: 5px;
}

#xylusec-calendar-container .fc-scrollgrid {
  border-radius: 5px; 
}

#xylusec-calendar-container .fc-scrollgrid-section > td {
  border-radius: 0px 0px 5px 5px;
}
#xylusec-calendar-container .fc-scrollgrid-section > th {
  border-radius: 0px 5px 0px 0px;
}

#xylusec-calendar-container .fc .fc-daygrid-day-top {
    display: flex;
    flex-direction: row-reverse;
    justify-content: flex-end;
}

#xylusec-calendar-container .fc .fc-day-other .fc-daygrid-day-top, .fc-daygrid-day-top{
    padding: 10px !important;
}

#xylusec-calendar-container .fc-today-button {
    border-radius: 5px !important;
}

#xylusec-calendar-container a.xylusec-event-button:hover, .xylusec_load_more_button:hover, .fc-button-group .fc-button:hover, .xylusec-custom-buttons-container .fc-button:hover {
    opacity: 0.8;
}
#xylusec-calendar-container .fc-event-past {
    opacity: 0.6;
}

#xylusec-calendar-container a{
    text-decoration: none !important;
}

#xylusec-calendar table.fc-col-header{
    margin: 0;
}
 #xylusec-calendar table.fc-scrollgrid-sync-table {
    margin-bottom:0;
}

#xylusec-calendar-container .fc-xylusec-event-title{
    white-space: normal;
    text-overflow: unset;
    overflow: visible;
    word-break: break-word;
    line-height: 1.5;
}
#xylusec-calendar .fc-daygrid-event-dot, #xylusec-calendar .fc-event-time{
    display: none;
}


#xylusec-calendar .fc .fc-scroller-liquid-absolute {
    inset: 0px;
    position: unset !important;
    overflow: visible !important;
}

#xylusec-calendar .fc-daygrid-day-top {
    margin: -10px 0 0 -5px;
}


/* calendar css end */

.xylusec-custom-buttons-container {
    display:flex;
    justify-content:space-between;
    align-items: stretch;
    margin-bottom:10px;
    border: 1px solid #d3d3d3;
    padding: 1em;
    border-radius: 5px;
}
.xylusec-custom-buttons-container-first-child{
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 5px;
    align-items: stretch;
}

@media ( max-width: 768px ) {
    #xylusec-calendar-container.fc-header-toolbar.fc-toolbar.fc-toolbar-ltr {
        display: flex;
        flex-direction: row;
    }
    #xylusec-calendar-container .fc-toolbar-chunk:first-child {
        display: flex;
    }
    #xylusec-calendar-container .xylusec-custom-buttons-container{
        display:flex;
        justify-content:space-between;
        align-items:center;
        margin-bottom:10px;
        border: 1px solid #d3d3d3;
        padding: 1em;
        border-radius: 5px;
        gap:10px;
    }
}

@media ( max-width: 480px ) {
    .fc-header-toolbar.fc-toolbar.fc-toolbar-ltr {
        border: 1px solid #d3d3d3;
        border-radius: 5px;
        padding: 1em;
        gap: 10px;
        display: flex;
        flex-direction: column;
    }
    .xylusec-custom-buttons-container{
        display:flex;
        justify-content:space-between;
        align-items:center;
        margin-bottom:10px;
        border: 1px solid #d3d3d3;
        padding: 1em;
        border-radius: 5px;
        gap:10px;
        flex-direction: column;
    }
    .xylusec-custom-buttons-container-first-child{
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 5px;
    }

}


.xylusec_load_more_button{
    background-color: #2c3e50;
    color: #fff;
    display: inline-block;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 5px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s;
    border: none;
}

@media (max-width: 768px) {
    .xylusec_load_more_button {
        padding: 10px !important;
    }
}

/* spinner css start */
.xylusec-spinner-main{
    display: flex;
    justify-content: center;
}

.xylusec-load-spinner {
    margin-top: 15px;
    height: 30px;
    aspect-ratio: 2.5;
    --_g: no-repeat radial-gradient(farthest-side,#33333380 90%,#0000);
    background: var(--_g), var(--_g), var(--_g), var(--_g);
    background-size: 20% 50%;
    animation: l44 1s infinite linear alternate; 
}
@keyframes l44 {
    0%,
    5%    {background-position: calc(0*100%/3) 50% ,calc(1*100%/3) 50% ,calc(2*100%/3) 50% ,calc(3*100%/3) 50% }
    12.5% {background-position: calc(0*100%/3) 0   ,calc(1*100%/3) 50% ,calc(2*100%/3) 50% ,calc(3*100%/3) 50% }
    25%   {background-position: calc(0*100%/3) 0   ,calc(1*100%/3) 0   ,calc(2*100%/3) 50% ,calc(3*100%/3) 50% }
    37.5% {background-position: calc(0*100%/3) 100%,calc(1*100%/3) 0   ,calc(2*100%/3) 0   ,calc(3*100%/3) 50% }
    50%   {background-position: calc(0*100%/3) 100%,calc(1*100%/3) 100%,calc(2*100%/3) 0   ,calc(3*100%/3) 0   }
    62.5% {background-position: calc(0*100%/3) 50% ,calc(1*100%/3) 100%,calc(2*100%/3) 100%,calc(3*100%/3) 0   }
    75%   {background-position: calc(0*100%/3) 50% ,calc(1*100%/3) 50% ,calc(2*100%/3) 100%,calc(3*100%/3) 100%}
    87.5% {background-position: calc(0*100%/3) 50% ,calc(1*100%/3) 50% ,calc(2*100%/3) 50% ,calc(3*100%/3) 100%}
    95%,
    100%  {background-position: calc(0*100%/3) 50% ,calc(1*100%/3) 50% ,calc(2*100%/3) 50% ,calc(3*100%/3) 50% }
}
/* spinner css end */


/* staggered view start */
.xylusec-custom-grid-staggered-view {
  padding: 10px 0px;
}

.xylusec-event-grid-staggered-container {
  column-count: 4;
}

.xylusec-event-card-staggered {
  display: block;
  width: 100%;
  background: #fff;
  margin-bottom: 20px;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #e0e0e0;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  position: relative;
}

.xylusec-staggered-image img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.xylusec-staggered-details {
  padding: 15px;
}

.xylusec-event-title {
  font-size: 18px;
  font-weight: bold;
  margin-bottom: 10px;
}

.xylusec-event-location,
.xylusec-event-date {
  font-size: 14px;
  color: #777;
  margin-bottom: 6px;
}

.xylusec-event-excerpt {
  font-size: 15px;
  color: #444;
  margin-bottom: 12px;
}

.xylusec-load-more-wrap {
  margin-top: 40px;
  text-align: center;
}

/* Responsive columns */
@media (max-width: 1200px) {
  .xylusec-event-grid-staggered-container {
    column-count: 3;
  }
}
@media (max-width: 900px) {
  .xylusec-event-grid-staggered-container {
    column-count: 2;
  }
}
@media (max-width: 600px) {
  .xylusec-event-grid-staggered-container {
    column-count: 1;
  }
}
/* staggered view end */