/* =========================================
   GLOBAL RESET & BASE STYLES
========================================= */
html,
body {
    margin: 0;
    padding: 0;
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    /* Prevent horizontal scroll */
    box-sizing: border-box;
}

*,
*::before,
*::after {
    box-sizing: inherit;
}

/* =========================================
   EVENTFLICK ALBUM/GRID STYLES
========================================= */
.eventflick-album {
    margin: 40px auto;
    max-width: 90%;
}

.eventflick-media-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    grid-gap: 4px;
}

.eventflick-media-item {
    position: relative;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease-in-out;
    height: 275px;
    width: 100%;
}

.eventflick-media-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.eventflick-media-item:hover {
    transform: scale(1.05);
    z-index: 1;
}

.eventflick-media-item.vertical {
    aspect-ratio: 3 / 4;
}

.eventflick-media-item.horizontal {
    grid-column: span 2;
    aspect-ratio: 4 / 3;
}

@media (max-width: 768px) {
    .eventflick-media-grid {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    }

    .eventflick-media-item {
        height: 200px;
    }
}

/* =========================================
   MODAL OVERLAY & CONTENT STYLES
========================================= */
/* The modal overlay covers the full viewport and enables vertical scrolling */
.eventflick-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    overflow-y: auto;
    /* Allow scrolling if modal content is taller than viewport */
    padding: 10px;
    /* Optional padding so the modal content doesn’t touch screen edges */
}

/* The modal content container is centered, constrained by max-width and max-height */
.eventflick-modal-content {
    background-color: #fff;
    margin: auto;
    width: 100%;
    max-width: 600px;
    max-height: calc(100vh - 20px);
    overflow-y: auto;
    border-radius: 0;
    box-shadow: none;
    box-sizing: border-box;
}

/* Modal Header – stays at the top of the content */
.eventflick-modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: #0073aa;
    color: #fff;
    padding: 15px 20px;
}

.eventflick-modal-header h2 {
    margin: 0;
    font-size: 1.25rem;
}

.eventflick-modal-close-btn {
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
}

/* Modal Body – contains the dynamic content; scrolls if needed */
.eventflick-modal-body-content {
    padding: 20px;
    color: #333;
    line-height: 1.6;
}

/* Ensure images inside modal content resize responsively */
.eventflick-modal-content img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

/* =========================================
   CREATOR INFO & DOWNLOAD/SHARE BUTTONS
========================================= */
.creator-info {
    font-size: 0.9rem;
    line-height: 1.4;
    color: #555;
}

.creator-info h3 {
    font-size: 1rem;
    margin-bottom: 0.5rem;
}

.creator-info p,
.creator-info a {
    font-size: 0.85rem;
}

.creator-logo .creator-logo-img {
    max-width: 80px;
    height: auto;
    margin: 0 auto;
}

.creator-logo {
    text-align: center;
    margin-bottom: 1rem;
}

.creator-info-row {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 1rem;
}

.creator-logo-img {
    max-width: 80px;
    height: auto;
    display: block;
}

.creator-details {
    flex: 1;
}

/* Side-by-side layout on larger screens */
.creator-download-container {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

@media (max-width: 768px) {

    /* Stack creator info and buttons vertically on mobile */
    .creator-download-container {
        flex-direction: column;
        align-items: stretch;
    }
}

/* =========================================
   BUTTONS (DOWNLOAD & SHARE)
========================================= */
.download-button,
.share-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background-color: #007bff;
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 16px;
    line-height: 1;
    font-family: inherit;
    text-decoration: none;
    cursor: pointer;
    transition: background-color 0.3s ease;
    appearance: none;
    -webkit-appearance: none;
}

.download-button:hover,
.share-button:hover {
    background-color: #0056b3;
}

.download-button:focus,
.share-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.5);
}

/* Hide share button on larger screens (visible only on mobile) */
@media (min-width: 768px) {
    .share-button {
        display: none;
    }
}

/* =========================================
   PAGINATION STYLES (if applicable)
========================================= */
.eventflick-pagination {
    text-align: center;
    margin-top: 20px;
}

.eventflick-pagination a,
.eventflick-pagination span {
    display: inline-block;
    margin: 0 5px;
    padding: 8px 12px;
    border: 1px solid #ddd;
    text-decoration: none;
    color: #333;
}

.eventflick-pagination .current-page {
    background-color: #0073aa;
    color: #fff;
    border-color: #0073aa;
}
