/**
 * Cannabis Judging Platform - Judge Dashboard Styles
 * 
 * Styles for judge-specific interfaces
 * 
 * @package CannabisJudgingPlatform
 * @version 3.6.0
 * @author HEADYMONSTER
 */

/* ========================================
   Billy's Awards Judging Form - Clean Design
   ======================================== */

/* Reset and Base Styles */
.cjp-judging-form-wrapper * {
    box-sizing: border-box;
}

/* Main container styles */
.cjp-judging-form-wrapper {
    color: #fff;
    max-width: 800px;
    margin: 0 auto;
    padding: 30px;
    font-family: "Inter", Sans-serif;
}

.cjp-judging-form-title {
    color: #d4af37;
    text-align: center;
    font-size: 36px;
    font-weight: 500;
    margin: 0 0 40px;
    font-family: "Inter", Sans-serif;
}

/* Form field styles */
.cjp-form-field {
    margin-bottom: 30px;
}

.cjp-field-label {
    display: block;
    color: #E8E8E8;
    margin-bottom: 10px;
}

.cjp-field-label .required {
    color: #c02b0a;
    display: inline-block;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 0.5px;
}

.cjp-field-desc {
    color: #999;
    font-size: 14px;
    margin-top: 5px;
    font-style: italic;
}

/* Entry display (non-editable) */
.cjp-entry-display {
    width: 100%;
    padding: 12px;
    background-color: #222;
    color: #fff;
    border: 1px solid #333;
    border-radius: 3px;
    font-size: 16px;
    height: 46px;
    line-height: 24px;
}

/* Radio button styles */
.cjp-radio-group {
    margin-top: 10px;
}

.cjp-radio-option {
    margin-bottom: 12px;
    display: flex;
    align-items: center;
}

.cjp-radio-option input[type="radio"] {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border: 2px solid #555;
    border-radius: 50%;
    outline: none;
    margin-right: 10px;
    background-color: #1e1e1e;
    position: relative;
    cursor: pointer;
}

.cjp-radio-option input[type="radio"]:checked {
    border-color: #c2b067;
    background-color: #c2b067;
}

.cjp-radio-option input[type="radio"]:checked::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-color: #d4af37;
}

.cjp-radio-option label {
    color: #B0B0B0;
    cursor: pointer;
}

/* Number input styles */
.cjp-number-input {
    padding: 12px;
    background-color: #222;
    color: #fff;
    border: 1px solid #333;
    border-radius: 3px;
    font-size: 18px;
    width: 120px;
}

.cjp-number-input::-webkit-inner-spin-button,
.cjp-number-input::-webkit-outer-spin-button {
    opacity: 1;
    height: 30px;
    width: 30px;
}

/* Textarea styles */
.cjp-textarea {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    background-color: #222;
    color: #fff;
    border: 1px solid #333;
    border-radius: 3px;
    font-size: 16px;
    font-family: inherit;
    resize: vertical;
}

/* Submit button styles */
.cjp-form-footer {
    text-align: center;
    margin-top: 40px;
}

.cjp-submit-button {
    background: linear-gradient(180deg, #1c1c1c 0%, #0a0a0a 45%, #050505 100%);
    color: #ffb408;
    font-family: "Inter", Sans-serif;
    font-size: 15px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    border: 2px solid rgba(255, 180, 8, 0.5);
    padding: 14px 28px;
    border-radius: 18px;
    cursor: pointer;
    transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease, color 0.14s ease;
    min-width: 220px;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.12) inset,
        0 10px 0 #3d2800,
        0 14px 28px rgba(0, 0, 0, 0.48);
    -webkit-appearance: none;
    appearance: none;
}

.cjp-submit-button:hover {
    filter: brightness(1.08);
    transform: translateY(-2px);
    color: #ffc933;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.16) inset,
        0 11px 0 #3d2800,
        0 18px 32px rgba(0, 0, 0, 0.52);
}

.cjp-submit-button:active {
    transform: translateY(6px);
    color: #ffb408;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.08) inset,
        0 3px 0 #3d2800,
        0 8px 16px rgba(0, 0, 0, 0.4);
    filter: brightness(0.96);
}

/* Error notices */
.gv-notice {
    padding: 15px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.gv-error {
    background: #4a0f0f;
    border-left: 4px solid #c00;
    color: #fff;
}

/* Success message */
.judge-update-success {
    background: rgba(27, 139, 27, 0.1);
    border-left: 4px solid #1b8b1b;
    color: #fff;
    padding: 20px;
    border-radius: 4px;
    margin: 20px 0;
    text-align: center;
}

.judge-update-success h3 {
    color: #d4af37;
    margin-top: 0;
    font-family: "Inter", Sans-serif;
}

.success-icon {
    background: #1b8b1b;
    color: #fff;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    font-weight: bold;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .cjp-judging-form-wrapper {
        padding: 15px;
    }
    
    .cjp-judging-form-title {
        font-size: 28px;
        margin-bottom: 25px;
    }
    
    .cjp-submit-button {
        width: 100%;
    }
}

/* Focus states for better accessibility */
.cjp-number-input:focus,
.cjp-textarea:focus,
.cjp-radio-option input[type="radio"]:focus,
.cjp-submit-button:focus {
    outline: 2px solid #d4af37;
    outline-offset: 1px;
}

/* Hover states for better UX */
.cjp-radio-option:hover label {
    color: #d4af37;
}

/* ========================================
   Judge Dashboard Specific
   ======================================== */
.cjp-judge-dashboard {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.cjp-dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
    gap: 20px;
}

.cjp-dashboard-title {
    font-size: 32px;
    color: var(--cjp-primary-color);
    margin: 0;
    font-family: "Inter", Sans-serif;
}

.cjp-status-toggle {
    display: flex;
    gap: 10px;
}

.cjp-entry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.cjp-entry-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
}

.cjp-entry-card:hover {
    border-color: var(--cjp-primary-color);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.2);
}

.cjp-entry-id {
    font-size: 24px;
    color: var(--cjp-primary-color);
    font-weight: bold;
    margin-bottom: 10px;
}

.cjp-entry-category {
    display: inline-block;
    padding: 4px 12px;
    background: rgba(212, 175, 55, 0.2);
    border-radius: 12px;
    font-size: 12px;
    margin-bottom: 15px;
}

.cjp-entry-actions {
    margin-top: 15px;
    display: flex;
    gap: 10px;
}

/* ========================================
   Responsive
   ======================================== */
@media (max-width: 1024px) {
    .cjp-entry-grid {
        grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    }
}

@media (max-width: 640px) {
    .cjp-entry-grid {
        grid-template-columns: 1fr;
    }
    
    .cjp-dashboard-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* ========================================
   Enhanced Judge Dashboard UI/UX
   ======================================== */

/* Status Badge System - Style the shortcode output */
body.cjp-ui-enhanced .judge-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    margin: 12px 0;
}

/* Status badge class for shortcode output */
.cjp-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    white-space: nowrap;
    word-break: keep-all;
    min-width: 118px;
    justify-content: center;
}

.cjp-status-badge.pending {
    background: rgba(255, 152, 0, 0.2);
    color: #ff9800;
    border: 1px solid rgba(255, 152, 0, 0.4);
}

.cjp-status-badge.completed {
    background: rgba(76, 175, 80, 0.2);
    color: #4caf50;
    border: 1px solid rgba(76, 175, 80, 0.4);
}

.cjp-status-badge.pill {
    border-radius: 20px;
}

.cjp-status-badge.rounded {
    border-radius: 8px;
}

.cjp-status-badge.square {
    border-radius: 4px;
}

.cjp-status-badge-icon {
    display: inline-block;
    width: 14px;
    height: 14px;
    line-height: 14px;
    text-align: center;
}

/* Enhanced Entry Card Design - Target Elementor Loop Grid items */
body.cjp-ui-enhanced .elementor-loop-item,
body.cjp-ui-enhanced .elementor-post__card,
body.cjp-ui-enhanced .eael-post-grid-item {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 13px;
    overflow: hidden;
}

body.cjp-ui-enhanced .elementor-loop-item:hover,
body.cjp-ui-enhanced .elementor-post__card:hover,
body.cjp-ui-enhanced .eael-post-grid-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(212, 175, 55, 0.25);
}

/* Status-based card styling - will be applied via JavaScript or data attributes */
body.cjp-ui-enhanced .elementor-loop-item[data-status="pending"],
body.cjp-ui-enhanced .elementor-post__card[data-status="pending"],
body.cjp-ui-enhanced .eael-post-grid-item[data-status="pending"] {
    border-color: rgba(255, 152, 0, 0.5) !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 152, 0, 0.05) 100%) !important;
}

body.cjp-ui-enhanced .elementor-loop-item[data-status="completed"],
body.cjp-ui-enhanced .elementor-post__card[data-status="completed"],
body.cjp-ui-enhanced .eael-post-grid-item[data-status="completed"] {
    border-color: rgba(76, 175, 80, 0.5) !important;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(76, 175, 80, 0.05) 100%) !important;
}

/* Primary loop card shell (Elementor container id) — thicker gold frame */
body.cjp-ui-enhanced :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-33d7a1a {
    border-width: 2px !important;
    border-style: solid !important;
    border-color: rgba(255, 184, 8, 0.52) !important;
}

/*
 * Entry title / number on judge dashboard loop cards only.
 * Do NOT target global .elementor-heading-title — body.cjp-ui-enhanced is added site-wide when
 * judge UI is enabled, and !important here overrides Elementor’s Typography panel everywhere
 * (including the editor preview).
 */
body.cjp-ui-enhanced .elementor-post__card .elementor-heading-title,
body.cjp-ui-enhanced .elementor-post__card .elementor-widget-heading .elementor-heading-title,
body.cjp-ui-enhanced .elementor-posts .elementor-post .elementor-heading-title,
body.cjp-ui-enhanced .elementor-posts .elementor-post .elementor-widget-heading .elementor-heading-title,
body.cjp-ui-enhanced .elementor-loop-item .elementor-heading-title,
body.cjp-ui-enhanced .elementor-loop-item .elementor-widget-heading .elementor-heading-title,
body.cjp-ui-enhanced .e-loop-item .elementor-heading-title,
body.cjp-ui-enhanced .e-loop-item .elementor-widget-heading .elementor-heading-title,
body.cjp-ui-enhanced .eael-post-grid-item .elementor-heading-title,
body.cjp-ui-enhanced .eael-post-grid-item .elementor-widget-heading .elementor-heading-title {
    font-size: 42px !important;
    font-weight: 700 !important;
    color: #ffb408 !important;
    margin-bottom: 12px !important;
    line-height: 1.2 !important;
    text-align: center !important;
}

/* Entry Category Badge - Appears directly under entry title */
body.cjp-ui-enhanced .entry-category-badge {
    display: inline-block;
    padding: 6px 16px;
    margin: 0 auto 16px;
    background: #d4af37;
    color: #000;
    font-family: "Ralush", "Inter", Sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

body.cjp-ui-enhanced .entry-category-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

/* Ensure category badge appears right after heading title */
body.cjp-ui-enhanced .elementor-heading-title + .entry-category-badge,
body.cjp-ui-enhanced .elementor-widget-heading + .entry-category-badge {
    display: block;
    margin-top: 8px;
}

/* ========================================
   Entry Category Badge - General Styles
   v3.19.0 - Category appears directly under entry title
   ======================================== */

.entry-category-badge {
    display: inline-block;
    padding: 6px 16px;
    margin: 8px auto 16px;
    background: #d4af37;
    color: #000;
    font-family: "Ralush", "Inter", Sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-radius: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
    transition: all 0.3s ease;
}

.entry-category-badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

/* Ensure category badge appears directly after entry title in Elementor */
.elementor-heading-title + .entry-category-badge,
.elementor-widget-heading + .entry-category-badge,
.elementor-post__title + .entry-category-badge {
    display: block;
    margin-top: 8px;
    margin-bottom: 16px;
}

/* Enhanced Category Icon - Already exists via shortcode */
body.cjp-ui-enhanced .entry-category-icon {
    width: 56px !important;
    height: 56px !important;
    margin: 0 auto 16px !important;
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
}

body.cjp-ui-enhanced .entry-category-icon svg {
    width: 100% !important;
    height: 100% !important;
    fill: #d4af37 !important;
    transition: transform 0.3s ease;
}

body.cjp-ui-enhanced .entry-category-icon:hover svg {
    transform: scale(1.1);
}

/* Enhanced Score Display - Already exists via [judge_score_for_entry] shortcode */
body.cjp-ui-enhanced .cjp-judge-score {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.05) 100%);
    border-left: 4px solid #d4af37;
    padding: 16px;
    margin: 16px 0;
    border-radius: 8px;
    text-align: center;
    font-size: 16px;
}

body.cjp-ui-enhanced .cjp-judge-score strong {
    font-size: 32px;
    color: #d4af37;
    display: block;
    margin-top: 6px;
    font-weight: 700;
}

/* Score color variations */
body.cjp-ui-enhanced .cjp-judge-score.high-score {
    border-left-color: #4caf50;
    background: linear-gradient(135deg, rgba(76, 175, 80, 0.15) 0%, rgba(76, 175, 80, 0.05) 100%);
}

body.cjp-ui-enhanced .cjp-judge-score.high-score strong {
    color: #4caf50;
}

body.cjp-ui-enhanced .cjp-judge-score.medium-score {
    border-left-color: #ff9800;
    background: linear-gradient(135deg, rgba(255, 152, 0, 0.15) 0%, rgba(255, 152, 0, 0.05) 100%);
}

body.cjp-ui-enhanced .cjp-judge-score.medium-score strong {
    color: #ff9800;
}

body.cjp-ui-enhanced .cjp-judge-score.low-score {
    border-left-color: #f44336;
    background: linear-gradient(135deg, rgba(244, 67, 54, 0.15) 0%, rgba(244, 67, 54, 0.05) 100%);
}

body.cjp-ui-enhanced .cjp-judge-score.low-score strong {
    color: #f44336;
}

/* Enhanced Action Buttons */
body.cjp-ui-enhanced .eael-creative-button {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    text-decoration: none !important;
    font-family: "Ralush", "Inter", Sans-serif;
    letter-spacing: 0.03em;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
}

body.cjp-ui-enhanced .eael-creative-button .eael-creative-button-text {
    text-decoration: none !important;
}

body.cjp-ui-enhanced .eael-creative-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(212, 175, 55, 0.3);
}

/* Score Now Button - Primary - Target by text content */
body.cjp-ui-enhanced .eael-creative-button {
    position: relative;
}

body.cjp-ui-enhanced .eael-creative-button .eael-creative-button-text:contains("Score Now"),
body.cjp-ui-enhanced .eael-creative-button[data-text*="Score Now"] {
    background: linear-gradient(135deg, #d4af37 0%, #c2b067 100%) !important;
    color: #000 !important;
    font-weight: 700 !important;
    padding: 16px 24px !important;
    font-size: 16px !important;
    border: 2px solid #d4af37 !important;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3) !important;
}

/* Use data attribute or class targeting instead */
body.cjp-ui-enhanced .eael-creative-button.cjp-button-primary,
body.cjp-ui-enhanced .eael-creative-button[data-button-type="score-now"] {
    background: linear-gradient(135deg, #d4af37 0%, #c2b067 100%) !important;
    color: #000 !important;
    font-weight: 700 !important;
    padding: 15px 26px !important;
    font-size: 16px !important;
    border: 3px solid #9b7a14 !important;
    border-radius: 14px !important;
    box-shadow: 0 8px 0 #8c6f12, 0 13px 24px rgba(0, 0, 0, 0.35) !important;
    transform: translateY(0) !important;
    text-decoration: none !important;
}

body.cjp-ui-enhanced .eael-creative-button.cjp-button-primary:hover,
body.cjp-ui-enhanced .eael-creative-button[data-button-type="score-now"]:hover {
    background: linear-gradient(135deg, #c2b067 0%, #d4af37 100%) !important;
    box-shadow: 0 9px 0 #8c6f12, 0 14px 24px rgba(0, 0, 0, 0.36) !important;
    transform: translateY(-1px) !important;
    text-decoration: none !important;
}

body.cjp-ui-enhanced .eael-creative-button.cjp-button-primary:active,
body.cjp-ui-enhanced .eael-creative-button[data-button-type="score-now"]:active {
    transform: translateY(6px) !important;
    box-shadow: 0 2px 0 #8c6f12, 0 6px 14px rgba(0, 0, 0, 0.28) !important;
    text-decoration: none !important;
}

/* Edit Score & View Notes - Secondary */
body.cjp-ui-enhanced .eael-creative-button.cjp-button-secondary,
body.cjp-ui-enhanced .eael-creative-button[data-button-type="edit-score"],
body.cjp-ui-enhanced .eael-creative-button[data-button-type="view-notes"] {
    background: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
    border: 1px solid rgba(255, 255, 255, 0.3) !important;
    padding: 12px 20px !important;
    font-size: 14px !important;
}

body.cjp-ui-enhanced .eael-creative-button.cjp-button-secondary:hover,
body.cjp-ui-enhanced .eael-creative-button[data-button-type="edit-score"]:hover,
body.cjp-ui-enhanced .eael-creative-button[data-button-type="view-notes"]:hover {
    background: rgba(255, 255, 255, 0.2) !important;
    border-color: #d4af37 !important;
}

/* Button Sizes */
body.cjp-ui-enhanced.cjp-buttons-small .eael-creative-button {
    padding: 10px 16px !important;
    font-size: 13px !important;
}

body.cjp-ui-enhanced.cjp-buttons-large .eael-creative-button {
    padding: 18px 32px !important;
    font-size: 18px !important;
}

/* Enhanced Progress Bar */
body.cjp-ui-enhanced .cjp-progress-wrapper {
    margin: 24px 0;
}

body.cjp-ui-enhanced .cjp-progress-label {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 12px;
    color: #fff;
}

body.cjp-ui-enhanced .cjp-progress-bar {
    height: 36px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 18px;
    overflow: hidden;
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

body.cjp-ui-enhanced .cjp-progress-fill {
    height: 100%;
    min-width: 0;
    border-radius: inherit;
    will-change: width;
    background: linear-gradient(90deg, #14532d 0%, #22c55e 55%, #6ee7a8 100%);
    box-shadow: 0 0 14px rgba(74, 222, 128, 0.35);
    transition: width 0.88s cubic-bezier(0.33, 1, 0.68, 1);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 16px;
    color: #000;
    font-weight: 700;
    font-size: 14px;
}

@media (prefers-reduced-motion: reduce) {
    body.cjp-ui-enhanced .cjp-progress-fill {
        transition: none;
    }
}

/* Dashboard Header Enhancements */
body.cjp-ui-enhanced .cjp-dashboard-header {
    padding: 24px;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    margin-bottom: 32px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

body.cjp-ui-enhanced .cjp-status-toggle .elementor-button {
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
}

body.cjp-ui-enhanced .cjp-status-toggle .elementor-button:hover {
    background: #d4af37;
    border-color: #d4af37;
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.3);
}

body.cjp-status-switching .cjp-status-toggle a,
body.cjp-status-switching .cjp-status-toggle .elementor-button {
    pointer-events: none;
    opacity: 0.65;
}

body.cjp-ui-enhanced .cjp-link-loading {
    pointer-events: none !important;
    opacity: 0.7;
    cursor: progress !important;
}

/* Search and Filter (when enabled) */
body.cjp-ui-enhanced .cjp-dashboard-search {
    margin-bottom: 20px;
}

body.cjp-ui-enhanced .cjp-dashboard-search input {
    width: 100%;
    max-width: 400px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    color: #fff;
    font-size: 16px;
}

body.cjp-ui-enhanced .cjp-dashboard-search input:focus {
    outline: none;
    border-color: #d4af37;
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.2);
}

body.cjp-ui-enhanced .cjp-filter-buttons {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

body.cjp-ui-enhanced .cjp-filter-button {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    color: #fff;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}

body.cjp-ui-enhanced .cjp-filter-button:hover,
body.cjp-ui-enhanced .cjp-filter-button.active {
    background: #d4af37;
    border-color: #d4af37;
    color: #000;
}

/* Empty State */
body.cjp-ui-enhanced .cjp-empty-state {
    text-align: center;
    padding: 60px 20px;
    color: rgba(255, 255, 255, 0.6);
}

body.cjp-ui-enhanced .cjp-empty-state-icon {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.5;
}

body.cjp-ui-enhanced .cjp-empty-state h3 {
    font-size: 24px;
    color: #d4af37;
    margin-bottom: 12px;
}

body.cjp-ui-enhanced .cjp-empty-state p {
    font-size: 16px;
    line-height: 1.6;
}

/* Loading States */
body.cjp-ui-enhanced .cjp-skeleton-card {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 13px;
    padding: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: skeleton-pulse 1.5s ease-in-out infinite;
}

@keyframes skeleton-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

body.cjp-ui-enhanced .cjp-loading {
    text-align: center;
    padding: 40px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 18px;
}

/* Card Layout Variations */
body.cjp-ui-enhanced.cjp-cards-compact .elementor-post__card,
body.cjp-ui-enhanced.cjp-cards-compact .elementor-loop-item {
    padding: 16px;
}

body.cjp-ui-enhanced.cjp-cards-comfortable .elementor-post__card,
body.cjp-ui-enhanced.cjp-cards-comfortable .elementor-loop-item {
    padding: 28px;
}

/* Hide empty featured images better */
body.cjp-ui-enhanced .elementor-post__thumbnail img[src=""],
body.cjp-ui-enhanced .elementor-post__thumbnail img:not([src]),
body.cjp-ui-enhanced .elementor-widget-image img[src=""] {
    display: none;
}

body.cjp-ui-enhanced .elementor-post__thumbnail:empty::after,
body.cjp-ui-enhanced .elementor-widget-image:has(img[src=""]):after {
    content: "";
    display: block;
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1) 0%, rgba(212, 175, 55, 0.05) 100%);
    border-radius: 8px;
}

/* Responsive Enhancements */
@media (max-width: 768px) {
    body.cjp-ui-enhanced .cjp-dashboard-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    body.cjp-ui-enhanced .cjp-filter-buttons {
        justify-content: center;
    }
    
    body.cjp-ui-enhanced .eael-creative-button {
        width: 100%;
        margin-bottom: 10px;
    }
    
    body.cjp-ui-enhanced .elementor-post__title {
        font-size: 36px !important;
    }
    
    body.cjp-ui-enhanced .entry-category-icon {
        width: 48px !important;
        height: 48px !important;
    }
}

/* Accessibility Enhancements */
body.cjp-ui-enhanced .eael-creative-button:focus,
body.cjp-ui-enhanced .cjp-filter-button:focus,
body.cjp-ui-enhanced .cjp-status-toggle .elementor-button:focus {
    outline: 3px solid #d4af37;
    outline-offset: 2px;
}

body.cjp-ui-enhanced .cjp-status-badge[aria-label] {
    position: relative;
}

/* Screen reader only text */
body.cjp-ui-enhanced .cjp-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Flat typography on judge dashboard cards (no font glow / text-shadow) */
body.logged-in.cjp-role-judge .elementor-post__title,
body.logged-in.cjp-role-judge .elementor-post__title a,
body.logged-in.cjp-role-judge .elementor-heading-title {
    text-shadow: none;
}

/* ========================================
   Judge Dashboard — 2-Column Mobile Grid (v4.1.4)
   Column count is set in Elementor natively.
   This CSS only handles overflow safety + content scaling.
   ======================================== */
@media (max-width: 768px) {

    /* --- Items: overflow guard so content doesn't escape narrow columns --- */
    body.cjp-ui-enhanced .elementor-loop-item,
    body.cjp-ui-enhanced .e-loop-item,
    body.cjp-ui-enhanced .eael-post-grid-item {
        box-sizing: border-box !important;
        min-width: 0;
        overflow: hidden;
    }

    /* --- Inner card padding: tighter for 2-col --- */
    body.cjp-ui-enhanced .elementor-loop-item .elementor-post__card,
    body.cjp-ui-enhanced .e-loop-item .elementor-post__card,
    body.cjp-ui-enhanced .eael-post-grid-item .elementor-post__card,
    body.cjp-ui-enhanced .elementor-loop-item > .elementor-widget-wrap,
    body.cjp-ui-enhanced .e-loop-item > .elementor-widget-wrap {
        padding: 14px 10px !important;
        box-sizing: border-box !important;
        width: 100% !important;
    }

    /* --- Entry number: scale down for 2-col --- */
    body.cjp-ui-enhanced .elementor-loop-item .elementor-heading-title,
    body.cjp-ui-enhanced .elementor-loop-item .elementor-widget-heading .elementor-heading-title,
    body.cjp-ui-enhanced .e-loop-item .elementor-heading-title,
    body.cjp-ui-enhanced .e-loop-item .elementor-widget-heading .elementor-heading-title,
    body.cjp-ui-enhanced .eael-post-grid-item .elementor-heading-title,
    body.cjp-ui-enhanced .eael-post-grid-item .elementor-widget-heading .elementor-heading-title {
        font-size: 28px !important;
        margin-bottom: 6px !important;
    }

    /* --- Category badge: compact --- */
    body.cjp-ui-enhanced .elementor-loop-item .entry-category-badge,
    body.cjp-ui-enhanced .e-loop-item .entry-category-badge,
    body.cjp-ui-enhanced .eael-post-grid-item .entry-category-badge {
        font-size: 11px !important;
        padding: 4px 10px !important;
        margin-bottom: 10px !important;
    }

    /* --- Category icon: smaller --- */
    body.cjp-ui-enhanced .elementor-loop-item .entry-category-icon,
    body.cjp-ui-enhanced .e-loop-item .entry-category-icon,
    body.cjp-ui-enhanced .eael-post-grid-item .entry-category-icon {
        width: 40px !important;
        height: 40px !important;
        font-size: 32px !important;
        margin-bottom: 8px !important;
    }

    /* --- Status badge: constrained --- */
    body.cjp-ui-enhanced .elementor-loop-item .judge-status,
    body.cjp-ui-enhanced .e-loop-item .judge-status,
    body.cjp-ui-enhanced .eael-post-grid-item .judge-status,
    body.cjp-ui-enhanced .elementor-loop-item .cjp-status-badge,
    body.cjp-ui-enhanced .e-loop-item .cjp-status-badge,
    body.cjp-ui-enhanced .eael-post-grid-item .cjp-status-badge {
        font-size: 10px !important;
        padding: 5px 8px !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        display: inline-block !important;
    }

    /* --- Action buttons: full width --- */
    body.cjp-ui-enhanced .elementor-loop-item .eael-creative-button,
    body.cjp-ui-enhanced .e-loop-item .eael-creative-button,
    body.cjp-ui-enhanced .eael-post-grid-item .eael-creative-button {
        font-size: 12px !important;
        padding: 10px 8px !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    /* --- .cjp-entry-grid shortcode: 2 columns --- */
    .cjp-entry-grid {
        grid-template-columns: 1fr 1fr !important;
        gap: 10px !important;
    }

    .cjp-entry-card {
        padding: 14px 12px !important;
    }

    .cjp-entry-id {
        font-size: 24px !important;
    }
}

/* Very narrow phones (SE etc): keep 2-col, shrink text a touch more */
@media (max-width: 390px) {
    body.cjp-ui-enhanced .elementor-loop-item .elementor-heading-title,
    body.cjp-ui-enhanced .e-loop-item .elementor-heading-title,
    body.cjp-ui-enhanced .eael-post-grid-item .elementor-heading-title,
    body.cjp-ui-enhanced .elementor-loop-item .elementor-widget-heading .elementor-heading-title,
    body.cjp-ui-enhanced .e-loop-item .elementor-widget-heading .elementor-heading-title,
    body.cjp-ui-enhanced .eael-post-grid-item .elementor-widget-heading .elementor-heading-title {
        font-size: 22px !important;
    }

    body.cjp-ui-enhanced .elementor-loop-item .elementor-post__card,
    body.cjp-ui-enhanced .e-loop-item .elementor-post__card,
    body.cjp-ui-enhanced .eael-post-grid-item .elementor-post__card,
    body.cjp-ui-enhanced .elementor-loop-item > .elementor-widget-wrap,
    body.cjp-ui-enhanced .e-loop-item > .elementor-widget-wrap {
        padding: 10px 8px !important;
    }
}

/*
 * Score Now chunky override (v2)
 * Target the known Elementor widget IDs directly so this wins over later layout rules.
 */
/* Score Now — chunky 3D black + gold text (match GF submit) */
/* Scope by loop item, not body.elementor-NNN (dashboard page ID ≠ 100 on live). */
body.cjp-ui-enhanced :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-7aaac35 .eael-creative-button,
body.cjp-ui-enhanced :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-d45057c .eael-creative-button,
body.cjp-ui-enhanced :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-3393e91 .eael-creative-button {
    background: linear-gradient(180deg, #1c1c1c 0%, #0a0a0a 45%, #050505 100%) !important;
    color: #ffb408 !important;
    border: 2px solid rgba(255, 180, 8, 0.5) !important;
    border-radius: 18px !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.12) inset,
        0 10px 0 #3d2800,
        0 14px 28px rgba(0, 0, 0, 0.48) !important;
    font-weight: 800 !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    padding: 14px 20px !important;
    min-height: 0 !important;
    transform: translateY(0) !important;
    transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease, color 0.14s ease !important;
}

body.cjp-ui-enhanced :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-7aaac35 .eael-creative-button:hover,
body.cjp-ui-enhanced :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-d45057c .eael-creative-button:hover,
body.cjp-ui-enhanced :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-3393e91 .eael-creative-button:hover {
    filter: brightness(1.08) !important;
    transform: translateY(-2px) !important;
    color: #ffc933 !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.16) inset,
        0 11px 0 #3d2800,
        0 18px 32px rgba(0, 0, 0, 0.52) !important;
}

body.cjp-ui-enhanced :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-7aaac35 .eael-creative-button:active,
body.cjp-ui-enhanced :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-d45057c .eael-creative-button:active,
body.cjp-ui-enhanced :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-3393e91 .eael-creative-button:active {
    transform: translateY(6px) !important;
    color: #ffb408 !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.08) inset,
        0 3px 0 #3d2800,
        0 8px 16px rgba(0, 0, 0, 0.4) !important;
    filter: brightness(0.96) !important;
}

body.cjp-ui-enhanced :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-7aaac35 .eael-creative-button .eael-creative-button-text,
body.cjp-ui-enhanced :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-d45057c .eael-creative-button .eael-creative-button-text,
body.cjp-ui-enhanced :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-3393e91 .eael-creative-button .eael-creative-button-text {
    font-weight: 800 !important;
}

/* ================================================
   Layout Toggle — v4.1.5
   Floating 1-col / 2-col switcher, mobile only.
   body.cjp-grid-2col = 2 columns.
   body without that class = 1 column.
   ================================================ */

#cjp-grid-toggle { display: none; }

@media (max-width: 768px) {

    /* ---- Toggle pill: top-right, won't overlap card content ---- */
    #cjp-grid-toggle {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 60px;
        right: 0;
        z-index: 10000;
        background: #0d0d0d;
        border: 1px solid rgba(212, 175, 55, 0.5);
        border-right: none;
        border-radius: 10px 0 0 10px;
        overflow: hidden;
        box-shadow: -3px 0 16px rgba(0, 0, 0, 0.7);
        -webkit-tap-highlight-color: transparent;
    }

    .cjp-gt-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 42px;
        height: 42px;
        background: transparent;
        border: none;
        cursor: pointer;
        padding: 0;
        color: rgba(212, 175, 55, 0.3);
        transition: background 0.15s, color 0.15s;
        -webkit-tap-highlight-color: transparent;
        outline: none;
    }

    .cjp-gt-btn:first-child { border-bottom: 1px solid rgba(212, 175, 55, 0.12); }
    .cjp-gt-btn.active { background: rgba(212, 175, 55, 0.15); color: #d4af37; }
    .cjp-gt-btn:active { background: rgba(212, 175, 55, 0.28); }

    .cjp-gt-btn svg {
        width: 18px;
        height: 18px;
        fill: currentColor;
        pointer-events: none;
    }

    /* ================================================
       1-COL: force single column, override Elementor
       ================================================ */
    body:not(.cjp-grid-2col) .elementor-loop-grid,
    body:not(.cjp-grid-2col) .elementor-posts-container,
    body:not(.cjp-grid-2col) .elementor-widget-loop-grid .elementor-loop-container,
    body:not(.cjp-grid-2col) .elementor-widget-loop-grid .e-loop-content {
        --e-loop-grid-columns: 1 !important;
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 12px !important;
    }
    body:not(.cjp-grid-2col) .elementor-loop-item,
    body:not(.cjp-grid-2col) .e-loop-item {
        width: 100% !important;
    }

    /* ================================================
       2-COL: force 2-column, items snap to content height
       minmax(0,1fr) avoids overflow; slightly larger gutters than 8px so cards breathe.
       ================================================ */
    body.cjp-grid-2col .elementor-loop-grid,
    body.cjp-grid-2col .elementor-posts-container,
    body.cjp-grid-2col .elementor-widget-loop-grid .elementor-loop-container,
    body.cjp-grid-2col .elementor-widget-loop-grid .e-loop-content {
        --e-loop-grid-columns: 2 !important;
        display: grid !important;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
        column-gap: 12px !important;
        row-gap: 14px !important;
        align-items: start !important;
        grid-auto-rows: min-content !important;
        padding-left: 2px !important;
        padding-right: 2px !important;
        box-sizing: border-box !important;
    }

    /*
     * Do NOT pad .elementor-widget-container (narrows both columns → clips labels like “STATUS”).
     * The toggle is fixed; nudge it slightly inward instead (see #cjp-grid-toggle below).
     */

    /* Items: auto height — overflow visible so “STATUS:” isn’t clipped (was overflow:hidden + narrow cols). */
    body.cjp-grid-2col .elementor-loop-item,
    body.cjp-grid-2col .e-loop-item {
        width: 100% !important;
        height: auto !important;
        min-height: 0 !important;
        align-self: start !important;
        box-sizing: border-box !important;
        min-width: 0;
        overflow: visible !important;
    }

    /* Beat global mobile rule (body.cjp-ui-enhanced .e-loop-item { overflow: hidden }) */
    body.cjp-grid-2col.cjp-ui-enhanced .elementor-loop-item,
    body.cjp-grid-2col.cjp-ui-enhanced .e-loop-item,
    body.cjp-grid-2col.cjp-ui-enhanced .eael-post-grid-item {
        overflow: visible !important;
    }

    /* Docked grid toggle: inset from edge — avoids overlapping card corners without shrinking the grid */
    body.cjp-grid-2col #cjp-grid-toggle {
        right: max(6px, env(safe-area-inset-right, 0px)) !important;
        border-radius: 10px !important;
    }

    /*
     * Kill equal-height — EAEL sets inline height: NNNpx via JS on the article
     * and on the template's root container (Elementor element ID 7c11f99b).
     * !important overrides inline styles.
     */
    body.cjp-grid-2col .e-loop-item,
    body.cjp-grid-2col .elementor-loop-item,
    body.cjp-grid-2col .e-loop-item .elementor-element-7c11f99b,
    body.cjp-grid-2col .e-loop-item > .elementor,
    body.cjp-grid-2col .e-loop-item .elementor-section-wrap,
    body.cjp-grid-2col .e-loop-item .e-con,
    body.cjp-grid-2col .e-loop-item .elementor-widget-wrap,
    body.cjp-grid-2col .e-loop-item .elementor-post__card,
    body.cjp-grid-2col .e-loop-item .e-loop-item-template-container {
        flex: unset !important;
        height: auto !important;
        min-height: 0 !important;
    }

    /*
     * 2-col card density — row siblings used to “share” the taller height; inner flex
     * often uses space-between / min-height. Collapse to content + top-align stacks.
     */
    body.cjp-grid-2col .e-loop-item,
    body.cjp-grid-2col .e-loop-item .e-loop-item-template-container,
    body.cjp-grid-2col .e-loop-item .e-loop-item-template-container > .elementor {
        height: fit-content !important;
        max-height: none !important;
    }
    body.cjp-grid-2col .e-loop-item .e-con,
    body.cjp-grid-2col .e-loop-item .e-con.e-parent {
        --min-height: 0px !important;
        min-height: 0 !important;
        justify-content: flex-start !important;
        align-content: flex-start !important;
        --gap: 5px !important;
        gap: 5px !important;
    }
    body.cjp-grid-2col .e-loop-item .elementor-widget-wrap,
    body.cjp-grid-2col .e-loop-item .elementor-widget-container {
        flex-grow: 0 !important;
    }

    /* Also fix equal-height in 1-col mode — same JS runs regardless of column count */
    body:not(.cjp-grid-2col) .e-loop-item,
    body:not(.cjp-grid-2col) .elementor-loop-item,
    body:not(.cjp-grid-2col) .e-loop-item .elementor-element-7c11f99b,
    body:not(.cjp-grid-2col) .e-loop-item .e-con {
        height: auto !important;
        min-height: 0 !important;
    }

    /*
     * ROOT CARD CONTAINER — real ID: elementor-element-33d7a1a
     * Slightly more horizontal inset so content doesn’t hug the gold border in narrow columns.
     */
    body.cjp-grid-2col :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-33d7a1a {
        --padding-top: 11px !important;
        --padding-bottom: 14px !important;
        --padding-left: 12px !important;
        --padding-right: 12px !important;
        padding: 11px 12px 14px !important;
        overflow: visible !important;
    }

    /* Entry number heading — element-b7a3526 */
    body.cjp-grid-2col :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-b7a3526 .elementor-heading-title {
        font-size: 20px !important;
        line-height: 1.12 !important;
        margin-bottom: 4px !important;
    }

    /* Category icon */
    body.cjp-grid-2col .e-loop-item .entry-category-icon {
        width: 28px !important;
        height: 28px !important;
        font-size: 22px !important;
        margin-bottom: 3px !important;
    }

    /* Category badge */
    body.cjp-grid-2col .e-loop-item .entry-category-badge {
        font-size: 9px !important;
        padding: 2px 6px !important;
        margin-bottom: 6px !important;
        max-width: 100% !important;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
        box-sizing: border-box !important;
    }

    /* STATUS row — top-align stack, centered; allow wrap if needed (prevents horizontal clip) */
    body.cjp-grid-2col .e-loop-item .elementor-widget-shortcode .elementor-widget-container {
        display: flex !important;
        flex-direction: column !important;
        justify-content: flex-start !important;
        align-items: center !important;
        text-align: center !important;
        width: 100% !important;
        overflow: visible !important;
        padding-left: 2px !important;
        padding-right: 2px !important;
        box-sizing: border-box !important;
    }
    body.cjp-grid-2col .e-loop-item .judge-status {
        display: inline-flex !important;
        flex-wrap: wrap !important;
        justify-content: center !important;
        align-items: center !important;
        align-self: center !important;
        margin: 2px auto 5px !important;
        text-align: center !important;
        width: auto !important;
        max-width: 100% !important;
        overflow: visible !important;
        white-space: normal !important;
        column-gap: 4px !important;
        row-gap: 2px !important;
    }
    body.cjp-grid-2col .e-loop-item .judge-status,
    body.cjp-grid-2col .e-loop-item .cjp-status-badge {
        font-size: 9px !important;
        padding: 4px 8px !important;
        box-sizing: border-box !important;
    }
    body.cjp-grid-2col .e-loop-item .cjp-status-badge {
        min-width: 0 !important;
        max-width: 100% !important;
        justify-content: center !important;
        white-space: nowrap !important;
        flex-shrink: 0 !important;
    }

    /*
     * SCORE NOW BUTTON — real element IDs: 7aaac35, d45057c, 3393e91
     * Full width in 2-col; shallower 3D stack + smaller type so it fits without crowding edges.
     */
    body.cjp-grid-2col :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-7aaac35 .eael-creative-button,
    body.cjp-grid-2col :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-d45057c .eael-creative-button,
    body.cjp-grid-2col :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-3393e91 .eael-creative-button {
        display: block !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        padding: 9px 8px !important;
        font-size: 10px !important;
        letter-spacing: 0.06em !important;
        line-height: 1.25 !important;
        min-height: 0 !important;
        border-radius: 14px !important;
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.32) inset,
            0 6px 0 #3d2800,
            0 10px 18px rgba(0, 0, 0, 0.36) !important;
    }
    body.cjp-grid-2col :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-7aaac35 .eael-creative-button:hover,
    body.cjp-grid-2col :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-d45057c .eael-creative-button:hover,
    body.cjp-grid-2col :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-3393e91 .eael-creative-button:hover {
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.38) inset,
            0 7px 0 #3d2800,
            0 12px 22px rgba(0, 0, 0, 0.38) !important;
    }
    body.cjp-grid-2col :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-7aaac35 .eael-creative-button:active,
    body.cjp-grid-2col :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-d45057c .eael-creative-button:active,
    body.cjp-grid-2col :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-3393e91 .eael-creative-button:active {
        box-shadow:
            0 1px 0 rgba(255, 255, 255, 0.2) inset,
            0 3px 0 #3d2800,
            0 6px 12px rgba(0, 0, 0, 0.32) !important;
    }
    /* Widget container top padding — remove the 10px gap above button */
    body.cjp-grid-2col :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-7aaac35 > .elementor-widget-container,
    body.cjp-grid-2col :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-d45057c > .elementor-widget-container,
    body.cjp-grid-2col :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-3393e91 > .elementor-widget-container {
        padding-top: 6px !important;
        padding-bottom: 4px !important;
    }

    /* Card image — slightly smaller in 2-col */
    body.cjp-grid-2col :is(.e-loop-item, .elementor-loop-item) .elementor-element.elementor-element-ce4ce72 img {
        max-width: 70px !important;
    }
}

/* ========================================
   Gravity Forms — primary submit (score entry + edit score)
   Chunky 3D: black fill + gold text (#ffb408) + gold border; same depth as squircle (includes .billy-submit-button).
   Wins over premium-theme-global when both load (this file enqueues later).
   ======================================== */
body.logged-in.cjp-role-judge .gform_wrapper .gform_footer .gform_button,
body.logged-in.cjp-role-judge .gform_wrapper .gform_button,
body.logged-in.cjp-role-judge .gform_wrapper input[type="submit"],
body.logged-in.cjp-role-judge .gform_wrapper button[type="submit"] {
    background: linear-gradient(180deg, #1c1c1c 0%, #0a0a0a 45%, #050505 100%) !important;
    color: #ffb408 !important;
    border: 2px solid rgba(255, 180, 8, 0.5) !important;
    border-radius: 18px !important;
    padding: 14px 28px !important;
    font-weight: 800 !important;
    font-size: 15px !important;
    letter-spacing: 0.05em !important;
    text-transform: uppercase !important;
    cursor: pointer !important;
    transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease, color 0.14s ease !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.12) inset,
        0 10px 0 #3d2800,
        0 14px 28px rgba(0, 0, 0, 0.48) !important;
    -webkit-appearance: none !important;
    appearance: none !important;
}

body.logged-in.cjp-role-judge .gform_wrapper .gform_button:hover,
body.logged-in.cjp-role-judge .gform_wrapper input[type="submit"]:hover,
body.logged-in.cjp-role-judge .gform_wrapper button[type="submit"]:hover {
    filter: brightness(1.08) !important;
    transform: translateY(-2px) !important;
    color: #ffc933 !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.16) inset,
        0 11px 0 #3d2800,
        0 18px 32px rgba(0, 0, 0, 0.52) !important;
}

body.logged-in.cjp-role-judge .gform_wrapper .gform_button:active,
body.logged-in.cjp-role-judge .gform_wrapper input[type="submit"]:active,
body.logged-in.cjp-role-judge .gform_wrapper button[type="submit"]:active {
    transform: translateY(6px) !important;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.08) inset,
        0 3px 0 #3d2800,
        0 8px 16px rgba(0, 0, 0, 0.4) !important;
    filter: brightness(0.96) !important;
    color: #ffb408 !important;
}

@media (prefers-reduced-motion: reduce) {
    body.logged-in.cjp-role-judge .gform_wrapper .gform_button:hover,
    body.logged-in.cjp-role-judge .gform_wrapper input[type="submit"]:hover,
    body.logged-in.cjp-role-judge .gform_wrapper button[type="submit"]:hover {
        transform: none !important;
    }
    body.logged-in.cjp-role-judge .gform_wrapper .gform_button:active,
    body.logged-in.cjp-role-judge .gform_wrapper input[type="submit"]:active,
    body.logged-in.cjp-role-judge .gform_wrapper button[type="submit"]:active {
        transform: none !important;
    }
}

/* Logged-out judge dashboard: link to judge portal */
.cjp-message.cjp-info .cjp-judge-login-link {
    color: #ffb408;
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.cjp-message.cjp-info .cjp-judge-login-link:hover {
    color: #ffca4a;
}

/* ========================================
   Judge dashboard — screen2 dense table only (same on mobile: horizontal scroll; legacy screen1 cards removed)
   ======================================== */
body.cjp-judge-dashboard-page .cjp-judge-dashboard-results .cjp-judge-dashboard-wrap,
.cjp-judge-dashboard-results .cjp-judge-dashboard-wrap {
    font-family: Inter, ui-sans-serif, system-ui, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

.cjp-judge-dashboard-results .cjp-jd-toolbar {
    margin-bottom: 12px;
}

.cjp-judge-dashboard-results .cjp-jd-toolbar-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.cjp-judge-dashboard-results .cjp-jd-toolbar-label {
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ffb408;
}

.cjp-judge-dashboard-results .cjp-jd-entry-filter {
    /* flex-grow 0: when toolbar stacks column-wise on mobile, avoid stretching input height */
    flex: 0 1 200px;
    min-width: 160px;
    max-width: 360px;
    padding: 8px 11px;
    border-radius: 8px;
    border: 1px solid rgba(255, 180, 8, 0.35);
    background: #111;
    color: #f5f5f5;
    font-size: 15px;
    line-height: 1.25;
    font-family: inherit;
    min-height: 0;
    -webkit-appearance: none;
    appearance: none;
}

.cjp-judge-dashboard-results .cjp-jd-entry-filter::placeholder {
    color: rgba(255, 255, 255, 0.35);
}

.cjp-judge-dashboard-results .cjp-jd-entry-filter:focus {
    outline: none;
    border-color: #ffb408;
    box-shadow: 0 0 0 1px rgba(255, 180, 8, 0.45);
}

.cjp-judge-dashboard-results .cjp-jd-td-empty {
    text-align: center;
    padding: 28px 12px !important;
    color: rgba(255, 255, 255, 0.55);
    font-size: 14px;
}

/* Narrow screens: shorter labels (see .cjp-jd-h-full / .cjp-jd-h-compact in cup-entries-universal.js) */
.cjp-judge-dashboard-results .cjp-jd-h-compact {
    display: none;
}

@media (max-width: 520px) {
    .cjp-judge-dashboard-results .cjp-jd-h-full {
        display: none;
    }

    .cjp-judge-dashboard-results .cjp-jd-h-compact {
        display: inline;
    }
}

.cjp-judge-dashboard-results .cjp-jd-scroll-hint {
    display: none;
    margin: 0 0 10px 0;
    padding: 0 8px;
    font-size: 12px;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.48);
    text-align: center;
    letter-spacing: 0.02em;
}

@media (max-width: 768px) {
    .cjp-judge-dashboard-results .cjp-jd-scroll-hint {
        display: block;
    }
}

.cjp-judge-dashboard-results .cjp-judge-dashboard-hscroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 10px;
    background: #070707;
    scrollbar-gutter: stable;
}

.cjp-judge-dashboard-results .cjp-judge-dashboard-table {
    width: 100%;
    min-width: 640px;
    border-collapse: collapse;
    font-size: 13px;
    background: #0b0b0b;
    color: #f2f2f2;
}

/* Sticky Entry ID: stays visible while swiping horizontally on small viewports */
.cjp-judge-dashboard-results .cjp-judge-dashboard-table thead th.cjp-jd-th-entry,
.cjp-judge-dashboard-results .cjp-judge-dashboard-table tbody td.cjp-jd-td-entry {
    position: sticky;
    left: 0;
    z-index: 2;
    box-shadow: 6px 0 12px -4px rgba(0, 0, 0, 0.85);
    border-right: 1px solid rgba(255, 180, 8, 0.2);
}

.cjp-judge-dashboard-results .cjp-judge-dashboard-table thead th.cjp-jd-th-entry {
    z-index: 4;
    background: linear-gradient(180deg, #141414 0%, #0e0e0e 100%);
}

.cjp-judge-dashboard-results .cjp-judge-dashboard-table tbody td.cjp-jd-td-entry {
    background: #0b0b0b;
}

.cjp-judge-dashboard-results .cjp-judge-dashboard-table thead th.cjp-jd-th {
    text-align: left;
    padding: 11px 10px;
    border-bottom: 1px solid rgba(255, 180, 8, 0.45);
    color: #ffb408;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    font-size: 11px;
    background: linear-gradient(180deg, #141414 0%, #0e0e0e 100%);
}

.cjp-judge-dashboard-results .cjp-judge-dashboard-table th.cjp-jd-th-entry,
.cjp-judge-dashboard-results .cjp-judge-dashboard-table th.cjp-jd-th-cat,
.cjp-judge-dashboard-results .cjp-judge-dashboard-table th.cjp-jd-th-score,
.cjp-judge-dashboard-results .cjp-judge-dashboard-table th.cjp-jd-th-status {
    cursor: pointer;
}

.cjp-judge-dashboard-results .cjp-judge-dashboard-table th.cjp-jd-th-scorenow {
    min-width: 120px;
    font-size: 12px;
    letter-spacing: 0.04em;
    background: linear-gradient(180deg, #3d2a14 0%, #2a1c0c 100%);
    color: #ffd875;
    border-left: 1px solid rgba(255, 180, 8, 0.25);
    border-right: 1px solid rgba(255, 180, 8, 0.25);
}

.cjp-judge-dashboard-results .cjp-judge-dashboard-table tbody td {
    padding: 10px 10px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07);
    vertical-align: middle;
}

.cjp-judge-dashboard-results .cjp-jd-td-entry {
    font-family: "Barlow Condensed", ui-sans-serif, system-ui, sans-serif;
    font-size: 18px;
    font-weight: 600;
    color: #fafafa;
}

.cjp-judge-dashboard-results .cjp-jd-td-score {
    background: rgba(55, 65, 81, 0.35);
    min-width: 88px;
}

.cjp-judge-dashboard-results .cjp-jd-score-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 6px 8px;
    border-radius: 6px;
    background: rgba(30, 41, 59, 0.65);
    border-left: 3px solid #38bdf8;
}

.cjp-judge-dashboard-results .cjp-jd-score-panel--empty {
    border-left-color: rgba(255, 255, 255, 0.12);
    background: rgba(20, 20, 20, 0.5);
}

.cjp-judge-dashboard-results .cjp-jd-score-val {
    font-size: 20px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    color: #f8fafc;
}

.cjp-judge-dashboard-results .cjp-jd-score-na {
    color: #555;
    font-size: 16px;
}

.cjp-judge-dashboard-results .cjp-jd-td-scorenow {
    background: linear-gradient(180deg, rgba(61, 42, 20, 0.55) 0%, rgba(26, 18, 8, 0.75) 100%);
    border-left: 1px solid rgba(255, 180, 8, 0.2);
    border-right: 1px solid rgba(255, 180, 8, 0.2);
    min-width: 130px;
}

.cjp-judge-dashboard-results .cjp-jd-td-scorenow a {
    white-space: nowrap;
    max-width: none;
}

.cjp-judge-dashboard-results .cjp-jd-td-status {
    min-width: 140px;
    background: #0b0b0b;
    border-left: 1px solid rgba(255, 255, 255, 0.06);
}

.cjp-judge-dashboard-results .cjp-judge-dash-row--done .cjp-jd-td-status {
    background: rgba(255, 180, 8, 0.06);
}

.cjp-judge-dashboard-results .cjp-judge-dash-row--done .cjp-jd-td-scorenow {
    background: linear-gradient(180deg, rgba(61, 42, 20, 0.4) 0%, rgba(26, 18, 8, 0.55) 100%);
}

/* Score now — same gold/bronze treatment as before, with GF-style chunky 3D depth + press */
.cjp-judge-dashboard-results .cjp-judge-score-now.cjp-judge-score-now--chunky {
    display: inline-block;
    text-decoration: none;
    border-radius: 14px;
    padding: 10px 16px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0b0b0b;
    background: linear-gradient(180deg, #ffca4a 0%, #ffb408 42%, #d89406 100%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.35) inset,
        0 10px 0 #3d2800,
        0 14px 28px rgba(0, 0, 0, 0.42);
    transform: translateY(0);
    transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease, color 0.14s ease;
}

.cjp-judge-dashboard-results .cjp-judge-score-now.cjp-judge-score-now--chunky:hover {
    filter: brightness(1.07);
    transform: translateY(-2px);
    color: #050505;
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.42) inset,
        0 11px 0 #3d2800,
        0 18px 32px rgba(0, 0, 0, 0.48);
}

.cjp-judge-dashboard-results .cjp-judge-score-now.cjp-judge-score-now--chunky:active {
    transform: translateY(6px);
    filter: brightness(0.98);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.22) inset,
        0 3px 0 #3d2800,
        0 8px 16px rgba(0, 0, 0, 0.38);
}

/* Edit score — chunky outline (same depth language as Score now; transparent fill + gold border) */
.cjp-judge-dashboard-results .cjp-judge-edit-inline.cjp-judge-edit-inline--chunky {
    display: inline-block;
    text-decoration: none;
    border-radius: 14px;
    padding: 10px 16px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #ffb408;
    background: linear-gradient(180deg, rgba(28, 28, 28, 0.95) 0%, rgba(10, 10, 10, 0.98) 45%, #050505 100%);
    border: 2px solid rgba(255, 180, 8, 0.55);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.1) inset,
        0 10px 0 #3d2800,
        0 14px 28px rgba(0, 0, 0, 0.42);
    transform: translateY(0);
    transition: transform 0.14s ease, box-shadow 0.14s ease, filter 0.14s ease, color 0.14s ease;
}

.cjp-judge-dashboard-results .cjp-judge-edit-inline.cjp-judge-edit-inline--chunky:hover {
    filter: brightness(1.08);
    color: #ffc933;
    transform: translateY(-2px);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.14) inset,
        0 11px 0 #3d2800,
        0 18px 32px rgba(0, 0, 0, 0.48);
}

.cjp-judge-dashboard-results .cjp-judge-edit-inline.cjp-judge-edit-inline--chunky:active {
    transform: translateY(6px);
    filter: brightness(0.96);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.08) inset,
        0 3px 0 #3d2800,
        0 8px 16px rgba(0, 0, 0, 0.38);
}

.cjp-judge-dashboard-results .cjp-judge-link-notes--btn {
    display: inline-block;
    margin-left: 8px;
    text-decoration: none;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #0b0b0b;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(180deg, #ffca4a 0%, #ffb408 42%, #d89406 100%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow:
        0 1px 0 rgba(255, 255, 255, 0.3) inset,
        0 4px 0 #3d2800,
        0 6px 0 rgba(0, 0, 0, 0.25);
    transition: transform 0.14s ease, filter 0.14s ease, box-shadow 0.14s ease;
}

.cjp-judge-dashboard-results .cjp-judge-link-notes--btn:hover {
    filter: brightness(1.06);
    transform: translateY(-1px);
}

.cjp-judge-dashboard-results .cjp-judge-status-pill {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 5px 10px;
    border-radius: 999px;
}

.cjp-judge-dashboard-results .cjp-judge-status-pill--progress {
    background: transparent;
    color: #ffb408;
    border: 1px solid rgba(255, 180, 8, 0.55);
}

.cjp-judge-dashboard-results .cjp-judge-status-pill--completed {
    background: rgba(46, 160, 67, 0.18);
    color: #8fd99a;
    border: 1px solid rgba(46, 160, 67, 0.45);
}

/* Status column: stack progress/completed, wrong-category flag, View notes */
.cjp-judge-dashboard-results .cjp-jd-status-stack {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 6px;
    min-width: 0;
    max-width: 100%;
}

.cjp-judge-dashboard-results .cjp-judge-flag-pill {
    box-sizing: border-box;
    max-width: 100%;
    padding: 6px 8px;
    border-radius: 8px;
    border: 1px solid rgba(255, 180, 8, 0.45);
    background: rgba(255, 180, 8, 0.08);
}

.cjp-judge-dashboard-results .cjp-judge-flag-pill__badge {
    display: inline-block;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ffb408;
    margin-bottom: 4px;
}

.cjp-judge-dashboard-results .cjp-judge-flag-pill__meta {
    display: flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    line-height: 1.35;
    color: #e8e8e8;
    word-break: break-word;
}

.cjp-judge-dashboard-results .cjp-judge-flag-pill__line {
    display: block;
}

.cjp-judge-dashboard-results .cjp-judge-flag-pill__k {
    font-weight: 700;
    color: rgba(255, 255, 255, 0.55);
    text-transform: uppercase;
    font-size: 9px;
    letter-spacing: 0.06em;
    margin-right: 4px;
}

.cjp-judge-dashboard-results .cjp-judge-link-notes--inline:not(.cjp-judge-link-notes--btn) {
    display: inline-block;
    margin-left: 6px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    color: #ffb408;
}

.cjp-judge-dashboard-results .entry-category-badge.cjp-cat-badge {
    display: inline-block;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.06em;
    padding: 4px 8px;
    border-radius: 6px;
    border: 1px solid hsla(var(--cjp-cat-h, 38), 85%, 55%, 0.45);
    background: hsla(var(--cjp-cat-h, 38), 85%, 50%, 0.12);
    color: #f0f0f0;
}

@media (max-width: 768px) {
    .cjp-judge-dashboard-results .cjp-jd-toolbar-inner {
        flex-direction: column;
        align-items: stretch;
    }

    .cjp-judge-dashboard-results .cjp-jd-entry-filter {
        flex: 0 0 auto;
        max-width: none;
        min-width: 0;
        align-self: stretch;
        padding: 6px 10px;
        font-size: 16px;
        line-height: 1.2;
    }

    .cjp-judge-dashboard-results .cjp-judge-dashboard-table {
        font-size: 12px;
        min-width: 520px;
    }

    .cjp-judge-dashboard-results .cjp-judge-dashboard-table thead th.cjp-jd-th {
        padding: 9px 6px;
        font-size: 10px;
    }

    .cjp-judge-dashboard-results .cjp-judge-dashboard-table tbody td {
        padding: 8px 6px;
    }

    .cjp-judge-dashboard-results .cjp-jd-td-entry {
        font-size: 16px;
    }

    .cjp-judge-dashboard-results .cjp-jd-td-score {
        min-width: 72px;
    }

    .cjp-judge-dashboard-results .cjp-judge-dashboard-table th.cjp-jd-th-scorenow {
        min-width: 88px;
    }

    .cjp-judge-dashboard-results .cjp-jd-td-scorenow {
        min-width: 92px;
    }

    .cjp-judge-dashboard-results .cjp-jd-td-status {
        min-width: 108px;
    }

    .cjp-judge-dashboard-results .cjp-jd-score-val {
        font-size: 17px;
    }

    .cjp-judge-dashboard-results .cjp-jd-score-panel {
        min-height: 40px;
        padding: 4px 6px;
    }

    .cjp-judge-dashboard-results .cjp-judge-score-now.cjp-judge-score-now--chunky,
    .cjp-judge-dashboard-results .cjp-judge-edit-inline.cjp-judge-edit-inline--chunky {
        padding: 8px 10px;
        font-size: 10px;
        letter-spacing: 0.05em;
    }

    .cjp-judge-dashboard-results .cjp-judge-link-notes--btn {
        margin-left: 4px;
        padding: 5px 8px;
        font-size: 9px;
    }
}

/* ========================================
   Judge dashboard — Score / Edit in modal (iframe)
   Loads voting-form / edit-score URLs without leaving the dashboard.
   Cross-browser: safe-area + dvh/svh fallbacks, iOS scroll, touch targets.
   ======================================== */
.cjp-judge-score-modal {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    z-index: 2147483645;
    display: none;
    align-items: center;
    justify-content: center;
    /* iOS safe areas (notch / home indicator) */
    padding: max(12px, env(safe-area-inset-top, 0px)) max(12px, env(safe-area-inset-right, 0px)) max(12px, env(safe-area-inset-bottom, 0px)) max(12px, env(safe-area-inset-left, 0px));
    box-sizing: border-box;
    background: rgba(0, 0, 0, 0.88);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
    /* Prevent scroll chaining into the page behind (Safari / Chrome / Firefox / Brave) */
    overscroll-behavior: contain;
}

.cjp-judge-score-modal.hidden {
    display: none !important;
}

.cjp-judge-score-modal:not(.hidden) {
    display: flex !important;
}

.cjp-judge-score-modal__panel {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: min(960px, 100%);
    min-height: 0;
    background: #0d0d0d;
    border: 1px solid #ffb408;
    border-radius: 10px;
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.65);
    overflow: hidden;
    /* vh → svh (iOS small viewport) → dvh (dynamic toolbars) */
    max-height: 90vh;
    max-height: 90svh;
    max-height: 90dvh;
    height: min(90vh, 900px);
    height: min(90svh, 900px);
    height: min(90dvh, 900px);
}

/* Dialog title: visible to AT only (outer chrome bar removed). */
.cjp-judge-score-modal__title--sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.cjp-judge-score-modal__close {
    position: absolute;
    top: max(8px, env(safe-area-inset-top, 0px));
    right: max(8px, env(safe-area-inset-right, 0px));
    z-index: 10;
    flex-shrink: 0;
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: #ffb408;
    color: #000;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.45);
}

.cjp-judge-score-modal__close:hover,
.cjp-judge-score-modal__close:focus-visible {
    filter: brightness(1.08);
    outline: 2px solid #fff;
    outline-offset: 2px;
}

/* Visible hint: submit sits below the fold in tall GF forms inside the iframe */
.cjp-judge-score-modal__hint {
    flex-shrink: 0;
    margin: 0;
    padding: 8px 44px 4px 12px;
    font-size: 12px;
    line-height: 1.35;
    color: rgba(255, 255, 255, 0.52);
    text-align: center;
    letter-spacing: 0.02em;
    border-bottom: 1px solid rgba(255, 180, 8, 0.15);
}

@media (min-width: 901px) {
    .cjp-judge-score-modal__hint {
        padding-right: 12px;
    }
}

.cjp-judge-score-modal__frame-wrap {
    position: relative;
    display: flex;
    flex-direction: column;
    /* flex-basis 0%: lets the iframe fill the panel instead of sticking at min-height (~40vh) */
    flex: 1 1 0%;
    min-height: 0;
    /* Match panel chrome — white showed through as a “blank” block on iOS if iframe paints late */
    background: #0d0d0d;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
}

.cjp-judge-score-modal__loading {
    position: absolute;
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
    inset: 0;
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 13, 13, 0.92);
    color: rgba(255, 255, 255, 0.88);
    font-size: 1rem;
    font-family: "Inter", sans-serif;
}

.cjp-judge-score-modal__loading.cjp-judge-score-modal__loading--hidden {
    display: none;
}

.cjp-judge-score-modal__iframe {
    display: block;
    width: 100%;
    flex: 1 1 auto;
    align-self: stretch;
    min-height: 0;
    border: 0;
    background: #0d0d0d;
    /* Do not use height: 100% + min-height: 40vh here — when % fails, iframe stayed ~half the viewport */
}

@media (max-width: 600px) {
    .cjp-judge-score-modal {
        padding: 0;
        padding-top: env(safe-area-inset-top, 0px);
        padding-bottom: env(safe-area-inset-bottom, 0px);
    }

    .cjp-judge-score-modal__panel {
        border-radius: 0;
        max-height: none;
        height: 100vh;
        height: 100svh;
        height: 100dvh;
        height: -webkit-fill-available;
    }
}

@media (prefers-reduced-motion: reduce) {
    .cjp-judge-score-modal__close:hover,
    .cjp-judge-score-modal__close:focus-visible {
        filter: none;
    }
}

