/**
 * Events Calendar Pro - Frontend Styles
 */

/* Calendar Wrapper */
.ecp-calendar-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
}

#ecp-calendar-view {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* Calendar Header */
.ecp-calendar-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    gap: 20px;
}

.ecp-calendar-logo img {
    max-height: 60px;
    width: auto;
}

.ecp-calendar-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.ecp-current-period {
    margin: 0;
    font-size: 24px;
    font-weight: 600;
    color: #333;
}

.ecp-nav-button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.ecp-nav-button:hover {
    background: #45a049;
}

.ecp-nav-button .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
}

/* View Switcher */
.ecp-view-switcher {
    display: flex;
    gap: 5px;
    background: #f5f5f5;
    padding: 5px;
    border-radius: 5px;
}

.ecp-view-button {
    background: transparent;
    border: none;
    padding: 8px 16px;
    cursor: pointer;
    border-radius: 3px;
    transition: all 0.3s;
    font-size: 14px;
}

.ecp-view-button:hover,
.ecp-view-button.active {
    background: #4CAF50;
    color: white;
}

/* Calendar Filters */
.ecp-calendar-filters {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.ecp-search-box {
    display: flex;
    flex: 1;
    min-width: 250px;
}

.ecp-search-box input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px 0 0 5px;
    font-size: 14px;
}

.ecp-search-box button {
    background: #4CAF50;
    color: white;
    border: none;
    padding: 10px 15px;
    border-radius: 0 5px 5px 0;
    cursor: pointer;
}

.ecp-category-filter select {
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    min-width: 200px;
}

/* Calendar Grid - Month View */
.ecp-calendar-month {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    background: #ddd;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.ecp-calendar-day-header {
    background: #4CAF50;
    color: white;
    padding: 15px;
    text-align: center;
    font-weight: 600;
    font-size: 14px;
}

.ecp-calendar-day {
    background: white;
    min-height: 120px;
    padding: 10px;
    position: relative;
}

.ecp-calendar-day.other-month {
    background: #f5f5f5;
    opacity: 0.6;
}

.ecp-calendar-day.today {
    background: #e8f5e9;
}

.ecp-day-number {
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.ecp-day-events {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.ecp-event-item {
    background: #4CAF50;
    color: white;
    padding: 4px 8px;
    border-radius: 3px;
    font-size: 12px;
    cursor: pointer;
    transition: background 0.3s;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ecp-event-item:hover {
    background: #45a049;
}

/* Week View */
.ecp-calendar-week {
    display: grid;
    grid-template-columns: 80px repeat(7, 1fr);
    gap: 1px;
    background: #ddd;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
}

.ecp-time-slot {
    background: #f5f5f5;
    padding: 10px;
    text-align: center;
    font-size: 12px;
    border-right: 1px solid #ddd;
}

.ecp-week-day {
    background: white;
    padding: 10px;
    min-height: 60px;
}

/* Day View */
.ecp-calendar-day-view {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
}

.ecp-day-view-header {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    color: #333;
}

.ecp-day-view-events {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

/* List View */
.ecp-calendar-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.ecp-list-event {
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    display: flex;
    gap: 20px;
    transition: box-shadow 0.3s;
}

.ecp-list-event:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

.ecp-list-event-image {
    width: 200px;
    height: 150px;
    object-fit: cover;
    border-radius: 5px;
    flex-shrink: 0;
}

.ecp-list-event-content {
    flex: 1;
}

.ecp-list-event-title {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 10px;
    color: #333;
}

.ecp-list-event-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 10px;
    color: #666;
    font-size: 14px;
}

.ecp-list-event-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.ecp-list-event-description {
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.ecp-list-event-button {
    background: #4CAF50;
    color: white;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s;
}

.ecp-list-event-button:hover {
    background: #45a049;
}

/* Event Modal */
.ecp-modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    overflow: auto;
}

.ecp-modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 8px;
    width: 90%;
    max-width: 800px;
    position: relative;
    animation: slideDown 0.3s;
}

@keyframes slideDown {
    from {
        transform: translateY(-50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.ecp-modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #aaa;
    cursor: pointer;
}

.ecp-modal-close:hover {
    color: #000;
}

.ecp-event-detail-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 20px;
}

.ecp-event-detail-title {
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 15px;
    color: #333;
}

.ecp-event-detail-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.ecp-event-detail-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
}

.ecp-event-detail-description {
    line-height: 1.8;
    color: #444;
    margin-bottom: 20px;
}

.ecp-event-detail-map {
    width: 100%;
    height: 300px;
    border-radius: 8px;
    margin-top: 20px;
}

/* Submission Form */
.ecp-submission-form-wrapper {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
}

.ecp-submission-form {
    background: white;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.ecp-form-section {
    margin-bottom: 30px;
}

.ecp-form-section h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
    border-bottom: 2px solid #4CAF50;
    padding-bottom: 10px;
}

.ecp-form-group {
    margin-bottom: 20px;
}

.ecp-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.ecp-form-group .required {
    color: #f44336;
}

.ecp-form-group input[type="text"],
.ecp-form-group input[type="email"],
.ecp-form-group input[type="date"],
.ecp-form-group input[type="time"],
.ecp-form-group input[type="file"],
.ecp-form-group select,
.ecp-form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.ecp-form-group input:focus,
.ecp-form-group select:focus,
.ecp-form-group textarea:focus {
    outline: none;
    border-color: #4CAF50;
}

.ecp-form-row {
    display: flex;
    gap: 20px;
}

.ecp-col-6 {
    flex: 1;
}

.ecp-submit-button {
    background: #4CAF50;
    color: white;
    padding: 15px 40px;
    border: none;
    border-radius: 5px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.ecp-submit-button:hover {
    background: #45a049;
}

.ecp-submit-button:disabled {
    background: #ccc;
    cursor: not-allowed;
}

#ecp-submission-message {
    margin-top: 20px;
    padding: 15px;
    border-radius: 5px;
    display: none;
}

#ecp-submission-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
    display: block;
}

#ecp-submission-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    display: block;
}

.description {
    font-size: 13px;
    color: #666;
    margin-top: 5px;
}

/* Export Buttons */
.ecp-export-buttons {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.ecp-export-buttons h3 {
    margin-bottom: 15px;
    color: #333;
}

.ecp-export-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    margin-right: 10px;
    margin-bottom: 10px;
    background: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    transition: background 0.3s;
}

.ecp-export-button:hover {
    background: #45a049;
}

/* Social Sharing */
.ecp-social-sharing {
    margin: 30px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.ecp-social-sharing h3 {
    margin-bottom: 15px;
    color: #333;
}

.ecp-social-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.ecp-social-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 5px;
    text-decoration: none;
    color: white;
    transition: opacity 0.3s;
}

.ecp-social-button:hover {
    opacity: 0.8;
}

.ecp-social-button svg {
    width: 20px;
    height: 20px;
}

.ecp-facebook { background: #1877f2; }
.ecp-twitter { background: #1da1f2; }
.ecp-linkedin { background: #0077b5; }
.ecp-whatsapp { background: #25d366; }
.ecp-email { background: #666; }

/* Responsive Design */
@media (max-width: 768px) {
    .ecp-calendar-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .ecp-calendar-controls {
        width: 100%;
        justify-content: space-between;
    }
    
    .ecp-current-period {
        font-size: 16px;
    }
    
    .ecp-view-switcher {
        width: 100%;
        justify-content: space-between;
    }
    
    .ecp-calendar-wrapper {
        padding: 10px;
    }
    
    #ecp-calendar-view {
        margin: 0 -10px;
        padding: 0 10px;
    }
    
    .ecp-calendar-month {
        font-size: 9px;
        gap: 0;
        border-radius: 4px;
    }
    
    .ecp-calendar-day-header {
        padding: 6px 2px;
        font-size: 10px;
        font-weight: 600;
    }
    
    .ecp-calendar-day {
        min-height: 60px;
        padding: 3px 1px;
        font-size: 9px;
    }
    
    .ecp-day-number {
        font-size: 11px;
        font-weight: 600;
    }
    
    .ecp-event-dot {
        width: 3px;
        height: 3px;
        margin: 1px;
    }
    
    .ecp-event-title {
        display: none;
    }
    
    .ecp-list-event {
        flex-direction: column;
    }
    
    .ecp-list-event-image {
        width: 100%;
    }
    
    .ecp-form-row {
        flex-direction: column;
    }
    
    .ecp-modal-content {
        width: 95%;
        padding: 20px;
        margin: 10% auto;
    }
    
    .ecp-calendar-filters {
        flex-direction: column;
    }
    
    .ecp-search-box {
        width: 100%;
    }
    
    .ecp-category-filter select {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .ecp-calendar-month {
        font-size: 8px;
    }
    
    .ecp-calendar-day-header {
        padding: 5px 1px;
        font-size: 9px;
    }
    
    .ecp-calendar-day {
        min-height: 50px;
        padding: 2px 1px;
    }
    
    .ecp-day-number {
        font-size: 10px;
    }
}

/* Loading Spinner */
.ecp-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.ecp-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #4CAF50;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    animation: spin 1s linear infinite;
}

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

/* Category Badge */
.ecp-category-badge {
    display: inline-block;
    padding: 4px 10px;
    background: #e3f2fd;
    color: #1976d2;
    border-radius: 12px;
    font-size: 12px;
    margin-right: 5px;
}

/* Modal Image Styles */
.ecp-modal-image-wrapper {
    margin-bottom: 20px;
    text-align: center;
}

.ecp-modal-featured-image {
    max-width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Modal Actions */
.ecp-modal-actions {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
    text-align: center;
}

.ecp-view-details-btn {
    display: inline-block;
    padding: 12px 30px;
    background: #4CAF50;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.ecp-view-details-btn:hover {
    background: #45a049;
    color: white;
    text-decoration: none;
}

/* Back to Calendar Button */
.ecp-back-button-wrapper {
    margin-bottom: 20px;
}

.ecp-back-button {
    display: inline-block;
    padding: 10px 20px;
    background: #2196F3;
    color: white;
    text-decoration: none;
    border-radius: 5px;
    font-weight: 600;
    transition: background 0.3s ease;
}

.ecp-back-button:hover {
    background: #1976D2;
    color: white;
    text-decoration: none;
}

/* Read More Link in Modal */
.ecp-read-more {
    color: #4CAF50;
    font-weight: 600;
    text-decoration: none;
}

.ecp-read-more:hover {
    color: #45a049;
    text-decoration: underline;
}

/* Event Actions Section */
.ecp-event-actions {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e0e0e0;
}

.ecp-action-section {
    margin-bottom: 25px;
}

.ecp-action-section h3 {
    font-size: 18px;
    margin-bottom: 12px;
    color: #333;
}

/* Compact Social Share Buttons */
.ecp-social-share-buttons.ecp-compact a {
    display: inline-block;
    padding: 6px 12px;
    margin: 3px;
    font-size: 13px;
    border-radius: 4px;
    text-decoration: none;
    color: white;
    transition: opacity 0.3s ease;
}

.ecp-social-share-buttons.ecp-compact a:hover {
    opacity: 0.8;
}

/* Compact Calendar Export Buttons */
.ecp-calendar-export-buttons.ecp-compact a {
    display: inline-block;
    padding: 6px 12px;
    margin: 3px;
    font-size: 13px;
    border-radius: 4px;
    text-decoration: none;
    background: #607D8B;
    color: white;
    transition: background 0.3s ease;
}

.ecp-calendar-export-buttons.ecp-compact a:hover {
    background: #455A64;
}

/* Map Container */
.ecp-event-map-container {
    margin-top: 30px;
}

.ecp-event-map-container h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

/* Event Gallery Grid */
.ecp-event-gallery {
    margin-top: 30px;
}

.ecp-event-gallery h3 {
    font-size: 20px;
    margin-bottom: 15px;
    color: #333;
}

.ecp-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.ecp-gallery-item {
    display: block;
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.ecp-gallery-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.ecp-gallery-image {
    width: 100%;
    height: 250px;
    object-fit: cover;
    display: block;
}

/* Responsive Gallery */
@media (max-width: 768px) {
    .ecp-gallery-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }
    
    .ecp-gallery-image {
        height: 200px;
    }
}

@media (max-width: 480px) {
    .ecp-gallery-grid {
        grid-template-columns: 1fr;
    }
    
    .ecp-gallery-image {
        height: 250px;
    }
}

/* Single Event Detail Page Styles */
.ecp-single-event {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.ecp-event-container {
    background: #fff;
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.ecp-event-featured-image {
    margin-bottom: 30px;
}

.ecp-event-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 8px;
}

.ecp-event-header {
    margin-bottom: 30px;
}

.ecp-event-title {
    font-size: 32px;
    margin-bottom: 15px;
    color: #333;
}

.ecp-event-categories {
    margin-bottom: 15px;
}

.ecp-event-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
}

.ecp-event-meta-item {
    margin: 0;
}

.ecp-event-meta-item strong {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-size: 16px;
}

.ecp-event-meta-item p {
    margin: 0;
    color: #666;
    line-height: 1.6;
}

.ecp-event-content {
    margin-bottom: 30px;
    line-height: 1.8;
    color: #444;
}

.ecp-event-content p {
    margin-bottom: 15px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .ecp-single-event {
        padding: 20px 15px;
    }
    
    .ecp-event-container {
        padding: 20px;
    }
    
    .ecp-event-title {
        font-size: 24px;
    }
    
    .ecp-event-meta {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}

/* Simple Lightbox Styles */
.ecp-lightbox {
    display: none;
    position: fixed;
    z-index: 99999;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    justify-content: center;
    align-items: center;
}

.ecp-lightbox.active {
    display: flex;
}

.ecp-lightbox-content {
    max-width: 90%;
    max-height: 90%;
    position: relative;
}

.ecp-lightbox-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.ecp-lightbox-close {
    position: absolute;
    top: 20px;
    right: 30px;
    color: white;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 100000;
}

.ecp-lightbox-close:hover {
    color: #ccc;
}