/**
 * Canterbury Court Gallery - WordPress Plugin Styles
 * Prefixed with 'ccg-' to avoid theme conflicts
 */

/* Gallery wrapper - responsive container */
.ccg-gallery-wrapper {
    width: 100%;
    background: #f3ead7;
    position: relative;
    box-sizing: border-box;
}

.ccg-gallery-wrapper *,
.ccg-gallery-wrapper *::before,
.ccg-gallery-wrapper *::after {
    box-sizing: border-box;
}

/* Wall viewer - 90vh height default */
.ccg-wall-viewer {
    width: 100%;
    height: 90vh;
    background: #f3ead7;
    position: relative;
    touch-action: pan-y;  /* Default: allow vertical page scroll */
    -webkit-user-select: none;
    user-select: none;
}

/* Active state: viewer controls all touch */
.ccg-wall-viewer.ccg-viewer-active {
    touch-action: none;
}

/* Mobile tap-to-activate overlay */
.ccg-viewer-tap-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.3);
    z-index: 100;
    pointer-events: auto;
    cursor: pointer;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.ccg-viewer-tap-overlay span {
    padding: 1rem 2rem;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    pointer-events: none;
}

.ccg-viewer-tap-overlay.ccg-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

/* Viewer instructions */
.ccg-viewer-instructions {
    position: absolute;
    bottom: 1rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 1.5rem;
    padding: 0.5rem 1rem;
    background: rgba(0, 0, 0, 0.7);
    border-radius: 4px;
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    z-index: 10;
    pointer-events: none;
}

.ccg-viewer-instructions span {
    white-space: nowrap;
}


@media (max-width: 600px) {
    .ccg-viewer-instructions {
        flex-direction: column;
        gap: 0.1rem;
        text-align: center;
    }
}

/* OpenSeadragon navigator styling */
.ccg-gallery-wrapper .navigator {
    background: rgba(0, 0, 0, 0.6) !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
    border-radius: 4px;
}

/* Touch device optimizations */
@media (pointer: coarse) {
    .ccg-viewer-instructions {
        font-size: 0.9rem;
        padding: 0.75rem 1.25rem;
    }
}
