/**
 * TMT Events Plugin - Frontend Styles
 */

/* Container */
.tmt-events-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Month Navigation */
.tmt-month-nav {
    width: 100%;
    margin-bottom: 50px;
}

.tmt-month-nav ul {
    display: flex;
    gap: 0px;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
    flex-wrap: wrap;
}

.tmt-month-nav li {
    margin: 0;
}

.tmt-month-nav .tmt-month-link {
    display: inline-block;
    padding: 0px 12px;
    color: rgba(39, 135, 107, 0.6);
    text-decoration: none;
    font-size: 24px;
    font-weight: 700;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.tmt-month-nav .tmt-month-link:hover {
    color: #2A8259;
}

.tmt-month-nav .tmt-month-link.active {
    color: rgba(39, 135, 107, 1);
    font-weight: 700;
    font-size: 28px;
}

/* Events Grid */
.tmt-events-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    transition: opacity 0.3s ease;
}

.tmt-events-grid.loading {
    opacity: 0.5;
    pointer-events: none;
}

/* Event Card */
.tmt-event-card {
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 15px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.3s ease, transform 0.3s ease;
}

.tmt-event-card:hover {
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
    transform: translateY(-4px);
}

.tmt-event-link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* Event Image */
.tmt-event-image {
    width: 100%;
    aspect-ratio: 3 / 2; /* 360x240 ratio */
    overflow: hidden;
    position: relative;
    display:inline;
    vertical-align: top;
    background: #f0f0f0;
    border-radius: 10px 10px 0 0;
}

.tmt-event-image img {
    width: 100%;
    height: 100%;
    display:inline-block;
    vertical-align: top;
    object-fit: contain; /* Show full image without cropping */
    background: #f0f0f0; /* Fill empty space with background color */
    transition: transform 0.3s ease;
    border-radius: 10px 10px 0 0;
}

.tmt-event-card:hover .tmt-event-image img {

}

/* Event Content */
.tmt-event-content {
    padding: 16px 20px 24px;
}

.tmt-event-title {
    color: #2A8259;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 8px 0;
    letter-spacing: -0.3px;
}

.tmt-event-date {
    color: #333;
    font-size: 15px;
    margin: 0 0 4px 0;
    font-weight: 400;
}

.tmt-event-location {
    color: #666;
    font-size: 14px;
    margin: 0 0 8px 0;
    font-weight: 400;
    display: none;
}

.tmt-event-attendees {
    font-size: 14px;
    color: #333;
    margin: 0;
    font-weight:600;
    line-height: 1.5;
}

.tmt-attendees-label {
    color: #333;
    font-weight: 600;
}

/* Next Month Link */
.tmt-next-month-link {
    text-align: left;
    margin-top: 50px;
    padding-top: 20px;
}

.tmt-next-month-link a {
    color: #2A8259;
    font-size: 20px;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.3s ease;
}

.tmt-next-month-link a:hover {
    color: #1e6347;
}

/* No Events Message */
.tmt-no-events {
    text-align: center;
    padding: 60px 20px;
    color: #666;
    font-size: 16px;
    grid-column: 1 / -1;
}

/* Past Events Dropdown */
.tmt-past-events {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 1px solid #eee;
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.tmt-past-events label {
    color: #333;
    font-size: 16px;
    font-weight: 500;
}

.tmt-past-events-select {
    padding: 10px 40px 10px 15px;
    font-size: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background: #fff;
    color: #333;
    cursor: pointer;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    min-width: 200px;
    transition: border-color 0.3s ease;
}

.tmt-past-events-select:hover {
    border-color: #2A8259;
}

.tmt-past-events-select:focus {
    outline: none;
    border-color: #2A8259;
    box-shadow: 0 0 0 3px rgba(42, 130, 89, 0.1);
}

.tmt-past-events-select optgroup {
    font-weight: 700;
    color: #2A8259;
    padding: 5px 0;
}

.tmt-past-events-select option {
    font-weight: 400;
    color: #333;
    padding: 8px;
}

/* Responsive - Tablet */
@media only screen and (max-width: 1024px) {
    .tmt-events-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .tmt-event-image {
        height: 200px;
    }

    .tmt-month-nav .tmt-month-link {
        font-size: 18px;
        gap: 15px;
    }
}

/* Responsive - Small Tablet */
@media only screen and (max-width: 768px) {
    .tmt-month-nav ul {
        justify-content: flex-start;
        padding-bottom: 10px;
        gap: 0px;
    }

    .tmt-month-nav .tmt-month-link {
        padding: 6px 10px;
        font-size: 16px;
    }

    .tmt-events-grid {
        gap: 20px;
    }

    .tmt-event-content {
        padding: 14px 16px 20px;
    }

    .tmt-event-title {
        font-size: 18px;
    }

    .tmt-event-image {
        margin: 10px;
        width: calc(100% - 20px);
    }
}

/* Responsive - Mobile */
@media only screen and (max-width: 600px) {
    .tmt-events-container {
        padding: 0 15px;
    }

    .tmt-events-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .tmt-event-image {
        height: 200px;
    }

    .tmt-month-nav {
        margin-bottom: 30px;
    }

    .tmt-next-month-link {
        margin-top: 30px;
    }

    .tmt-next-month-link a {
        font-size: 18px;
    }
}
