/*!
 * WPE Photo Competition - frontend styles (UI refresh v2.6.0)
 *
 * Theming: every colour, radius, shadow and font comes from the --wpepc-*
 * tokens below. Override them from your theme (docs/THEMING.md), e.g.
 *   :root { --wpepc-primary: #16346E; --wpepc-radius: 4px; }
 * The token block sits in :where(:root) (specificity 0), so any :root rule wins.
 * Layout (masonry / grid / list, 1fr+350px detail, dashboard columns, breakpoints)
 * is intentionally independent from the tokens.
 */

/* ==========================================================================
   1. TOKENS
   ========================================================================== */
:where(:root) {
    --wpepc-font: inherit;
    --wpepc-page: #fff;
    --wpepc-ink: #15181E;
    --wpepc-text: #454B57;
    --wpepc-muted: #626A76;
    --wpepc-line: #E2E5E9;
    --wpepc-line-strong: #C9CED5;
    --wpepc-surface: #fff;
    --wpepc-surface-alt: #F5F6F7;
    --wpepc-primary: #1F6B4F;
    --wpepc-primary-hover: #17533D;
    --wpepc-on-primary: #fff;
    --wpepc-accent: #1F6B4F;
    --wpepc-highlight: #F2D675;
    --wpepc-on-highlight: #15181E;
    --wpepc-success: #1E7B4F;
    --wpepc-success-bg: #E8F4EC;
    --wpepc-warning: #8A5A00;
    --wpepc-warning-bg: #FDF4DE;
    --wpepc-danger: #B42318;
    --wpepc-danger-bg: #FDECEA;
    --wpepc-info: #1F5E9C;
    --wpepc-info-bg: #E9F1FA;
    --wpepc-radius-sm: 6px;
    --wpepc-radius: 10px;
    --wpepc-radius-lg: 14px;
    --wpepc-radius-pill: 999px;
    --wpepc-shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .07);
    --wpepc-shadow-lg: 0 16px 40px -12px rgba(16, 24, 40, .22);
    --wpepc-focus-ring: 0 0 0 3px rgba(31, 107, 79, .22);
    --wpepc-overlay: rgba(15, 18, 24, .72);

    /* Legacy tokens (pre-2.6). Kept so sites overriding the old names keep working;
       they now follow the --wpepc-* tokens. Prefer the new names in new code. */
    --primary-color: var(--wpepc-primary);
    --primary-dark: var(--wpepc-primary-hover);
    --primary-light: var(--wpepc-accent);
    --secondary-color: var(--wpepc-accent);
    --secondary-dark: var(--wpepc-primary-hover);
    --success-color: var(--wpepc-success);
    --warning-color: var(--wpepc-warning);
    --danger-color: var(--wpepc-danger);
    --info-color: var(--wpepc-info);
    --text-dark: var(--wpepc-ink);
    --text-body: var(--wpepc-text);
    --text-light: var(--wpepc-muted);
    --text-muted: var(--wpepc-muted);
    --bg-primary: var(--wpepc-surface);
    --bg-secondary: var(--wpepc-surface-alt);
    --bg-tertiary: var(--wpepc-surface-alt);
    --border-color: var(--wpepc-line);
    --border-radius: var(--wpepc-radius);
    --border-radius-lg: var(--wpepc-radius-lg);
    --border-radius-xl: var(--wpepc-radius-lg);
    --shadow-sm: var(--wpepc-shadow);
    --shadow-md: var(--wpepc-shadow);
    --shadow-lg: var(--wpepc-shadow-lg);
    --shadow-xl: var(--wpepc-shadow-lg);
    --shadow-2xl: var(--wpepc-shadow-lg);
    --transition-base: color .15s ease, background-color .15s ease, border-color .15s ease, box-shadow .15s ease, opacity .15s ease;

    /* Font sizes (px). Sub-12px steps were raised to keep meta text legible. */
    --text-xxs: 12px;
    --text-11px: 12px;
    --text-xs: 12.5px;
    --text-13px: 13px;
    --text-sm: 14px;
    --text-15px: 15px;
    --text-base: 16px;
    --text-17px: 17px;
    --text-lg: 18px;
    --text-xl: 20px;
    --text-2xl: 24px;
    --text-28px: 28px;
    --text-3xl: 30px;
    --text-32px: 32px;
    --text-4xl: 36px;
    --text-40px: 40px;
    --text-5xl: 48px;
    --text-6xl: 60px;
    --text-7xl: 72px;
}

/* ==========================================================================
   2. SCOPED BASE (no global resets; only inside plugin containers)
   ========================================================================== */
:where(:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"])),
:where(:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"])) *,
:where(:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"])) *::before,
:where(:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"])) *::after {
    box-sizing: border-box;
}

:where(:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"])) :where(h1, h2, h3, h4, h5, h6) {
    margin: 0 0 .5em;
    color: var(--wpepc-ink);
    font-family: var(--wpepc-font, inherit);
    font-weight: 700;
    line-height: 1.25;
}

:where(:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"])) :where(p, ul, ol, figure) { margin: 0; }
:where(:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"])) :where(ul, ol) { padding: 0; }

/* One heading colour for every plugin heading (beats theme content-area heading rules) */
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) :is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) :is(h1, h2, h3, h4, h5, h6) { color: var(--wpepc-ink); }

:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) a {
    text-decoration: none;
    border-bottom: 0;
}
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) a:hover { text-decoration: none; }

:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) :is(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
    outline: 2px solid var(--wpepc-accent);
    outline-offset: 2px;
    box-shadow: var(--wpepc-focus-ring);
}

/* Icons (Material Symbols Outlined, inline SVG via PC_Icons::svg) */
.pc-ico {
    display: inline-block;
    width: 1.125em;
    height: 1.125em;
    flex: none;
    fill: currentColor;
    vertical-align: -.2em;
}
[hidden].pc-eye,
.password-strength[hidden] { display: none !important; }

/* Spinner (functional loading indicator) */
.pc-spinner,
.loading-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    flex: none;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    vertical-align: middle;
    animation: pc-spin .7s linear infinite;
}
@keyframes pc-spin { to { transform: rotate(360deg); } }
@keyframes pc-fade-in { from { opacity: 0; } to { opacity: 1; } }

/* ==========================================================================
   3. LAYOUT WRAPPERS
   ========================================================================== */
.pc-competition-wrapper {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem;
}
.pc-section { margin: 3rem 0; }

.pc-title {
    margin: 0 0 3rem;
    text-align: center;
    color: var(--wpepc-ink);
    font-size: clamp(var(--text-32px), 5vw, var(--text-5xl));
    font-weight: 700;
    letter-spacing: -.01em;
}

.pc-submission-wrap { padding-top: 24px; }

.pc-guest-dashboard .guest-welcome { margin-bottom: 1.5rem; text-align: center; }
.pc-guest-dashboard .guest-welcome p { margin-top: .5rem; color: var(--wpepc-text); }
.pc-guest-dashboard .guest-auth-section { margin-top: 1.5rem; }

/* ==========================================================================
   4. PHOTO GRID (masonry / grid / list) - layout rules unchanged
   ========================================================================== */
.photo-grid {
    display: block;
    column-count: 3;
    column-gap: 1.5rem;
    margin: 2rem 0;
}

/* Legacy shortcode column classes */
.photo-grid.cols-1 { column-count: 1; }
.photo-grid.cols-2 { column-count: 2; }
.photo-grid.cols-3 { column-count: 3; }
.photo-grid.cols-4 { column-count: 4; }
.photo-grid.cols-5 { column-count: 5; }
.photo-grid.cols-6 { column-count: 6; }

@media (max-width: 1200px) {
    .photo-grid.cols-5,
    .photo-grid.cols-6 { column-count: 4; }
}
@media (max-width: 992px) {
    .photo-grid.cols-3,
    .photo-grid.cols-4,
    .photo-grid.cols-5,
    .photo-grid.cols-6 { column-count: 2; }
}
@media (max-width: 576px) {
    .photo-grid.cols-1,
    .photo-grid.cols-2,
    .photo-grid.cols-3,
    .photo-grid.cols-4,
    .photo-grid.cols-5,
    .photo-grid.cols-6 { column-count: 1; }
}

/* Block mode: CSS variables set inline on the element */
.photo-grid.layout-masonry[style*="--masonry-cols"] {
    column-count: var(--masonry-cols-default, 3);
    column-gap: var(--masonry-gap, 1.5rem);
}
.wp-block-wpe-fotos-photo-gallery.alignwide .photo-grid.layout-masonry[style*="--masonry-cols"] {
    column-count: var(--masonry-cols-wide, 3);
}
.wp-block-wpe-fotos-photo-gallery.alignfull .photo-grid.layout-masonry[style*="--masonry-cols"] {
    column-count: var(--masonry-cols-full, 5);
}
@media (max-width: 992px) {
    .photo-grid.layout-masonry[style*="--masonry-cols"],
    .wp-block-wpe-fotos-photo-gallery.alignwide .photo-grid.layout-masonry[style*="--masonry-cols"],
    .wp-block-wpe-fotos-photo-gallery.alignfull .photo-grid.layout-masonry[style*="--masonry-cols"] {
        column-count: var(--masonry-cols-tablet, 2) !important;
    }
}

.photo-grid.layout-grid[style*="--grid-cols"] {
    display: grid;
    grid-template-columns: repeat(var(--grid-cols-default, 3), 1fr);
    gap: var(--grid-gap, 1.5rem);
    column-count: unset;
}
.wp-block-wpe-fotos-photo-gallery.alignwide .photo-grid.layout-grid[style*="--grid-cols"] {
    grid-template-columns: repeat(var(--grid-cols-wide, 4), 1fr);
}
.wp-block-wpe-fotos-photo-gallery.alignfull .photo-grid.layout-grid[style*="--grid-cols"] {
    grid-template-columns: repeat(var(--grid-cols-full, 5), 1fr);
}
@media (max-width: 992px) {
    .photo-grid.layout-grid[style*="--grid-cols"],
    .wp-block-wpe-fotos-photo-gallery.alignwide .photo-grid.layout-grid[style*="--grid-cols"],
    .wp-block-wpe-fotos-photo-gallery.alignfull .photo-grid.layout-grid[style*="--grid-cols"] {
        grid-template-columns: repeat(var(--grid-cols-tablet, 2), 1fr) !important;
    }
}
@media (max-width: 576px) {
    .photo-grid.layout-grid[style*="--grid-cols"],
    .photo-grid.layout-masonry[style*="--masonry-cols"] {
        grid-template-columns: 1fr !important;
        column-count: 1 !important;
        display: grid !important;
    }
    .photo-grid .photo-item {
        width: 100%;
        margin-bottom: 20px;
    }
}

/* Masonry (default) */
.photo-grid.layout-masonry {
    display: block !important;
    column-count: 3;
    column-gap: 1.5rem;
}
.photo-grid.layout-masonry .photo-item {
    display: inline-block;
    width: 100%;
    margin-bottom: 1.5rem;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
}
@media (max-width: 992px) { .photo-grid.layout-masonry { column-count: 2; } }
@media (max-width: 576px) { .photo-grid.layout-masonry { column-count: 1; } }

/* Grid cards (4:3) */
.photo-grid.layout-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    column-count: unset !important;
}
.photo-grid.layout-grid .photo-item {
    display: flex;
    flex-direction: column;
    width: 100%;
    margin-bottom: 0;
    break-inside: unset;
}
.photo-grid.layout-grid .photo-wrapper {
    position: relative;
    padding-top: 75%;
    overflow: hidden;
}
.photo-grid.layout-grid .photo-wrapper .photo-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.photo-grid.layout-grid .photo-wrapper img,
.photo-grid.layout-grid .photo-link img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
@media (max-width: 992px) { .photo-grid.layout-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 576px) { .photo-grid.layout-grid { grid-template-columns: 1fr; } }

/* List (square thumbnail + text). Sizes are deliberate; do not change. */
.photo-grid.layout-list {
    display: flex !important;
    flex-direction: column;
    gap: 1.5rem;
    column-count: unset !important;
}
div.photo-grid.layout-list .photo-item {
    display: flex;
    flex-direction: row;
    align-items: stretch;
    justify-content: flex-start;
    width: 100%;
    min-height: 280px;
    height: auto;
    margin-bottom: 2rem;
    break-inside: unset;
}
div.photo-grid.layout-list .photo-item:hover { transform: none; }
div.photo-grid.layout-list .photo-item .photo-wrapper {
    flex: 0 0 320px;
    width: 320px;
    min-height: 320px;
    height: auto;
    position: relative;
    overflow: hidden;
    padding: 0;
    margin: 0;
}
div.photo-grid.layout-list .photo-item .photo-link {
    display: block;
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
}
div.photo-grid.layout-list .photo-item .photo-link img,
div.photo-grid.layout-list .photo-item .photo-wrapper img {
    display: block;
    width: 100%;
    height: 100%;
    min-height: 100%;
    max-height: none;
    object-fit: cover;
    object-position: center;
    transform: none;
}
div.photo-grid.layout-list .photo-item .photo-info {
    flex: 1;
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
div.photo-grid.layout-list .photo-info h3 {
    font-size: var(--text-xl);
    margin-bottom: .75rem;
    -webkit-line-clamp: unset;
    line-clamp: unset;
}
div.photo-grid.layout-list .photo-caption {
    -webkit-line-clamp: 4;
    line-clamp: 4;
    margin-bottom: 1rem;
}
div.photo-grid.layout-list .photo-overlay { display: none; }
@media (max-width: 900px) {
    div.photo-grid.layout-list .photo-item {
        flex-direction: column;
        min-height: auto;
    }
    div.photo-grid.layout-list .photo-item .photo-wrapper {
        width: 100%;
        flex: none;
        aspect-ratio: 1 / 1;
        height: auto;
        min-height: 300px;
    }
    div.photo-grid.layout-list .photo-item .photo-link {
        position: relative;
        aspect-ratio: 1 / 1;
    }
}

@media (max-width: 480px) {
    .photo-grid,
    .submissions-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* ==========================================================================
   5. PHOTO CARD
   ========================================================================== */
.photo-item {
    position: relative;
    display: inline-block;
    width: 100%;
    margin-bottom: 1.5rem;
    overflow: hidden;
    break-inside: avoid;
    -webkit-column-break-inside: avoid;
    page-break-inside: avoid;
    background: var(--wpepc-surface);
    border: 1px solid var(--wpepc-line);
    border-radius: var(--wpepc-radius-lg);
    box-shadow: var(--wpepc-shadow);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.photo-grid.layout-grid .photo-item { break-inside: unset; }
.photo-item:hover {
    border-color: var(--wpepc-line-strong);
    box-shadow: var(--wpepc-shadow-lg);
}

.photo-wrapper {
    position: relative;
    overflow: hidden;
    background: var(--wpepc-surface-alt);
    line-height: 0;
}
.photo-wrapper img {
    display: block;
    width: 100%;
    height: auto;
}
.photo-wrapper .photo-link { display: block; line-height: 0; }

/* Hover / focus overlay with the "View Details" button */
.photo-overlay {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    align-items: flex-end;
    justify-content: flex-end;
    padding: 10px;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 45%, rgba(0, 0, 0, .55) 100%);
    opacity: 0;
    transition: opacity .2s ease;
    pointer-events: none;
}
.photo-item:hover .photo-overlay,
.photo-item:focus-within .photo-overlay {
    opacity: 1;
    pointer-events: auto;
}
@media (hover: none) {
    .photo-overlay {
        opacity: 1;
        background: none;
    }
    .photo-overlay .photo-actions { pointer-events: auto; }
}
.photo-actions { position: relative; }

.photo-info { padding: 1.25rem; }
.photo-info h3 {
    margin: 0 0 .5rem;
    color: var(--wpepc-ink);
    font-size: 16.5px;
    font-weight: 700;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.photo-info h3 a { color: inherit; transition: color .15s ease; }
.photo-info h3 a:hover { color: var(--wpepc-accent); }

.photo-caption {
    margin-bottom: 1rem;
    color: var(--wpepc-text);
    font-size: var(--text-sm);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.photo-author,
.photo-location {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: .5rem 0;
    color: var(--wpepc-muted);
    font-size: 13.5px;
}
.photo-author :is(svg, .pc-ico),
.photo-location :is(svg, .pc-ico) {
    width: 16px;
    height: 16px;
    flex: none;
    color: var(--wpepc-accent);
    fill: currentColor;
}

.photo-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--wpepc-line);
    font-size: var(--text-sm);
}
.vote-count {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--wpepc-ink);
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1;
}
.vote-count :is(svg, .pc-ico) {
    width: 18px;
    height: 18px;
    flex: none;
    color: var(--wpepc-danger);
    fill: currentColor;
}
.vote-count .count { font-weight: 600; color: var(--wpepc-ink); }

/* Winner badge (results phase) */
.winner-badge {
    position: absolute;
    bottom: 1rem;
    right: 1rem;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: .375rem;
    padding: .375rem .75rem;
    background: rgba(255, 255, 255, .94);
    color: var(--wpepc-ink);
    border-radius: var(--wpepc-radius-sm);
    box-shadow: var(--wpepc-shadow);
    line-height: 1.2;
}
.winner-badge .pc-ico { color: var(--wpepc-warning); }
.winner-badge .rank {
    width: auto;
    height: auto;
    border-radius: 0;
    background: none;
    color: var(--wpepc-ink);
    font-size: var(--text-sm);
    font-weight: 700;
    display: inline;
}

/* Category filter / pill / badge */
.pc-category-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 12px 0 20px;
}
.pc-category-pill {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 14px;
    background: var(--wpepc-surface);
    color: var(--wpepc-text);
    border: 1px solid var(--wpepc-line);
    border-radius: var(--wpepc-radius-pill);
    font-family: var(--wpepc-font, inherit);
    font-size: 13.5px;
    font-weight: 500;
    line-height: 1;
    transition: var(--transition-base);
}
.pc-category-pill:hover { border-color: var(--wpepc-ink); color: var(--wpepc-ink); }
.pc-category-pill.active {
    background: var(--wpepc-ink);
    border-color: var(--wpepc-ink);
    color: var(--wpepc-surface);
}
.pc-category-badge {
    display: inline-block;
    margin-bottom: 6px;
    padding: 4px 9px;
    background: var(--wpepc-surface-alt);
    color: var(--wpepc-ink);
    border-radius: var(--wpepc-radius-sm);
    font-size: 12.5px;
    font-weight: 600;
    letter-spacing: .02em;
    line-height: 1.2;
}

/* Status pills (my entries) */
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--wpepc-radius-pill);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.2;
}
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .status::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .status-pending { background: var(--wpepc-warning-bg); color: var(--wpepc-warning); }
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .status-approved { background: var(--wpepc-success-bg); color: var(--wpepc-success); }
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .status-rejected { background: var(--wpepc-danger-bg); color: var(--wpepc-danger); }

/* ==========================================================================
   6. BUTTONS (one family)
   ========================================================================== */
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) :is(.pc-btn, .btn-primary, .btn-secondary, .btn-vote, .btn-submit, .btn-load-more, .btn-view, .pc-btn-copy, .logout-button, .pc-share-btn, .pc-pagination :where(a), .pc-navigation :where(a)) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 18px;
    background: transparent;
    color: var(--wpepc-ink);
    border: 1.5px solid transparent;
    border-radius: var(--wpepc-radius-pill);
    font-family: var(--wpepc-font, inherit);
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    cursor: pointer;
    transition: var(--transition-base);
}
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) :is(.pc-btn, .btn-primary, .btn-secondary, .btn-vote, .btn-submit, .btn-load-more, .btn-view, .pc-btn-copy, .logout-button, .pc-share-btn, .pc-pagination :where(a), .pc-navigation :where(a)) :is(svg, .pc-ico) { width: 18px; height: 18px; flex: none; fill: currentColor; }

/* Primary */
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) :is(.btn-primary, .btn-submit, .btn-load-more, .btn-vote, .pc-nav-gallery) {
    background: var(--wpepc-primary);
    color: var(--wpepc-on-primary);
}
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) :is(.btn-primary, .btn-submit, .btn-load-more, .btn-vote, .pc-nav-gallery):hover:not(:disabled):not([aria-disabled="true"]) {
    background: var(--wpepc-primary-hover);
    color: var(--wpepc-on-primary);
}

/* Secondary / outline */
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) :is(.btn-secondary, .pc-btn-copy, .pc-share-btn, .pc-pagination :where(a), .pc-navigation :where(a:not(.pc-nav-gallery)), .logout-button, .btn-view) {
    background: var(--wpepc-surface);
    color: var(--wpepc-ink);
    border-color: var(--wpepc-line);
}
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) :is(.btn-secondary, .pc-btn-copy, .pc-share-btn, .pc-pagination :where(a), .pc-navigation :where(a:not(.pc-nav-gallery)), .logout-button, .btn-view):hover {
    background: var(--wpepc-surface);
    border-color: var(--wpepc-ink);
    color: var(--wpepc-ink);
}

/* Danger outline (logout) */
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .logout-button { color: var(--wpepc-danger); border-color: var(--wpepc-danger-bg); }
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .logout-button:hover { color: var(--wpepc-danger); border-color: var(--wpepc-danger); }

/* Vote button */
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .btn-vote { min-height: 34px; padding: 0 14px; font-size: 13px; }
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .btn-vote :is(svg, .pc-ico) { width: 16px; height: 16px; }
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .btn-vote.voted,
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .btn-vote.voted:hover:not(:disabled) {
    background: var(--wpepc-success-bg);
    color: var(--wpepc-success);
}

/* View details (on photo) */
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .photo-actions .btn-view {
    min-height: 34px;
    padding: 0 12px;
    background: rgba(255, 255, 255, .94);
    font-size: 12.5px;
    backdrop-filter: blur(6px);
}

/* Submit / load more sizes */
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .btn-submit { min-height: 48px; padding: 0 32px; font-size: 15px; }
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .btn-load-more { padding: 0 28px; }
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .pc-share-btn { justify-content: flex-start; min-height: 36px; font-size: 13px; }
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .pc-btn-copy { min-height: 36px; padding: 0 14px; font-size: 13px; }

/* Disabled */
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) :is(.pc-btn, .btn-primary, .btn-secondary, .btn-vote, .btn-submit, .btn-load-more, .btn-view, .pc-btn-copy, .logout-button, .pc-share-btn, .pc-pagination :where(a), .pc-navigation :where(a)):is(:disabled, [disabled], [aria-disabled="true"], .disabled) {
    background: var(--wpepc-surface-alt);
    color: var(--wpepc-muted);
    border-color: transparent;
    cursor: not-allowed;
    box-shadow: none;
}
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .btn-block { display: flex; width: 100%; }

/* Loading state */
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .btn-submit.loading {
    position: relative;
    color: transparent;
    pointer-events: none;
}
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .btn-submit.loading::after {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    width: 1.25rem;
    height: 1.25rem;
    margin: -.625rem 0 0 -.625rem;
    border: 2px solid var(--wpepc-on-primary);
    border-top-color: transparent;
    border-radius: 50%;
    animation: pc-spin .7s linear infinite;
}

/* Facebook (third-party brand colours) */
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .btn-facebook {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .625rem;
    width: 100%;
    min-height: 44px;
    padding: 0 1.25rem;
    background: #1877f2;
    color: white;
    border: 0;
    border-radius: 4px;
    font-family: var(--wpepc-font, inherit);
    font-size: var(--text-15px);
    font-weight: 500;
    cursor: pointer;
    transition: background-color .15s ease;
}
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .btn-facebook:hover { background: #1465d8; }

/* Layout toggle (segmented control) */
.pc-layout-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
    width: fit-content;
    padding: 3px;
    background: var(--wpepc-surface-alt);
    border: 1px solid var(--wpepc-line);
    border-radius: var(--wpepc-radius-pill);
}
.pc-layout-toggle .toggle-label {
    padding: 0 6px 0 10px;
    color: var(--wpepc-muted);
    font-size: 13px;
    font-weight: 500;
}
.pc-layout-toggle .layout-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 12px;
    background: transparent;
    color: var(--wpepc-text);
    border: 0;
    border-radius: var(--wpepc-radius-pill);
    font-family: var(--wpepc-font, inherit);
    font-size: 13px;
    font-weight: 500;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition-base);
}
.pc-layout-toggle .layout-btn:hover { color: var(--wpepc-ink); }
.pc-layout-toggle .layout-btn.active {
    background: var(--wpepc-surface);
    color: var(--wpepc-ink);
    box-shadow: var(--wpepc-shadow);
}
.pc-layout-toggle .layout-btn svg { flex: none; }
.pc-layout-toggle .layout-btn.active svg { stroke: currentColor; }
@media (max-width: 576px) {
    .pc-layout-toggle {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }
    .pc-layout-toggle .layout-btn span { display: none; }
    .pc-layout-toggle .layout-btn { padding: 0 .75rem; }
}
@media (max-width: 768px) {
    .pc-layout-toggle { display: none; }
}

/* Gallery header */
.pc-gallery-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--wpepc-line);
}
.pc-gallery-header h2 {
    margin: 0;
    color: var(--wpepc-ink);
    font-size: 26px;
    letter-spacing: -.01em;
}
@media (max-width: 576px) {
    .pc-gallery-header { flex-direction: column; align-items: flex-start; }
    .pc-gallery-header h2 { font-size: var(--text-2xl); }
}

/* ==========================================================================
   7. FORMS
   ========================================================================== */
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) :is(input:not([type="checkbox"], [type="radio"], [type="file"], [type="submit"], [type="button"], [type="hidden"], [type="range"], [type="color"]), textarea, select) {
    width: 100%;
    min-height: 42px;
    padding: 10px 12px;
    background: var(--wpepc-surface);
    color: var(--wpepc-ink);
    border: 1px solid var(--wpepc-line-strong);
    border-radius: var(--wpepc-radius-sm);
    font-family: var(--wpepc-font, inherit);
    font-size: 15px;
    line-height: 1.4;
    transition: var(--transition-base);
}
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) textarea { min-height: 120px; resize: vertical; }
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) :is(input:not([type="checkbox"], [type="radio"], [type="file"], [type="submit"], [type="button"], [type="hidden"], [type="range"], [type="color"]), textarea, select):focus {
    outline: 2px solid transparent;
    border-color: var(--wpepc-accent);
    box-shadow: var(--wpepc-focus-ring);
}
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) :is(input, textarea, select)::placeholder { color: var(--wpepc-muted); opacity: 1; }
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) :is(.has-error, .error) :is(input, textarea, select),
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) :is(input, textarea, select).error {
    border-color: var(--wpepc-danger);
}

:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) input[type="checkbox"],
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) input[type="radio"] {
    width: 18px;
    height: 18px;
    flex: none;
    margin: 2px 0 0;
    accent-color: var(--wpepc-primary);
    cursor: pointer;
}

.form-group { margin-bottom: 1.25rem; }
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .form-group label {
    display: block;
    margin-bottom: 6px;
    color: var(--wpepc-ink);
    font-size: var(--text-sm);
    font-weight: 600;
    line-height: 1.3;
}
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .required { color: var(--wpepc-danger); margin-left: 2px; }
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) :is(.description, .pc-caption-guidance, .field-description) {
    display: block;
    margin: 6px 0 0;
    color: var(--wpepc-muted);
    font-size: 13px;
    line-height: 1.5;
}
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) :is(.checkbox-error, .field-error) {
    margin-top: 6px;
    color: var(--wpepc-danger);
    font-size: 13px;
}

.form-section { margin-top: 2rem; }
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) :is(.form-section, .multilang-fields) h3 {
    margin: 0 0 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--wpepc-line);
    color: var(--wpepc-ink);
    font-size: 15px;
    font-weight: 700;
}
.multilang-fields { margin-top: 2.5rem; }

/* Submission form shell */
.pc-submission-form {
    margin: 0 auto;
    overflow: hidden;
    background: var(--wpepc-surface);
    border: 1px solid var(--wpepc-line);
    border-radius: var(--wpepc-radius-lg);
    box-shadow: var(--wpepc-shadow);
}
.pc-submission-form .form-header {
    padding: 24px 28px;
    background: var(--wpepc-surface-alt);
    border-bottom: 1px solid var(--wpepc-line);
    color: var(--wpepc-ink);
}
.pc-submission-form .form-header h2 {
    margin: 0;
    color: var(--wpepc-ink);
    font-size: 22px;
    font-weight: 700;
}
.pc-submission-form .form-header p {
    margin: 6px 0 0;
    color: var(--wpepc-muted);
    font-size: var(--text-sm);
}
#pc-photo-submission { padding: 28px; }

.pc-submission-form .requirements {
    display: grid;
    gap: 8px;
    margin: 0 0 1.25rem;
    padding: 14px 16px;
    list-style: none;
    background: var(--wpepc-surface-alt);
    border-radius: var(--wpepc-radius);
    color: var(--wpepc-text);
    font-size: var(--text-sm);
}
.pc-submission-form .requirements li {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 0;
}
.pc-submission-form .requirements .pc-ico {
    margin-top: 1px;
    color: var(--wpepc-success);
}

/* File upload */
.file-upload-wrapper { position: relative; margin-bottom: 1.25rem; }
.file-upload-wrapper input[type="file"] { display: none; }
.file-upload-label {
    display: grid;
    justify-items: center;
    gap: 6px;
    padding: 28px 20px;
    background: var(--wpepc-surface);
    border: 1.5px dashed var(--wpepc-line-strong);
    border-radius: var(--wpepc-radius);
    text-align: center;
    cursor: pointer;
    transition: var(--transition-base);
}
.file-upload-label:hover {
    background: var(--wpepc-surface-alt);
    border-color: var(--wpepc-accent);
}
.file-upload-label :is(.upload-text, .upload-subtext) { display: block; width: 100%; text-align: center; }
.file-upload-label .upload-icon {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    background: var(--wpepc-surface-alt);
    border-radius: 50%;
    color: var(--wpepc-accent);
}
.file-upload-label:hover .upload-icon { background: var(--wpepc-surface); }
.file-upload-label .upload-icon .pc-ico { width: 22px; height: 22px; }
.file-upload-label .upload-text {
    color: var(--wpepc-ink);
    font-size: 15px;
    font-weight: 600;
}
.file-upload-label .upload-subtext {
    color: var(--wpepc-muted);
    font-size: 13px;
}

#image-preview { margin-top: 1.25rem; }
#image-preview img {
    display: block;
    max-width: 500px;
    height: auto;
    border-radius: var(--wpepc-radius);
}
#image-preview.active {
    display: block;
    animation: pc-fade-in .2s ease;
}
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .image-info {
    margin-top: 6px;
    color: var(--wpepc-muted);
    font-size: 13px;
}

/* Language tabs */
.lang-tabs {
    display: inline-flex;
    max-width: 100%;
    gap: 4px;
    margin-bottom: 1.875rem;
    padding: 3px;
    background: var(--wpepc-surface-alt);
    border: 1px solid var(--wpepc-line);
    border-radius: var(--wpepc-radius-pill);
}
.lang-tab {
    flex: 0 1 auto;
    min-height: 34px;
    padding: 0 14px;
    background: transparent;
    color: var(--wpepc-muted);
    border: 0;
    border-radius: var(--wpepc-radius-pill);
    font-family: var(--wpepc-font, inherit);
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
    cursor: pointer;
    transition: var(--transition-base);
}
.lang-tab:hover { color: var(--wpepc-ink); }
.lang-tab.active {
    background: var(--wpepc-surface);
    color: var(--wpepc-ink);
    box-shadow: var(--wpepc-shadow);
}
.lang-content { animation: pc-fade-in .2s ease; }

/* Agreements */
.checkbox-group { margin-bottom: .75rem; }
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .checkbox-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin: 0;
    color: var(--wpepc-text);
    font-size: var(--text-sm);
    font-weight: 400;
    line-height: 1.5;
    cursor: pointer;
}
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .checkbox-text a,
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .checkbox-label a,
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .pc-notice a,
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .wpelinkto {
    color: var(--wpepc-accent);
    text-decoration: underline;
    text-underline-offset: 2px;
}
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) :is(.checkbox-label.error, .checkbox-group.has-error) .checkbox-text { color: var(--wpepc-danger); }
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) input.required-checkbox.error { outline: 2px solid var(--wpepc-danger); outline-offset: 1px; }

/* Actions */
.pc-submission-form .form-actions {
    margin-top: 2.5rem;
    padding-top: 1.875rem;
    border-top: 1px solid var(--wpepc-line);
    text-align: center;
}
.pc-submission-form .submission-info {
    margin-top: 1.25rem;
    color: var(--wpepc-muted);
    font-size: 13.5px;
}
.pc-submission-form .submission-info strong { color: var(--wpepc-ink); font-weight: 600; }

/* ==========================================================================
   8. LOGIN CARD
   ========================================================================== */
.pc-login-form {
    max-width: 450px;
    margin: 2rem auto;
    padding: 2rem;
    background: var(--wpepc-surface);
    border: 1px solid var(--wpepc-line);
    border-radius: var(--wpepc-radius-lg);
    box-shadow: var(--wpepc-shadow-lg);
    text-align: center;
}
.pc-login-form h2 {
    margin: 0 0 .5rem;
    color: var(--wpepc-ink);
    font-size: 22px;
    font-weight: 700;
    text-align: center;
}
.pc-login-form > p {
    margin: 0 0 1.5rem;
    color: var(--wpepc-text);
    font-size: 14.5px;
    text-align: center;
}
.social-login {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    margin-bottom: 1.5rem;
}
#google-signin-button {
    display: flex;
    justify-content: center;
    margin-bottom: .75rem;
}
.login-divider {
    position: relative;
    margin: 1.5rem 0;
    text-align: center;
}
.login-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--wpepc-line);
}
.login-divider span {
    position: relative;
    padding: 0 1rem;
    background: var(--wpepc-surface);
    color: var(--wpepc-muted);
    font-size: 12.5px;
    font-weight: 500;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.email-auth-container { text-align: left; }
.email-auth-container .form-group { margin-bottom: 1rem; }
.email-auth-container label {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin: .75rem 0;
    color: var(--wpepc-text);
    font-size: var(--text-sm);
    cursor: pointer;
}
.form-links {
    margin-top: 1rem;
    color: var(--wpepc-muted);
    font-size: var(--text-sm);
    text-align: center;
}
.form-links a {
    color: var(--wpepc-accent);
    font-weight: 500;
    transition: color .15s ease;
}
.form-links a:hover { color: var(--wpepc-primary-hover); text-decoration: underline; }
.login-foot {
    margin-top: 18px;
    color: var(--wpepc-muted);
    font-size: 12.5px;
}

/* Password field */
.password-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}
.password-input-wrapper input:not([type="checkbox"]):not([type="radio"]) {
    width: 100%;
    padding-right: 2.75rem;
}
.password-toggle {
    position: absolute;
    top: 50%;
    right: 12px;
    z-index: 2;
    display: inline-grid;
    place-items: center;
    padding: 5px;
    background: none;
    border: 0;
    border-radius: var(--wpepc-radius-sm);
    color: var(--wpepc-muted);
    cursor: pointer;
    transform: translateY(-50%);
    transition: color .15s ease;
}
.password-toggle:hover { color: var(--wpepc-ink); }
.password-toggle span { pointer-events: none; }
.password-toggle .pc-ico { width: 20px; height: 20px; vertical-align: middle; }

/* Strength meter + match feedback (state via data-strength / classes, no inline colours) */
.password-strength { margin-top: 6px; }
.password-strength .strength-bar {
    height: 4px;
    overflow: hidden;
    background: var(--wpepc-line);
    border-radius: var(--wpepc-radius-pill);
}
.password-strength .strength-fill {
    width: 0;
    height: 100%;
    background: var(--wpepc-line-strong);
    transition: width .2s ease, background-color .2s ease;
}
.password-strength .strength-text {
    display: block;
    margin-top: 4px;
    color: var(--wpepc-muted);
    font-size: 12.5px;
}
.password-strength[data-strength="1"] .strength-fill { background: var(--wpepc-danger); }
.password-strength[data-strength="1"] .strength-text { color: var(--wpepc-danger); }
.password-strength[data-strength="2"] .strength-fill,
.password-strength[data-strength="3"] .strength-fill { background: var(--wpepc-warning); }
.password-strength[data-strength="2"] .strength-text,
.password-strength[data-strength="3"] .strength-text { color: var(--wpepc-warning); }
.password-strength[data-strength="4"] .strength-fill,
.password-strength[data-strength="5"] .strength-fill { background: var(--wpepc-success); }
.password-strength[data-strength="4"] .strength-text,
.password-strength[data-strength="5"] .strength-text { color: var(--wpepc-success); }
.password-match-feedback { display: block; margin-top: 5px; font-size: 13px; }
.password-match-feedback.is-match { color: var(--wpepc-success); }
.password-match-feedback.is-mismatch { color: var(--wpepc-danger); }
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) input.is-valid { border-color: var(--wpepc-success); }
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) input.is-invalid { border-color: var(--wpepc-danger); }

/* Email verification */
.verification-success,
.verification-error {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid;
    border-radius: var(--wpepc-radius);
    color: var(--wpepc-ink);
    text-align: left;
}
.verification-success { background: var(--wpepc-success-bg); border-color: var(--wpepc-success); }
.verification-error { margin: 10px 0; padding: 15px; background: var(--wpepc-warning-bg); border-color: var(--wpepc-warning); }
.verification-success .icon { margin-bottom: 8px; color: var(--wpepc-success); text-align: center; }
.verification-success .icon .pc-ico { width: 48px; height: 48px; }
.verification-success h3 { margin: 0 0 8px; text-align: center; }
.verification-success p,
.verification-error p { margin: 0 0 8px; color: var(--wpepc-ink); }
.verification-note {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--wpepc-success);
    font-size: 13px;
}
.verification-success a,
.verification-error a { color: var(--wpepc-accent); text-decoration: underline; text-underline-offset: 2px; }
.verification-actions { margin-top: 20px; text-align: center; }
.verification-resend { margin-top: 10px; }
#resend-verification-form {
    margin: 10px 0;
    padding: 20px;
    background: var(--wpepc-surface-alt);
    border-radius: var(--wpepc-radius);
}
#resend-verification-form input { margin: 10px 0; }
#resend-verification-form .btn-secondary { margin-left: 10px; }
@media (max-width: 480px) {
    .password-input-wrapper input { font-size: 16px; }
    .password-toggle { right: 8px; }
}

/* Gallery auth section + logged-in bar */
.pc-gallery-auth-section:has(.pc-gallery-user-info) {
    padding: 0;
    background: none;
    border-radius: 0;
}
.pc-gallery-auth-section {
    margin-bottom: 1.5rem;
    padding: 20px;
    background: var(--wpepc-surface-alt);
    border-radius: var(--wpepc-radius);
    animation: pc-fade-in .2s ease;
}
.pc-gallery-user-info .user-welcome {
    display: flex;
    flex: 1;
    align-items: center;
    gap: 14px;
    min-width: 0;
}
.pc-gallery-user-info .user-details { flex: 1; min-width: 0; }
.pc-gallery-user-info .user-actions { flex: none; margin-left: auto; }
.pc-gallery-user-info {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: 14px;
    margin-bottom: 20px;
    padding: 14px 16px;
    background: var(--wpepc-surface);
    border: 1px solid var(--wpepc-line);
    border-radius: var(--wpepc-radius-lg);
}
.pc-gallery-user-info .user-profile-pic,
.pc-gallery-user-info .user-avatar-placeholder {
    width: 44px;
    height: 44px;
    flex: none;
    border-radius: 50%;
    object-fit: cover;
}
.pc-gallery-user-info .user-profile-pic { border: 2px solid var(--wpepc-line); }
.pc-gallery-user-info .user-avatar-placeholder {
    display: grid;
    place-items: center;
    background: var(--wpepc-ink);
    color: var(--wpepc-surface);
    font-size: 18px;
    font-weight: 700;
}
.pc-gallery-user-info .user-details h4 {
    margin: 0;
    color: var(--wpepc-ink);
    font-size: 16px;
}
.pc-gallery-user-info .user-email {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 2px 0 0;
    color: var(--wpepc-muted);
    font-size: 13.5px;
}
@media (max-width: 600px) {
    .pc-gallery-user-info { flex-wrap: wrap; }
    .pc-gallery-user-info .user-actions { margin-left: 0; }
}
.vote-status-bar {
    margin-bottom: 1rem;
    padding: 10px 14px;
    background: var(--wpepc-surface-alt);
    border-radius: var(--wpepc-radius);
    color: var(--wpepc-text);
    font-size: 14px;
}

/* ==========================================================================
   9. NOTICES, PHASE STATUS, EMPTY STATES
   ========================================================================== */
.pc-notice {
    margin: 1.5rem 0;
    padding: 14px 16px;
    background: var(--wpepc-info-bg);
    border-radius: var(--wpepc-radius);
    color: var(--wpepc-ink);
    font-size: 14.5px;
    line-height: 1.55;
}
.pc-notice > .pc-ico:first-child {
    margin: -2px 8px 0 0;
    color: var(--wpepc-info);
}
.pc-notice.pc-notice-success { background: var(--wpepc-success-bg); }
.pc-notice.pc-notice-success > .pc-ico:first-child { color: var(--wpepc-success); }
.pc-notice.pc-maintenance { background: var(--wpepc-warning-bg); }
.pc-notice.pc-maintenance > .pc-ico:first-child { color: var(--wpepc-warning); }
.pc-notice.pc-closed,
.pc-notice.pc-error { background: var(--wpepc-danger-bg); }
.pc-notice.pc-closed > .pc-ico:first-child,
.pc-notice.pc-error > .pc-ico:first-child { color: var(--wpepc-danger); }

.pc-phase-status {
    display: flex;
    align-items: center;
    gap: 14px;
    margin: 20px 0;
    padding: 16px 18px;
    background: var(--wpepc-surface);
    border: 1px solid var(--wpepc-line);
    border-radius: var(--wpepc-radius);
}
.pc-phase-status .pc-phase-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    flex: none;
    background: var(--wpepc-surface-alt);
    border-radius: 50%;
    color: var(--wpepc-accent);
}
.pc-phase-status strong {
    display: block;
    color: var(--wpepc-accent);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .1em;
    line-height: 1.2;
    text-transform: uppercase;
}
.pc-phase-status p {
    margin: 6px 0 0;
    color: var(--wpepc-ink);
    font-size: 15px;
}
.pc-phase-status .pc-phase-text { min-width: 0; }
.pc-phase-status .pc-phase-ends {
    display: block;
    margin-top: 4px;
    color: var(--wpepc-muted);
    font-size: 13px;
}
.pc-phase--registration .pc-phase-icon { background: var(--wpepc-info-bg); color: var(--wpepc-info); }
.pc-phase--submission .pc-phase-icon { background: var(--wpepc-success-bg); color: var(--wpepc-success); }
.pc-phase--review .pc-phase-icon { background: var(--wpepc-warning-bg); color: var(--wpepc-warning); }
.pc-phase--voting .pc-phase-icon { background: var(--wpepc-ink); color: var(--wpepc-surface); }
.pc-phase--closed .pc-phase-icon { background: var(--wpepc-surface-alt); color: var(--wpepc-muted); }
.pc-phase--results .pc-phase-icon { background: var(--wpepc-highlight); color: var(--wpepc-on-highlight); }
.wp-block-wpe-fotos-phase-status.alignfull .pc-phase-status { border-radius: 0; }

.no-photos {
    margin: 2rem 0;
    padding: 3rem 1.5rem;
    background: var(--wpepc-surface);
    border: 1px dashed var(--wpepc-line-strong);
    border-radius: var(--wpepc-radius-lg);
    color: var(--wpepc-muted);
    font-size: 15px;
    text-align: center;
}
.no-photos b,
.no-photos strong {
    display: block;
    margin-bottom: 4px;
    color: var(--wpepc-ink);
    font-size: 16px;
}
.pc-country-placeholder,
.no-votes,
.no-submissions {
    margin: 1rem 0;
    padding: 3rem;
    background: var(--wpepc-surface-alt);
    border: 1px dashed var(--wpepc-line-strong);
    border-radius: var(--wpepc-radius-lg);
    color: var(--wpepc-muted);
    text-align: center;
}
.no-votes p,
.no-submissions p {
    margin-bottom: 1.5rem;
    color: var(--wpepc-muted);
    font-size: var(--text-17px);
}

/* ==========================================================================
   10. DASHBOARDS (participant / voter)
   ========================================================================== */
.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1.25rem 1.5rem;
    background: var(--wpepc-surface);
    border: 1px solid var(--wpepc-line);
    border-radius: var(--wpepc-radius-lg);
}
.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}
.user-info h2 {
    margin: 0 0 .25rem;
    color: var(--wpepc-ink);
    font-size: 22px;
    line-height: 1.2;
}
.user-info .user-role {
    display: flex;
    align-items: center;
    gap: 6px;
    margin: 0;
    color: var(--wpepc-muted);
    font-size: 13.5px;
}
.profile-pic,
.profile-pic-placeholder {
    width: 52px;
    height: 52px;
    flex: none;
    border-radius: 50%;
    object-fit: cover;
}
.profile-pic-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wpepc-ink);
    color: var(--wpepc-surface);
    font-size: 18px;
    font-weight: 700;
}
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
    margin: 2rem 0;
}
.stat-card {
    padding: 18px 20px;
    background: var(--wpepc-surface);
    border: 1px solid var(--wpepc-line);
    border-radius: var(--wpepc-radius-lg);
}
.stat-card h3 {
    margin: 0;
    color: var(--wpepc-ink);
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1;
}
.stat-card p {
    margin: 8px 0 0;
    color: var(--wpepc-muted);
    font-size: 13.5px;
}
.pc-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.pc-participant-dashboard :is(.submission-section, .my-submissions) { margin-top: 30px; }
.my-submissions h3,
.my-votes h3,
.voter-actions h3 {
    margin-bottom: 1.25rem;
    color: var(--wpepc-ink);
    font-size: var(--text-xl);
}

/* Submission cards */
.submissions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    margin: 2rem 0;
}
.submission-card {
    overflow: hidden;
    background: var(--wpepc-surface);
    border: 1px solid var(--wpepc-line);
    border-radius: var(--wpepc-radius-lg);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.submission-card:hover {
    border-color: var(--wpepc-line-strong);
    box-shadow: var(--wpepc-shadow);
}
.submission-card img {
    display: block;
    width: 100%;
    height: 200px;
    object-fit: cover;
    background: var(--wpepc-surface-alt);
}
.submission-info { padding: 14px 16px; }
.submission-info h4 {
    margin: 0 0 .75rem;
    color: var(--wpepc-ink);
    font-size: 16px;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.submission-info p.location {
    margin: 0 0 .5rem;
    color: var(--wpepc-muted);
    font-size: 13.5px;
}
.submission-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .75rem;
}
.submission-meta .votes { color: var(--wpepc-ink); font-size: 13.5px; font-weight: 600; }
.submission-info small {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--wpepc-muted);
    font-size: 12.5px;
}
.submission-info small .pc-ico { width: 15px; height: 15px; }
.no-submissions .btn-primary { width: auto; }

/* Voter dashboard */
.pc-voter-dashboard .action-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    margin: 1.5rem 0;
}
.pc-voter-dashboard .action-buttons :is(.btn-secondary, .btn-primary) {
    display: flex;
    min-height: 48px;
}
.votes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1.5rem;
}
.vote-card {
    overflow: hidden;
    background: var(--wpepc-surface);
    border: 1px solid var(--wpepc-line);
    border-radius: var(--wpepc-radius);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.vote-card:hover {
    border-color: var(--wpepc-line-strong);
    box-shadow: var(--wpepc-shadow);
}
.vote-card img {
    display: block;
    width: 100%;
    height: 160px;
    object-fit: cover;
}
.vote-info { padding: .875rem; }
.vote-info h4 {
    margin: 0 0 .375rem;
    color: var(--wpepc-ink);
    font-size: var(--text-15px);
}
.vote-info .author,
.vote-info .location {
    margin: 0 0 .375rem;
    color: var(--wpepc-muted);
    font-size: 13px;
}
.vote-info small { color: var(--wpepc-muted); font-size: 12.5px; }
.view-all { margin-top: 1.25rem; text-align: center; }
.view-all a {
    color: var(--wpepc-accent);
    font-size: var(--text-15px);
    font-weight: 500;
}
.view-all a:hover { color: var(--wpepc-primary-hover); text-decoration: underline; }

/* ==========================================================================
   11. LEADERBOARD
   ========================================================================== */
.pc-leaderboard {
    max-width: 900px;
    margin: 2rem auto;
    padding: 1.5rem 1.25rem;
    background: var(--wpepc-surface);
    border: 1px solid var(--wpepc-line);
    border-radius: var(--wpepc-radius-lg);
}
.pc-leaderboard h2 {
    margin: 0 0 1.5rem;
    color: var(--wpepc-ink);
    font-size: 26px;
    text-align: center;
}
.leaderboard-list { margin: 0; padding: 0; list-style: none; }
.leaderboard-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .75rem .5rem;
    border-radius: var(--wpepc-radius);
    transition: background-color .15s ease;
}
.leaderboard-item + .leaderboard-item { border-top: 1px solid var(--wpepc-line); border-top-left-radius: 0; border-top-right-radius: 0; }
.leaderboard-item:hover { background: var(--wpepc-surface-alt); }
.rank {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    flex: none;
    background: var(--wpepc-surface-alt);
    border-radius: 50%;
    color: var(--wpepc-ink);
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}
.leaderboard-item .rank { margin: 0 8px; }
.rank.rank-1 { background: var(--wpepc-highlight); color: var(--wpepc-on-highlight); }
.rank.rank-2,
.rank.rank-3 { background: var(--wpepc-ink); color: var(--wpepc-surface); }
.photo-thumbnail {
    width: 70px;
    height: 70px;
    flex: none;
    overflow: hidden;
    border-radius: var(--wpepc-radius-sm);
    background: var(--wpepc-surface-alt);
}
.photo-thumbnail img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.photo-details { flex: 1; min-width: 0; }
.photo-details h4 {
    margin: 0 0 .25rem;
    color: var(--wpepc-ink);
    font-size: 15px;
}
.photo-details h4 a { color: inherit; }
.photo-details h4 a:hover { color: var(--wpepc-accent); }
.photo-details .author,
.photo-details .location {
    margin: 0 0 .25rem;
    color: var(--wpepc-muted);
    font-size: 13.5px;
}
.photo-details .votes,
.votes {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--wpepc-ink);
    font-size: 15px;
    font-weight: 700;
    line-height: 1;
}
.votes :is(svg, .pc-ico) { color: var(--wpepc-danger); fill: currentColor; }
@media (max-width: 480px) {
    .leaderboard-item {
        flex-direction: column;
        padding: 1.25rem;
        text-align: center;
    }
    .leaderboard-item .rank { margin-bottom: .5rem; }
}

/* ==========================================================================
   12. PAGINATION
   ========================================================================== */
.pc-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin: 2rem 0;
    font-size: var(--text-15px);
}
.page-info {
    padding: 0 6px;
    color: var(--wpepc-muted);
    font-size: 13.5px;
    font-weight: 500;
}
@media (max-width: 480px) {
    .pc-pagination { flex-direction: column; gap: .75rem; }
    .pc-pagination a,
    .page-info { width: 100%; text-align: center; }
}

.gallery-pagination-loadmore { margin: 2rem 0; text-align: center; }
.gallery-pagination-loadmore .btn-load-more .spinner {
    display: none;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, .4);
    border-top-color: var(--wpepc-on-primary);
    border-radius: 50%;
    animation: pc-spin .8s linear infinite;
}
.pc-pagination.loading .btn-load-more .spinner { display: inline-block; }
.pc-pagination.loading .btn-load-more span { display: none; }

.gallery-pagination-infinite {
    display: none;
    margin: 1rem 0;
    padding: 2rem 0;
    text-align: center;
}
.gallery-pagination-infinite.loading { display: block; }
.infinite-loader {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
    color: var(--wpepc-muted);
    font-size: var(--text-sm);
}
.infinite-loader .spinner {
    width: 24px;
    height: 24px;
    border: 3px solid var(--wpepc-line);
    border-top-color: var(--wpepc-accent);
    border-radius: 50%;
    animation: pc-spin .8s linear infinite;
}

.winner-badge .rank,
.winner-badge .rank.rank-1,
.winner-badge .rank.rank-2,
.winner-badge .rank.rank-3 {
    display: inline;
    width: auto;
    height: auto;
    background: none;
    border-radius: 0;
    color: var(--wpepc-ink);
    font-size: var(--text-sm);
}

/* ==========================================================================
   13. SINGLE SUBMISSION PAGE
   ========================================================================== */
.pc-single-submission {
    margin: 0 auto;
    padding: 20px 0;
}

.pc-breadcrumb {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 28px;
    padding: 10px 0;
    color: var(--wpepc-muted);
    font-size: 13.5px;
    font-weight: 500;
}
.pc-breadcrumb a {
    color: var(--wpepc-accent);
    transition: color .15s ease;
}
.pc-breadcrumb a:hover { color: var(--wpepc-ink); text-decoration: underline; }
.pc-breadcrumb .separator {
    display: flex;
    align-items: center;
    color: var(--wpepc-muted);
}
.pc-breadcrumb .separator :is(svg, .pc-ico) { width: 16px; height: 16px; }
.pc-breadcrumb .current { color: var(--wpepc-ink); font-weight: 500; }

.pc-submission-container {
    display: grid;
    grid-template-columns: 1fr 350px;
    gap: 30px;
    margin-bottom: 30px;
}
@media (max-width: 1024px) {
    .pc-submission-container { grid-template-columns: 1fr; }
    .pc-submission-sidebar { position: relative; top: 0; }
}
@media (max-width: 768px) {
    .pc-submission-container { grid-template-columns: 1fr; }
}

.pc-photo-wrapper {
    position: relative;
    overflow: hidden;
    background: var(--wpepc-surface-alt);
    border-radius: var(--wpepc-radius-lg);
    cursor: zoom-in;
}
.pc-main-photo {
    display: block;
    width: 100%;
    height: auto;
}
.pc-vote-section {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    padding: 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, .7), rgba(0, 0, 0, 0));
}
.pc-vote-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 34px;
    padding: 0 14px;
    background: var(--wpepc-page);
    color: var(--wpepc-ink);
    border-radius: var(--wpepc-radius-pill);
    font-size: 13.5px;
    font-weight: 600;
}
.pc-vote-count :is(svg, .pc-ico) {
    width: 16px;
    height: 16px;
    color: var(--wpepc-danger);
    fill: currentColor;
}

.pc-photo-details { padding: 30px 0; }
.pc-photo-details h1 {
    margin: 0 0 20px;
    color: var(--wpepc-ink);
    font-size: var(--text-32px);
    letter-spacing: -.01em;
}
.pc-photo-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 20px;
    margin-bottom: 20px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--wpepc-line);
}
.pc-meta-item {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--wpepc-text);
    font-size: var(--text-sm);
}
.pc-meta-item :is(svg, .pc-ico, .dashicons) { color: var(--wpepc-accent); }
.pc-photo-caption,
.pc-extended-info { margin: 30px 0; }
.pc-photo-caption h3,
.pc-extended-info h3,
.pc-exif-data h3 {
    margin-bottom: 12px;
    color: var(--wpepc-ink);
    font-size: var(--text-lg);
}
.pc-photo-caption p {
    color: var(--wpepc-text);
    font-size: var(--text-base);
    line-height: 1.6;
}
.pc-exif-data {
    margin-top: 30px;
    padding: 20px;
    background: var(--wpepc-surface-alt);
    border-radius: var(--wpepc-radius);
}
.pc-exif-data ul { margin: 0; padding: 0; list-style: none; }
.pc-exif-data li {
    padding: 8px 0;
    border-bottom: 1px solid var(--wpepc-line);
    color: var(--wpepc-text);
    font-size: var(--text-sm);
}
.pc-exif-data li:last-child { border-bottom: 0; }

.pc-submission-sidebar {
    position: sticky;
    top: 20px;
    height: fit-content;
}
.pc-share-box,
.pc-more-photos {
    margin-bottom: 20px;
    padding: 18px;
    background: var(--wpepc-surface);
    border: 1px solid var(--wpepc-line);
    border-radius: var(--wpepc-radius-lg);
}
.pc-share-box h3,
.pc-more-photos h3 {
    margin: 0 0 12px;
    color: var(--wpepc-ink);
    font-size: 16px;
}
.pc-share-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-bottom: 12px;
}
.pc-copy-link { display: flex; gap: 8px; margin-top: 12px; }
:is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) .pc-copy-link input {
    flex: 1;
    min-width: 0;
    min-height: 36px;
    padding: 6px 10px;
    background: var(--wpepc-surface-alt);
    font-size: 13px;
}
.pc-more-photos-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}
.pc-more-photo-item {
    display: block;
    overflow: hidden;
    border-radius: var(--wpepc-radius-sm);
}
.pc-more-photo-item img {
    display: block;
    width: 100%;
    height: 120px;
    object-fit: cover;
    transition: opacity .15s ease;
}
.pc-more-photo-item:hover img { opacity: .88; }

.pc-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding: 20px 0;
    border-top: 1px solid var(--wpepc-line);
}
.nav-prev,
.nav-next {
    display: flex;
    align-items: center;
    gap: 6px;
}
.pc-nav-disabled { visibility: hidden; width: 120px; }
.pc-single-submission.hide-more-photos .pc-more-photos { display: none; }
@media (max-width: 768px) {
    .pc-photo-details h1 { font-size: var(--text-2xl); }
    .pc-single-submission .pc-submission-sidebar { order: -1; }
    /* Share buttons: icon-only 4-up grid */
    .pc-single-submission .pc-share-buttons { grid-template-columns: repeat(4, 1fr); gap: 8px; }
    .pc-single-submission .pc-share-btn {
        justify-content: center;
        gap: 0;
        padding: 0;
        font-size: 0;
    }
    .pc-single-submission .pc-share-btn :is(svg, .pc-ico) { width: 20px; height: 20px; }
}
@media (max-width: 600px) {
    .pc-navigation { flex-wrap: wrap; justify-content: center; }
    .pc-nav-disabled { display: none; }
}

/* ==========================================================================
   14. OVERLAYS: modal, lightbox, image popup, toast
   ========================================================================== */
.pc-modal {
    position: fixed;
    inset: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wpepc-overlay);
    backdrop-filter: blur(4px);
}
.pc-modal-content {
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}
.pc-login-modal-content {
    width: 90%;
    max-width: 500px;
    animation: pc-fade-in .2s ease;
}
.pc-login-modal-content .pc-login-form { margin: 0; }
@media (max-width: 600px) {
    .pc-login-modal-content { width: 95%; max-height: 95vh; }
    .pc-login-modal-content .pc-login-form { padding: 1.5rem; }
}

.pc-modal-close,
.pc-popup-close,
.pc-lightbox-close {
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 0;
    border-radius: 50%;
    cursor: pointer;
    line-height: 1;
    transition: var(--transition-base);
}
.pc-modal-close {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 10;
    width: 34px;
    height: 34px;
    background: var(--wpepc-surface);
    color: var(--wpepc-ink);
    border: 1px solid var(--wpepc-line);
    box-shadow: var(--wpepc-shadow);
}
.pc-modal-close:hover { border-color: var(--wpepc-ink); }
.pc-popup-close,
.pc-lightbox-close {
    position: absolute;
    top: 20px;
    right: 24px;
    z-index: 2;
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, .14);
    color: var(--wpepc-page);
}
.pc-popup-close:hover,
.pc-lightbox-close:hover { background: rgba(255, 255, 255, .26); }
.pc-modal-close .pc-ico,
.pc-popup-close .pc-ico,
.pc-lightbox-close .pc-ico { width: 24px; height: 24px; }

.pc-country-update-notice {
    max-width: 600px;
    margin: 40px auto;
    padding: 40px;
    background: var(--wpepc-surface);
    border-radius: var(--wpepc-radius-lg);
    box-shadow: var(--wpepc-shadow-lg);
    text-align: center;
}
.pc-country-update-notice .notice-icon {
    display: inline-grid;
    place-items: center;
    width: 56px;
    height: 56px;
    margin-bottom: 16px;
    background: var(--wpepc-surface-alt);
    border-radius: 50%;
    color: var(--wpepc-accent);
}
.pc-country-update-notice .notice-icon .pc-ico { width: 28px; height: 28px; }
.pc-country-update-notice h2 { margin: 0 0 10px; font-size: 22px; }
.pc-country-update-notice p {
    margin-bottom: 24px;
    color: var(--wpepc-text);
    font-size: var(--text-base);
    line-height: 1.6;
}
.pc-country-update-notice .form-group { margin-bottom: 20px; text-align: left; }
.pc-modal .pc-country-update-notice { width: 90%; max-width: 500px; margin: 0; }
.pc-country-update-notice select,
.pc-country-update-notice .select2-container { width: 100% !important; }
.pc-country-update-notice .form-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
}
.pc-country-update-notice .form-message {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: var(--wpepc-radius);
    font-size: var(--text-sm);
    animation: pc-fade-in .2s ease;
}
.pc-country-update-notice .form-message.success { background: var(--wpepc-success-bg); color: var(--wpepc-success); }
.pc-country-update-notice .form-message.error { background: var(--wpepc-danger-bg); color: var(--wpepc-danger); }
.pc-country-placeholder p {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-size: 15px;
}
.pc-country-updated { color: var(--wpepc-success); font-weight: 600; }
@media (max-width: 600px) {
    .pc-country-update-notice { margin: 20px; padding: 25px; }
    .pc-modal .pc-country-update-notice { margin: 0; }
    .pc-country-update-notice h2 { font-size: 20px; }
    .pc-country-update-notice .form-actions { flex-direction: column; }
    .pc-country-update-notice .form-actions :is(.btn-primary, .btn-secondary) { width: 100%; }
}
.pc-country-update-notice .notice-footer {
    margin-top: 24px;
    padding-top: 20px;
    border-top: 1px solid var(--wpepc-line);
}
.pc-country-update-notice .notice-footer small { color: var(--wpepc-muted); font-size: 13px; }

.pc-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--wpepc-overlay);
    cursor: pointer;
}
.pc-lightbox-img,
.pc-popup-image {
    max-width: 90%;
    max-height: 90%;
    object-fit: contain;
    border-radius: var(--wpepc-radius-sm);
}
.pc-image-popup {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: none;
    align-items: center;
    justify-content: center;
    background: var(--wpepc-overlay);
    cursor: zoom-out;
}
.pc-image-popup.active { display: flex; }

.pc-notification {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 360px;
    padding: 12px 16px;
    background: var(--wpepc-ink);
    color: var(--wpepc-page);
    border-radius: var(--wpepc-radius);
    box-shadow: var(--wpepc-shadow-lg);
    font-size: var(--text-sm);
    line-height: 1.4;
}
.pc-notification .pc-ico { color: color-mix(in srgb, var(--wpepc-info) 40%, white); }
.pc-notification--success .pc-ico,
.pc-notification.success .pc-ico { color: color-mix(in srgb, var(--wpepc-success) 45%, white); }
.pc-notification--error .pc-ico,
.pc-notification.error .pc-ico { color: color-mix(in srgb, var(--wpepc-danger) 45%, white); }

/* ==========================================================================
   15. PHASE TIMELINE (single definition)
   ========================================================================== */
.pc-phase-timeline-modern {
    --node-size: 60px;
    --timeline-padding: 3rem 1rem;
    --color-title: var(--wpepc-ink);
    --color-date: var(--wpepc-muted);
    --color-inactive: var(--wpepc-line);
    --track-height: 4px;

    position: relative;
    width: 100%;
    margin: 2rem 0;
    padding: var(--timeline-padding);
    overflow: hidden;
    box-sizing: border-box;
}
.pc-phase-timeline-modern .timeline-wrapper {
    position: relative;
    width: 100%;
    line-height: normal;
}
.pc-phase-timeline-modern .timeline-items {
    position: relative;
    display: flex;
    justify-content: space-between;
}
.pc-phase-timeline-modern .timeline-track {
    position: absolute;
    left: 10%;
    right: 10%;
    top: calc(var(--node-size, 60px) / 2);
    z-index: 1;
    height: var(--track-height);
    margin: 0;
    background: var(--color-inactive);
    border-radius: var(--wpepc-radius-pill);
    transform: translateY(-50%);
}
/* Track runs from first to last node centre: inset = half an item = 100% / (2n) */
.pc-phase-timeline-modern .timeline-wrapper:has(.timeline-item:nth-child(3):last-child) .timeline-track { left: 16.6667%; right: 16.6667%; }
.pc-phase-timeline-modern .timeline-wrapper:has(.timeline-item:nth-child(4):last-child) .timeline-track { left: 12.5%; right: 12.5%; }
.pc-phase-timeline-modern .timeline-wrapper:has(.timeline-item:nth-child(6):last-child) .timeline-track { left: 8.3333%; right: 8.3333%; }
.pc-phase-timeline-modern .timeline-wrapper:has(.timeline-item:nth-child(7):last-child) .timeline-track { left: 7.1429%; right: 7.1429%; }
.pc-phase-timeline-modern .timeline-wrapper:has(.timeline-item:nth-child(8):last-child) .timeline-track { left: 6.25%; right: 6.25%; }
.pc-phase-timeline-modern .timeline-progress {
    height: 100%;
    background: var(--wpepc-primary);
    border-radius: var(--wpepc-radius-pill);
    transition: width .6s ease;
}
.pc-phase-timeline-modern .timeline-item {
    position: relative;
    z-index: 2;
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.pc-phase-timeline-modern .timeline-node {
    position: relative;
    z-index: 2;
    width: var(--node-size, 60px);
    height: var(--node-size, 60px);
    margin-bottom: 1.5rem;
    background: var(--wpepc-surface);
    border-radius: 50%;
}
.pc-phase-timeline-modern .node-ring {
    position: absolute;
    inset: 0;
    background: var(--wpepc-surface);
    border: 3px solid var(--color-inactive);
    border-radius: 50%;
    transition: var(--transition-base);
}
.pc-phase-timeline-modern .node-icon {
    position: absolute;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--wpepc-muted);
}
.pc-phase-timeline-modern .node-icon :is(svg, .pc-ico) {
    width: 40%;
    height: 40%;
    fill: currentColor;
}
.pc-phase-timeline-modern .node-pulse { display: none; }

.pc-phase-timeline-modern .timeline-item.completed .node-ring {
    background: var(--wpepc-primary);
    border-color: var(--wpepc-primary);
}
.pc-phase-timeline-modern .timeline-item.completed .node-icon { color: var(--wpepc-on-primary); }
.pc-phase-timeline-modern .timeline-item.current .node-ring {
    background: var(--wpepc-surface);
    border-color: var(--wpepc-accent);
    box-shadow: var(--wpepc-focus-ring);
}
.pc-phase-timeline-modern .timeline-item.current .node-icon { color: var(--wpepc-accent); }
.pc-phase-timeline-modern .timeline-item.current .node-icon :is(svg, .pc-ico) { fill: currentColor; }

.pc-phase-timeline-modern .timeline-content {
    width: 100%;
    padding: 0 5px;
}
.pc-phase-timeline-modern .timeline-date {
    display: inline-block;
    margin-bottom: .5rem;
    color: var(--color-date);
    font-size: 12.5px;
    font-weight: 600;
    line-height: 1.2;
}
.pc-phase-timeline-modern .timeline-title {
    margin: 0 0 .5rem;
    color: var(--color-title);
    font-size: 14.5px;
    font-weight: 700;
    line-height: 1.3;
}
.pc-phase-timeline-modern .timeline-item.upcoming .timeline-title { color: var(--wpepc-text); }
.pc-phase-timeline-modern .timeline-badge {
    display: inline-block;
    margin-top: 5px;
    padding: 4px 9px;
    background: var(--wpepc-highlight);
    color: var(--wpepc-on-highlight);
    border-radius: var(--wpepc-radius-pill);
    font-size: 12.5px;
    font-weight: 700;
    letter-spacing: .06em;
    line-height: 1;
    text-transform: uppercase;
}
.pc-phase-timeline-modern .timeline-badge.completed {
    background: var(--wpepc-success-bg);
    color: var(--wpepc-success);
}
.pc-phase-timeline-modern .timeline-connector { display: none; }

.pc-phase-timeline-modern.direction-vertical { display: block; }
.pc-phase-timeline-modern.direction-vertical .timeline-items { flex-direction: column; gap: 0; }
.pc-phase-timeline-modern.direction-vertical .timeline-track { display: none; }

@media (max-width: 768px) {
    .pc-phase-timeline-modern .timeline-items { flex-direction: column; gap: 0; }
    .pc-phase-timeline-modern .timeline-track { display: none; }
    .pc-phase-timeline-modern .timeline-item {
        flex-direction: row;
        align-items: flex-start;
        padding-bottom: 2rem;
        text-align: left;
    }
    .pc-phase-timeline-modern .timeline-item:last-child { padding-bottom: 0; }
    .pc-phase-timeline-modern .timeline-node {
        flex-shrink: 0;
        margin-right: 1.25rem;
        margin-bottom: 0;
    }
    .pc-phase-timeline-modern .timeline-connector {
        position: absolute;
        top: var(--node-size);
        left: calc(var(--node-size) / 2 - 1px);
        z-index: 1;
        display: block;
        width: 2px;
        height: calc(100% - var(--node-size));
        background: var(--color-inactive);
    }
    .pc-phase-timeline-modern .timeline-item:last-child .timeline-connector { display: none; }
    .pc-phase-timeline-modern .timeline-connector.active { background: var(--wpepc-primary); }
    .pc-phase-timeline-modern .timeline-content {
        padding-top: .25rem;
        text-align: left;
    }
    .pc-phase-timeline-modern .timeline-date { margin-bottom: .25rem; }
}

/* Showcase variant: [photo_phase_timeline variant="showcase"]
   5 columns, 84px nodes, date pills, descriptions; scrolls sideways on small screens. */
.pc-phase-timeline-modern.pc-phase-timeline--showcase {
    --node-size: 84px;
    --timeline-padding: 12px 10px 8px;
    overflow-x: auto;
}
.pc-phase-timeline--showcase .timeline-wrapper { min-width: 860px; }
.pc-phase-timeline--showcase .timeline-track {
    top: 52px;
    left: 10%;
    right: 10%;
    height: 4px;
    background: var(--wpepc-line);
}
.pc-phase-timeline--showcase .timeline-progress { background: var(--wpepc-accent); }
.pc-phase-timeline--showcase .timeline-item { padding: 0 10px; }
.pc-phase-timeline--showcase .timeline-node {
    width: 84px;
    height: 84px;
    margin: 10px 0 28px;
}
.pc-phase-timeline--showcase .node-ring {
    background: var(--wpepc-surface);
    border: 0;
    box-shadow: 0 8px 22px -6px color-mix(in srgb, var(--wpepc-ink) 22%, transparent);
    box-sizing: border-box;
}
.pc-phase-timeline--showcase .node-icon { color: var(--wpepc-muted); }
.pc-phase-timeline--showcase .node-icon :is(svg, .pc-ico) { width: 30px; height: 30px; }
.pc-phase-timeline--showcase .timeline-item.completed .node-ring {
    background: var(--wpepc-accent);
    box-shadow: none;
}
.pc-phase-timeline--showcase .timeline-item.completed .node-icon { color: var(--wpepc-surface); }
.pc-phase-timeline--showcase .timeline-item.completed .node-icon :is(svg, .pc-ico),
.pc-phase-timeline--showcase .timeline-item.current .node-icon :is(svg, .pc-ico) { width: 34px; height: 34px; }
.pc-phase-timeline--showcase .timeline-item.current .node-ring {
    background: var(--wpepc-surface);
    border: 5px solid var(--wpepc-accent);
    box-shadow: 0 0 0 9px color-mix(in srgb, var(--wpepc-accent) 18%, transparent);
}
.pc-phase-timeline--showcase .timeline-item.current .node-icon { color: var(--wpepc-accent); }
.pc-phase-timeline--showcase .timeline-date {
    margin: 0;
    padding: 7px 16px;
    background: var(--wpepc-surface);
    color: var(--wpepc-muted);
    border-radius: var(--wpepc-radius-pill);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .05em;
    line-height: 1.2;
    text-transform: uppercase;
}
.pc-phase-timeline--showcase .timeline-item.current .timeline-date {
    background: var(--wpepc-highlight);
    color: var(--wpepc-on-highlight);
}
.pc-phase-timeline--showcase .timeline-title {
    max-width: 200px;
    margin: 20px auto 0;
    color: var(--wpepc-ink);
    font-size: 20px;
    font-weight: 700;
    letter-spacing: -.01em;
    line-height: 1.25;
}
.pc-phase-timeline--showcase .timeline-item.current .timeline-title { color: var(--wpepc-ink); }
.pc-phase-timeline--showcase .timeline-item.upcoming:not(.current) .timeline-title { color: var(--wpepc-text); }
.pc-phase-timeline--showcase .timeline-desc {
    max-width: 210px;
    margin: 8px auto 0;
    color: var(--wpepc-muted);
    font-size: 14px;
    line-height: 1.5;
}
.pc-phase-timeline--showcase .timeline-badge {
    margin-top: 18px;
    padding: 7px 16px;
    background: var(--wpepc-accent);
    color: var(--wpepc-surface);
    box-shadow: 0 6px 14px -4px color-mix(in srgb, var(--wpepc-accent) 40%, transparent);
    font-size: 12.5px;
    letter-spacing: .1em;
}
@media (max-width: 768px) {
    .pc-phase-timeline--showcase .timeline-items { flex-direction: row; }
    .pc-phase-timeline--showcase .timeline-track { display: block; }
    .pc-phase-timeline--showcase .timeline-item {
        flex-direction: column;
        align-items: center;
        padding: 0 10px;
        text-align: center;
    }
    .pc-phase-timeline--showcase .timeline-node { margin: 10px 0 28px; }
    .pc-phase-timeline--showcase .timeline-connector { display: none; }
    .pc-phase-timeline--showcase .timeline-content { padding-top: 0; text-align: center; }
}

/* ==========================================================================
   16. GUTENBERG BLOCK ALIGNMENT + GALLERY BLOCK CONTROLS (layout, unchanged)
   ========================================================================== */
.wp-block-wpe-fotos-photo-competition,
.wp-block-wpe-fotos-photo-submission,
.wp-block-wpe-fotos-photo-gallery,
.wp-block-wpe-fotos-photo-leaderboard,
.wp-block-wpe-fotos-user-dashboard,
.wp-block-wpe-fotos-phase-status,
.wp-block-wpe-fotos-phase-timeline {
    margin-left: auto;
    margin-right: auto;
}

.wp-block-wpe-fotos-photo-competition.alignwide,
.wp-block-wpe-fotos-photo-submission.alignwide,
.wp-block-wpe-fotos-photo-gallery.alignwide,
.wp-block-wpe-fotos-photo-leaderboard.alignwide,
.wp-block-wpe-fotos-user-dashboard.alignwide,
.wp-block-wpe-fotos-phase-status.alignwide,
.wp-block-wpe-fotos-phase-timeline.alignwide {
    max-width: var(--wp--style--global--wide-size, 1280px);
    width: 100%;
    margin-left: auto;
    margin-right: auto;
}

@supports not (max-width: var(--wp--style--global--wide-size)) {
    .wp-block-wpe-fotos-photo-competition.alignwide,
    .wp-block-wpe-fotos-photo-submission.alignwide,
    .wp-block-wpe-fotos-photo-gallery.alignwide,
    .wp-block-wpe-fotos-photo-leaderboard.alignwide,
    .wp-block-wpe-fotos-user-dashboard.alignwide,
    .wp-block-wpe-fotos-phase-status.alignwide,
    .wp-block-wpe-fotos-phase-timeline.alignwide {
        max-width: 1280px;
        width: calc(100% + 200px);
        margin-left: -100px;
        margin-right: -100px;
    }
}

.wp-block-wpe-fotos-photo-competition.alignfull,
.wp-block-wpe-fotos-photo-submission.alignfull,
.wp-block-wpe-fotos-photo-gallery.alignfull,
.wp-block-wpe-fotos-photo-leaderboard.alignfull,
.wp-block-wpe-fotos-user-dashboard.alignfull,
.wp-block-wpe-fotos-phase-status.alignfull,
.wp-block-wpe-fotos-phase-timeline.alignfull {
    max-width: none;
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
}

.wp-block-wpe-fotos-photo-competition.alignfull > *,
.wp-block-wpe-fotos-photo-submission.alignfull > *,
.wp-block-wpe-fotos-photo-leaderboard.alignfull > *,
.wp-block-wpe-fotos-user-dashboard.alignfull > *,
.wp-block-wpe-fotos-phase-status.alignfull > *,
.wp-block-wpe-fotos-phase-timeline.alignfull > * {
    padding-left: max(1rem, calc((100vw - 1200px) / 2));
    padding-right: max(1rem, calc((100vw - 1200px) / 2));
}
.wp-block-wpe-fotos-photo-gallery.alignfull > * {
    padding-left: 1rem;
    padding-right: 1rem;
}
.wp-block-wpe-fotos-photo-competition.alignfull,
.wp-block-wpe-fotos-photo-gallery.alignfull {
    padding-top: 2rem;
    padding-bottom: 2rem;
}

.wp-block-wpe-fotos-photo-gallery.alignwide .photo-grid { column-count: 4; }
.wp-block-wpe-fotos-photo-gallery.alignfull .photo-grid { column-count: 5; column-gap: 1rem; }

@media (max-width: 1400px) {
    .wp-block-wpe-fotos-photo-gallery.alignwide .photo-grid,
    .wp-block-wpe-fotos-photo-gallery.alignfull .photo-grid { column-count: 4; }
}
@media (max-width: 1100px) {
    .wp-block-wpe-fotos-photo-gallery.alignwide .photo-grid,
    .wp-block-wpe-fotos-photo-gallery.alignfull .photo-grid { column-count: 3; }
}
@media (max-width: 768px) {
    .wp-block-wpe-fotos-photo-gallery.alignwide .photo-grid,
    .wp-block-wpe-fotos-photo-gallery.alignfull .photo-grid { column-count: 2; }

    .wp-block-wpe-fotos-photo-competition.alignwide,
    .wp-block-wpe-fotos-photo-submission.alignwide,
    .wp-block-wpe-fotos-photo-gallery.alignwide,
    .wp-block-wpe-fotos-photo-leaderboard.alignwide,
    .wp-block-wpe-fotos-user-dashboard.alignwide,
    .wp-block-wpe-fotos-phase-status.alignwide,
    .wp-block-wpe-fotos-phase-timeline.alignwide {
        max-width: 100%;
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
    .wp-block-wpe-fotos-photo-competition.alignfull > *,
    .wp-block-wpe-fotos-photo-submission.alignfull > *,
    .wp-block-wpe-fotos-photo-gallery.alignfull > *,
    .wp-block-wpe-fotos-photo-leaderboard.alignfull > *,
    .wp-block-wpe-fotos-user-dashboard.alignfull > *,
    .wp-block-wpe-fotos-phase-status.alignfull > *,
    .wp-block-wpe-fotos-phase-timeline.alignfull > * {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}
@media (max-width: 480px) {
    .wp-block-wpe-fotos-photo-gallery.alignwide .photo-grid,
    .wp-block-wpe-fotos-photo-gallery.alignfull .photo-grid { column-count: 1; }
}

/* Grid display mode */
.wp-block-wpe-fotos-photo-gallery.gallery-mode-grid .photo-grid {
    display: grid;
    grid-template-columns: repeat(var(--gallery-grid-cols, 3), 1fr);
    gap: 1.5rem;
    column-count: unset;
}
@media (max-width: 768px) {
    .wp-block-wpe-fotos-photo-gallery.gallery-mode-grid .photo-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 480px) {
    .wp-block-wpe-fotos-photo-gallery.gallery-mode-grid .photo-grid { grid-template-columns: 1fr; }
}
.wp-block-wpe-fotos-photo-gallery.gallery-mode-grid .photo-item {
    break-inside: unset;
    margin-bottom: 0;
}

/* Aspect ratio cropping */
.wp-block-wpe-fotos-photo-gallery.gallery-aspect-square .photo-wrapper { aspect-ratio: 1 / 1; }
.wp-block-wpe-fotos-photo-gallery.gallery-aspect-4-3 .photo-wrapper { aspect-ratio: 4 / 3; }
.wp-block-wpe-fotos-photo-gallery.gallery-aspect-3-4 .photo-wrapper { aspect-ratio: 3 / 4; }
.wp-block-wpe-fotos-photo-gallery.gallery-aspect-16-9 .photo-wrapper { aspect-ratio: 16 / 9; }
.wp-block-wpe-fotos-photo-gallery[class*="gallery-aspect-"] .photo-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================================================
   17. JURY CARD BLOCK
   ========================================================================== */
.wpe-jury-card,
.wpe-jury-member-edit {
    padding: 24px;
    background: var(--wpepc-surface);
    border: 1px solid var(--wpepc-line);
    border-radius: var(--wpepc-radius-lg);
    text-align: center;
    box-shadow: var(--wpepc-shadow);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.wpe-jury-member-edit { border: 2px dashed var(--wpepc-line-strong); box-shadow: none; }
.wpe-jury-card:hover { border-color: var(--wpepc-line-strong); box-shadow: var(--wpepc-shadow-lg); }
.wpe-jury-image,
.wpe-jury-image-wrapper {
    width: 120px;
    height: 120px;
    margin: 0 auto 16px;
    overflow: hidden;
    background: var(--wpepc-surface-alt);
    border-radius: 50%;
}
.wpe-jury-image-wrapper { position: relative; cursor: pointer; }
.wpe-jury-image-wrapper:hover { opacity: .8; }
.wpe-jury-image-wrapper img,
.wpe-jury-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.wpe-jury-card .wpe-jury-name,
.wpe-jury-member-edit .wpe-jury-name {
    margin: 0 0 4px;
    color: var(--wpepc-ink);
    font-size: var(--text-xl);
    font-weight: 700;
}
.wpe-jury-card .wpe-jury-profession,
.wpe-jury-member-edit .wpe-jury-profession {
    margin: 0 0 12px;
    color: var(--wpepc-muted);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .04em;
    text-transform: uppercase;
}
.wpe-jury-card .wpe-jury-bio,
.wpe-jury-member-edit .wpe-jury-bio {
    margin-bottom: 20px;
    color: var(--wpepc-text);
    font-size: var(--text-15px);
    line-height: 1.6;
}
.wpe-jury-socials,
.wpe-jury-socials-preview {
    display: flex;
    justify-content: center;
    gap: 12px;
}
.wpe-jury-socials a,
.wpe-jury-socials-preview span {
    color: var(--wpepc-muted);
    text-decoration: none;
    transition: color .15s ease;
}
.wpe-jury-socials a:hover { color: var(--wpepc-accent); }
.wpe-jury-socials .dashicons,
.wpe-jury-socials-preview .dashicons {
    width: 20px;
    height: 20px;
    font-size: var(--text-xl);
}

/* ==========================================================================
   18. PHOTO MARQUEE (block / [photo_marquee]) - continuous scroll is the feature
   ========================================================================== */
.pc-marquee { display: grid; gap: var(--pc-mq-gap, 14px); overflow: hidden; padding: 6px 0; }
.pc-marquee--fade { -webkit-mask-image: linear-gradient(90deg, transparent, black 7%, black 93%, transparent); mask-image: linear-gradient(90deg, transparent, black 7%, black 93%, transparent); }
.pc-marquee-row { overflow: hidden; }
.pc-marquee-track { display: flex; gap: var(--pc-mq-gap, 14px); width: max-content; animation: pc-marquee-scroll var(--pc-mq-duration, 60s) linear infinite; }
.pc-marquee-clone { display: contents; }
.pc-marquee-row--rev .pc-marquee-track { animation-direction: reverse; }
.pc-marquee--pause:hover .pc-marquee-track { animation-play-state: paused; }
.pc-marquee-item { position: relative; display: block; flex: 0 0 auto; height: var(--pc-mq-height, 220px); aspect-ratio: 3 / 2; margin: 0; border-radius: var(--pc-mq-radius, var(--wpepc-radius-lg)); overflow: hidden; background: var(--wpepc-surface-alt); text-decoration: none; }
.pc-marquee-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .2s ease; }
.pc-marquee-item:hover img, .pc-marquee-item:focus-visible img { transform: scale(1.03); }
.pc-marquee-caption { position: absolute; left: 0; right: 0; bottom: 0; padding: 28px 14px 12px; display: flex; flex-direction: column; gap: 2px; color: var(--wpepc-page); font-size: 14px; line-height: 1.3; background: linear-gradient(180deg, transparent, rgba(0, 0, 0, .72)); opacity: 0; transform: translateY(8px); transition: opacity .2s ease, transform .2s ease; }
.pc-marquee-caption em { font-style: normal; font-size: 12.5px; opacity: .9; }
.pc-marquee-item:hover .pc-marquee-caption, .pc-marquee-item:focus-visible .pc-marquee-caption { opacity: 1; transform: none; }
.pc-marquee-item:focus-visible { outline: 3px solid var(--wpepc-accent); outline-offset: 2px; }
@keyframes pc-marquee-scroll { to { transform: translateX(calc(-50% - var(--pc-mq-gap, 14px) / 2)); } }
@media (max-width: 767px) { .pc-marquee-item { height: calc(var(--pc-mq-height, 220px) * .65); } }
@media (prefers-reduced-motion: reduce) {
    .pc-marquee-track { animation: none; overflow-x: auto; scroll-snap-type: x mandatory; }
    .pc-marquee-row { overflow-x: auto; }
    .pc-marquee-clone { display: none; }
}

/* ==========================================================================
   19. PAGE TEMPLATES (classic themes; block themes use registered templates)
   ========================================================================== */
.site-main.pc-template--page { max-width: 1200px; margin: 0 auto; padding: 40px 20px 60px; box-sizing: border-box; }
.site-main.pc-template--full { width: 100%; }

/* ==========================================================================
   20. MOTION + PRINT
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    :is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]),
    :is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) *,
    :is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) *::before,
    :is(.pc-competition-wrapper, .pc-gallery, .pc-submission-form, .pc-submission-wrap, .pc-user-dashboard, .pc-voter-dashboard, .pc-leaderboard, .pc-single-submission, .pc-single-submission-wrapper, .pc-login-form, .pc-modal, .pc-lightbox, .pc-image-popup, .pc-notification, .pc-phase-timeline-modern, .pc-phase-status, .pc-notice, .pc-country-update-notice, .wpe-fotos-elementor-widget, .pc-marquee, [class*="wp-block-wpe-fotos-"]) *::after {
        animation-duration: .001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .001ms !important;
        scroll-behavior: auto !important;
    }
}

@media print {
    .btn-vote,
    .btn-primary,
    .btn-secondary,
    .photo-overlay { display: none !important; }
}
