/* Root Reset & Display sizing */
.kerooja-gallery-root-a540529d {
    width: 100% !important;
    display: block !important;
    flex: 1 1 100%;
}

/* Card Container - No hardcoded border or radius */
.kerooja-gallery-card-a540529d {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
    cursor: pointer;
    background: #111;
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.kerooja-gallery-card-a540529d:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}

/* Rigid 4:3 Aspect Ratio Hack */
.kerooja-gallery-image-wrapper-a540529d {
    position: relative !important;
    width: 100% !important;
    padding-bottom: 75% !important; /* 4:3 Aspect Ratio */
    height: 0 !important;
    overflow: hidden !important;
    display: block !important;
    flex-shrink: 0 !important;
}

/* Cover Image tag styling */
.kerooja-gallery-image-wrapper-a540529d img {
    position: absolute !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
    max-width: none !important;
}

/* Badges Placement */
.kerooja-gallery-badge-top-a540529d,
.kerooja-gallery-badge-bottom-a540529d {
    position: absolute;
    z-index: 10;
    display: inline-block;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.kerooja-gallery-badge-top-a540529d {
    top: 12px;
    right: 12px;
    background-color: #ff3366;
    color: #fff;
}

.kerooja-gallery-badge-bottom-a540529d {
    bottom: 12px;
    right: 12px;
    background-color: rgba(0, 0, 0, 0.75);
    color: #fff;
}

/* Title Bar Below Image Wrapper */
.kerooja-gallery-title-bar-a540529d {
    background-color: #1a1a1a;
    padding: 16px;
    flex-grow: 1;
    display: flex;
    align-items: center;
}

.kerooja-gallery-title-a540529d {
    margin: 0;
    padding: 0;
    font-size: 16px;
    font-weight: 600;
    color: #ffffff;
    line-height: 1.4;
}

/* FULL-SCREEN MODAL OVERLAY */
.kerooja-gallery-modal-overlay-a540529d {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 10, 10, 0.98);
    display: flex;
    flex-direction: column;
    color: #fff;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Offset top if WP Admin Bar exists */
.kerooja-gallery-modal-overlay-a540529d.has-admin-bar {
    top: var(--wp-admin--admin-bar--height, 32px);
}
@media screen and (max-width: 782px) {
    .kerooja-gallery-modal-overlay-a540529d.has-admin-bar {
        top: 46px;
    }
}

/* Modal Header */
.kerooja-gallery-modal-header-a540529d {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px;
    border-bottom: 1px solid #222;
}

.kerooja-gallery-modal-title-a540529d {
    margin: 0;
    font-size: 24px;
    font-weight: 700;
    color: #ffffff; /* fallback default white */
}

.kerooja-gallery-modal-subtitle-a540529d {
    margin: 4px 0 0 0;
    font-size: 13px;
    color: #888888; /* fallback default grey */
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

.kerooja-gallery-modal-close-a540529d {
    background: none;
    border: none;
    color: #ffffff; /* fallback default white */
    font-size: 36px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
    transition: opacity 0.2s, color 0.2s;
}

.kerooja-gallery-modal-close-a540529d:hover {
    opacity: 0.7;
}

/* Modal Scrollable Content Container */
.kerooja-gallery-modal-content-a540529d {
    flex-grow: 1;
    overflow-y: auto;
    padding: 40px 24px;
}

/* Grid layout with columns requirements */
.kerooja-gallery-modal-grid-a540529d {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Responsive grid viewports */
@media screen and (max-width: 1024px) {
    .kerooja-gallery-modal-grid-a540529d {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media screen and (max-width: 767px) {
    .kerooja-gallery-modal-grid-a540529d {
        grid-template-columns: 1fr;
    }
}

/* Modal Grid Items with strict properties */
.kerooja-gallery-modal-item-a540529d {
    display: block;
    aspect-ratio: 1/1 !important;
    overflow: hidden;
    border-radius: 8px;
    background: #151515;
    transition: opacity 0.3s, transform 0.3s;
}

.kerooja-gallery-modal-item-a540529d:hover {
    opacity: 0.85;
    transform: scale(1.02);
}

.kerooja-gallery-modal-item-a540529d img {
    width: 100% !important;
    height: 100% !important;
    object-fit: cover !important;
}
