/**
 * EventsRite Frontend Styles
 * File Path: eventsrite/assets/css/er-frontend.css
 * 
 * Restored to match original layout and structure
 */

/* Container */
.er-events-list-container,
.er-events-table-container {
	width:100% !important;
    max-width:1200px !important;
    margin: 0 auto;
}

/* Filters */
.er-filters {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.er-search-box {
    margin-bottom: 20px;
}

.er-search-input {
    width: calc(100% - 32px);
    padding: 12px 16px;
    font-size: 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    transition: border-color 0.3s;
}

.er-search-input:focus {
    outline: none;
    border-color: #0073aa;
}

.er-filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: flex-end;
}

.er-filter-controls select {
    flex: 1;
    min-width: 150px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    font-size: 14px;
}

.er-date-filters {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 200px;
}

.er-date-filters input[type="date"] {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Events List */
.er-events-list {
    display: grid;
    gap: 20px;
}

.er-no-events {
    text-align: center;
    padding: 60px 20px;
    color: #666;
}

.er-no-events p {
    font-size: 18px;
    margin: 0;
}

/* Event Item */
.er-event-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    transition: all 0.3s ease;
    margin-bottom: 20px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
	width:100%;
	max-width:800px;
	margin: -20px auto;
	
}

.er-event-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

/* Event Content */
.er-event-content {
    position: relative;
}

/* Event Image - Full width at top */
.er-event-image {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: relative;
	
}

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

.er-event-item:hover .er-event-image img {
    transform: scale(1.05);
}

/* Event Header */
.er-event-header {
    padding: 20px 20px 0 20px;
}

.er-event-header {
    margin-bottom: 15px;
}

.er-event-title {
    margin: 0 0 10px 0;
    font-size: 20px;
    line-height: 1.3;
}

.er-event-title a {
    color: #333;
    text-decoration: none;
    transition: color 0.3s;
}

.er-event-title a:hover {
    color: #0073aa;
}

/* Event Badges */
.er-event-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.er-badge {
    display: inline-block;
    padding: 4px 10px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.er-badge-free {
    background: #4CAF50;
    color: white;
}

.er-badge-online {
    background: #2196F3;
    color: white;
}

.er-badge-category {
    background: #666;
    color: white;
}

/* Event Meta */
.er-event-meta {
    padding: 15px 20px;
    color: #666;
    font-size: 14px;
}

.er-event-meta > div {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.er-event-meta > div:last-child {
    margin-bottom: 0;
}

.er-icon {
    width: 16px;
    height: 16px;
    margin-right: 8px;
    opacity: 0.6;
    flex-shrink: 0;
}

.er-icon-calendar::before {
    content: "📅";
}

.er-icon-location::before {
    content: "📍";
}

.er-icon-organiser::before {
    content: "👥";
}

/* Event Summary */
.er-event-summary {
    margin-top: 15px;
    color: #555;
    font-size: 14px;
    line-height: 1.6;
}

/* Event Organiser */
.er-event-organiser {
    display: flex;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #eee;
}

.er-organiser-logo {
    height: 40px;
    width: auto;
    max-width: 150px;
    object-fit: contain;
}

/* Event Actions */
.er-event-actions {
    display: flex;
    gap: 10px;
    padding: 0 20px 20px 20px;
}

/* Buttons */
.er-btn-primary,
.er-btn-secondary {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: inline-block;
	margin:5px;
}

.er-btn-primary {
    background: #0073aa;
    color: white;
}

.er-btn-primary:hover {
    background: #005a87;
    color: white;
}

.er-btn-secondary {
    background: white;
    color: #0073aa;
    border: 2px solid #0073aa;
}

.er-btn-secondary:hover {
    background: #0073aa;
    color: white;
}

.er-btn-large {
    padding: 15px 30px;
    font-size: 16px;
}

.er-btn-small {
    padding: 6px 12px;
    font-size: 12px;
}

/* Table View */
.er-table-wrapper {
    overflow-x: auto;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
}

.er-events-table {
    width: 100%;
    border-collapse: collapse;
}

.er-events-table th,
.er-events-table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.er-events-table th {
    background: #f9f9f9;
    font-weight: 600;
    color: #333;
    white-space: nowrap;
}

.er-events-table tbody tr {
    transition: background-color 0.3s;
}

.er-events-table tbody tr:hover {
    background: #f5f5f5;
}

.er-event-name strong {
    display: block;
    margin-bottom: 5px;
}

.er-organiser-logo-small {
    height: 30px;
    width: auto;
    max-width: 80px;
    display: block;
}

.er-time {
    color: #666;
    font-size: 12px;
}

.er-venue-city {
    color: #666;
    font-size: 12px;
}

.er-online-indicator {
    color: #2196F3;
    font-weight: 600;
}

/* Pagination */
.er-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin: 30px 0;
}

.er-page-link,
.er-page-current {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s;
}

.er-page-link:hover {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.er-page-current {
    background: #0073aa;
    color: white;
    border-color: #0073aa;
}

.er-page-dots {
    padding: 0 8px;
    color: #666;
}

/* Loading */
.er-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.er-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #0073aa;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-right: 10px;
    vertical-align: middle;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Modal */
.er-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.er-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    cursor: pointer;
}

.er-modal-content {
    position: relative;
    background: white;
    border-radius: 8px;
    max-width: 800px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.er-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    font-size: 30px;
    cursor: pointer;
    color: #999;
    z-index: 1;
    transition: color 0.3s;
}

.er-modal-close:hover {
    color: #333;
}

.er-modal-body {
    padding: 30px;
}

.er-modal-header {
    margin-bottom: 30px;
    text-align: center;
}

.er-modal-image {
    margin-bottom: 20px;
}

.er-modal-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.er-modal-title {
    font-size: 28px;
    margin: 0 0 15px 0;
    color: #333;
}

.er-modal-badges {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}

.er-modal-details {
    margin-bottom: 30px;
}

.er-detail-section {
    margin-bottom: 25px;
    padding-bottom: 25px;
    border-bottom: 1px solid #e0e0e0;
}

.er-detail-section:last-child {
    border-bottom: none;
}

.er-detail-section h3 {
    font-size: 18px;
    margin: 0 0 10px 0;
    color: #333;
}

.er-detail-section p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

.er-event-description {
    color: #555;
    line-height: 1.8;
}

.er-organiser-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.er-organiser-info .er-organiser-logo {
    height: 40px;
}

.er-timezone {
    color: #999;
    font-size: 14px;
}

.er-modal-footer {
    text-align: center;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

/* Responsive */
@media (max-width: 768px) {
    .er-filter-controls {
        flex-direction: column;
    }
    
    .er-filter-controls select,
    .er-date-filters {
        width: 100%;
    }
    
    .er-event-image {
        height: 200px;
    }
    
    .er-events-table {
        font-size: 14px;
    }
    
    .er-events-table th,
    .er-events-table td {
        padding: 8px;
    }
    
    .er-col-category,
    .er-col-organiser {
        display: none;
    }
    
    .er-modal-content {
        margin: 20px;
    }
    
    .er-modal-title {
        font-size: 22px;
    }
    
    .er-event-actions {
        flex-direction: column;
    }
    
    .er-event-actions .er-btn-primary,
    .er-event-actions .er-btn-secondary {
        width: 100%;
    }
}
    }
    
    .er-event-actions {
        flex-direction: column;
    }
    
    .er-event-actions .er-btn-primary,
    .er-event-actions .er-btn-secondary {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .er-event-title {
        font-size: 18px;
    }
    
    .er-pagination {
        flex-wrap: wrap;
    }
    
    .er-page-link,
    .er-page-current {
        padding: 6px 10px;
        font-size: 14px;
    }
}

/* Print Styles */
@media print {
    .er-filters,
    .er-pagination,
    .er-event-actions,
    .er-modal {
        display: none !important;
    }
    
    .er-event-item {
        page-break-inside: avoid;
        border: 1px solid #000;
        margin-bottom: 10px;
    }
    
    .er-events-table {
        border: 1px solid #000;
    }
    
    .er-events-table th,
    .er-events-table td {
        border: 1px solid #000;
    }
}


/* Filter Controls - Better alignment */
.er-filter-controls {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    align-items: center; /* Changed from flex-end to center */
}

/* Clear Filters Button - Proper styling */
.er-clear-filters {
    flex-shrink: 0;
    white-space: nowrap;
}

/* Date Filters - Better structure */
.er-date-filters {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 300px; /* Increased from 200px */
}

/* Ensure all form elements have consistent height */
.er-filter-controls select,
.er-filter-controls input[type="date"],
.er-clear-filters {
    height: 44px; /* Consistent height */
    box-sizing: border-box;
}

/* Button refinements */
.er-btn-secondary {
    padding: 10px 20px;
    border: 2px solid #0073aa;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: inline-block;
    background: white;
    color: #0073aa;
    line-height: 1.5;
}

.er-btn-secondary:hover {
    background: #0073aa;
    color: white;
    text-decoration: none;
}

/* Fix button focus states */
.er-btn-secondary:focus {
    outline: 2px solid #0073aa;
    outline-offset: 2px;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .er-date-filters {
        min-width: 100%;
    }
    
    .er-clear-filters {
        width: 100%;
        margin-top: 5px;
    }
}

td.er-col-actions

 {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
}