/**
 * Meetup Events Styles
 * @package EmbedPress
 * @since 1.0
 */

/* Main container for Meetup events */
.embedpress-meetup-events {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    max-width: 100%;
    margin: 0 auto;
    background: #f8f9fa;
    border-radius: 0;
    box-shadow: none;
    overflow: hidden;
}

/* Events header section */
.ep-events-header {
    background: #ffffff;
    color: #333;
    padding: 24px 32px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.ep-events-title {
    font-size: 24px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #212529;
}

.ep-events-description {
    font-size: 14px;
    margin: 0;
    color: #6c757d;
}

/* Events list container */
.ep-events-list {
    padding: 0;
    background: #f8f9fa;
}

/* Individual event card */
.ep-single-event {
    background: #ffffff;
    margin: 16px;
    border-radius: 12px;
    transition: box-shadow 0.3s ease, transform 0.2s ease;
    overflow: hidden;
}

.ep-single-event:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

/* Event content layout */
.ep-event-content {
    display: flex;
    align-items: flex-start;
    gap: 24px;
    padding: 24px;
}

.ep-event-info {
    flex: 1;
    min-width: 0;
}

/* Event date styling */
.ep-event-date {
    display: inline-block;
    color: rgb(0 130 155);
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 8px;
}

/* Event title styling */
.ep-event-title {
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.ep-event-title a {
    color: #212529;
    text-decoration: none;
    transition: color 0.3s ease;
    display: block;
}

.ep-event-title a:hover {
    color: #0066cc;
}

/* Event venue styling */
.ep-event-venue {
    display: flex;
    align-items: center;
    color: #6c757d;
    font-size: 14px;
    margin-bottom: 12px;
    font-weight: 400;
}

.ep-venue-icon {
    margin-right: 6px;
    font-size: 14px;
}

/* Event description styling */
.ep-event-description {
    color: #495057;
    line-height: 1.5;
    font-size: 14px;
    margin-bottom: 16px;
}

/* Event image styling */
.ep-event-image {
    flex-shrink: 0;
    width: 150px;
    border-radius: 8px;
    overflow: hidden;
}

.ep-event-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.ep-single-event:hover .ep-event-image img {
    transform: scale(1.05);
}

/* Event footer with attendees and button */
.ep-event-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 16px;
}

.ep-event-attendees {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ep-attendees-avatars {
    display: flex;
    margin-right: 8px;
}

.ep-avatar {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    margin-left: -6px;
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.ep-avatar:first-child {
    margin-left: 0;
}

.ep-avatar-1 {
    background: linear-gradient(45deg, #667eea, #764ba2);
}

.ep-avatar-2 {
    background: linear-gradient(45deg, #f093fb, #f5576c);
}

.ep-avatar-3 {
    background: linear-gradient(45deg, #4facfe, #00f2fe);
}

.ep-avatar-4 {
    background: linear-gradient(45deg, #43e97b, #38f9d7);
}

.ep-attendees-count {
    font-size: 13px;
    color: #6c757d;
    font-weight: 500;
}

.ep-attend-button {
    border-radius: 8px;
    border: 2px solid #00798a;
    cursor: pointer;
    color: #fff;
    fill: #fff;
    padding: 4px 12px;
    color: #00798a!important;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s ease, border-color 0.3s ease;
    text-decoration: none;
}

.ep-attend-button:hover {
    color: #fff!important;
    background-color: #008fa3;
    border-color: #008fa3;
}

/* Empty state styling */
.ep-events-empty {
    text-align: center;
    padding: 60px 32px;
    color: #6c757d;
    font-size: 16px;
    background: #ffffff;
    border-radius: 12px;
    margin: 16px;
}

/* Responsive design */
@media (max-width: 768px) {
    .ep-events-header {
        padding: 16px 20px;
    }

    .ep-events-title {
        font-size: 20px;
    }

    .ep-single-event {
        margin: 12px;
    }

    .ep-event-content {
        flex-direction: column;
        gap: 16px;
        padding: 20px;
    }

    .ep-event-image {
        width: 100%;
        height: 160px;
        order: -1;
    }

    .ep-event-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .ep-attend-button {
        align-self: stretch;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .ep-events-header {
        padding: 20px 16px;
    }

    .ep-events-title {
        font-size: 22px;
    }

    .ep-events-list {
        padding: 16px 12px;
    }

    .ep-single-event {
        padding: 16px;
    }

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

/* Loading state */
.ep-events-loading {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.ep-events-loading::before {
    content: '⏳';
    display: block;
    font-size: 24px;
    margin-bottom: 12px;
}

/* Error state */
.ep-events-error {
    text-align: center;
    padding: 40px 20px;
    color: #dc2626;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin: 20px;
}

.ep-events-error::before {
    content: '⚠️';
    display: block;
    font-size: 24px;
    margin-bottom: 12px;
}

/* Empty state */
.ep-events-empty {
    text-align: center;
    padding: 40px 20px;
    color: #6b7280;
}

.ep-events-empty::before {
    content: '📅';
    display: block;
    font-size: 24px;
    margin-bottom: 12px;
}

.ep-event-top-content {
    display: flex;
    gap: 15px;
    justify-content: space-between;
}

/* Load More Button Styles */
.ep-events-load-more {
    text-align: center;
    padding: 24px 16px;
    background: #f8f9fa;
}

.ep-load-more-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 32px;
    background: rgb(0 130 155);
    color: #ffffff;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 130, 155, 0.2);
}

.ep-load-more-button:hover {
    background: rgb(0 110 135);
    box-shadow: 0 4px 12px rgba(0, 130, 155, 0.3);
    transform: translateY(-1px);
}

.ep-load-more-button:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(0, 130, 155, 0.2);
}

.ep-load-more-button:disabled {
    background: #9ca3af;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}

.ep-load-more-button.loading .ep-load-more-text {
    opacity: 0.7;
}

.ep-load-more-spinner {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ep-load-more-spinner svg {
    animation: ep-spin 1s linear infinite;
}

@keyframes ep-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Responsive styles for load more button */
@media (max-width: 480px) {
    .ep-load-more-button {
        width: 100%;
        max-width: 300px;
        padding: 14px 24px;
    }
}