/* Admin layout */
.fjp-admin-wrap {
    max-width: 1120px;
}

.fjp-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    margin: 16px 0;
}

.fjp-card {
    background: #ffffff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 16px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

.fjp-full {
    margin-top: 16px;
}

/* Admin and shared forms */
.fjp-form {
    display: grid;
    gap: 10px;
}

.fjp-form input[type="text"],
.fjp-form input[type="url"] {
    width: 100%;
    max-width: 500px;
}

.fjp-form label {
    font-weight: 700;
}

.fjp-form input::placeholder,
.fjp-form textarea::placeholder,
.fjp-judge-form input::placeholder,
.fjp-judge-form textarea::placeholder {
    font-weight: 300;
}

.fjp-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.fjp-actions form {
    margin: 0;
}

.fjp-admin-wrap .button.button-primary,
.fjp-admin-wrap .button.button-secondary,
.fjp-admin-wrap .button:not(.button-link-delete) {
    background: var(--global-palette1, #0a4b78);
    border-color: var(--global-palette1, #0a4b78);
    color: #fff;
}

.fjp-admin-wrap .button.button-primary:hover,
.fjp-admin-wrap .button.button-secondary:hover,
.fjp-admin-wrap .button:not(.button-link-delete):hover {
    background: var(--global-palette1, #093a5d);
    border-color: var(--global-palette1, #093a5d);
    filter: brightness(0.9);
}

.fjp-sortable-table .fjp-sort-handle {
    cursor: move;
    width: 24px;
    text-align: center;
    color: #6b7280;
}

.fjp-sortable-table tbody tr {
    cursor: move;
    user-select: none;
}

.fjp-checklist {
    display: grid;
    gap: 6px;
}

.fjp-checklist label {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Judge form container */
.fjp-judge-form {
    display: grid;
    gap: 10px;
    max-width: 980px;
    padding: 14px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    background: #fff;
}

.fjp-card h2,
.fjp-judge-form h1,
.fjp-judge-form h2,
.fjp-judge-form h3 {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 10px;
    color: var(--global-palette1, #1f2937);
}

.fjp-judge-form select,
.fjp-judge-form input[type="number"] {
    width: 100%;
    padding: 8px;
}

.fjp-judge-form button {
    width: fit-content;
    justify-self: center;
    padding: 8px 14px;
    border: 0;
    border-radius: 6px;
    background: var(--global-palette1, #0a4b78);
    color: #fff;
    cursor: pointer;
}

.fjp-judge-form button:hover {
    background: var(--global-palette1, #093a5d);
    filter: brightness(0.9);
}

.fjp-judge-notice {
    margin: 0 0 12px;
    padding: 10px 12px;
    border-radius: 6px;
}

.fjp-judge-notice.notice-success {
    background: #f0f6fc;
    border: 1px solid #72aee6;
}

.fjp-judge-notice.notice-error {
    background: #fcf0f1;
    border: 1px solid #d63638;
}

/* Score table layout */
.fjp-score-table {
    display: grid;
    gap: 6px;
    padding: 8px 0;
    width: 100%;
    border-radius: 8px;
    overflow: hidden;
}

.fjp-judge-form .fjp-score-header,
.fjp-judge-form .fjp-score-row {
    display: flex !important;
    gap: 10px;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
}

.fjp-judge-form .fjp-score-header {
    font-weight: 600;
    background: var(--global-palette1, #eef3f8);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
}

.fjp-score-header-label {
    white-space: nowrap;
}

.fjp-judge-form .fjp-score-row > div:first-child,
.fjp-judge-form .fjp-score-header > div:first-child {
    flex: 1 1 auto;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.fjp-judge-form .fjp-score-row > div:last-child,
.fjp-judge-form .fjp-score-header > div:last-child {
    flex: 0 0 120px;
    text-align: right;
}

.fjp-judge-form .fjp-score-row input[type="number"] {
    width: 70px !important;
    max-width: 70px !important;
    padding: 6px 8px;
}

.fjp-category-name {
    font-weight: 600;
}

.fjp-nominee {
    font-size: 12px;
    color: #4b5563;
}


.fjp-score-na {
    background: #f3f4f6;
    color: #9ca3af;
}

.fjp-score-table .fjp-score-row:nth-child(odd) {
    background: #f8f9fb;
}

.fjp-score-table .fjp-score-row {
    padding: 6px 8px;
    width: 100%;
    box-sizing: border-box;
}

.fjp-submit-row {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

.fjp-film-complete {
    color: #7a7a7a;
}

.fjp-selected-challenge {
    font-weight: 700;
    font-size: 18px;
    background: var(--global-palette1, #f3f6fb);
    border: 1px solid var(--global-palette1, #d6e0ea);
    color: #fff;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 6px;
}

.fjp-judge-login {
    max-width: 720px;
    margin: 40px auto;
    padding: 0 16px;
}

.fjp-judge-login .fjp-card {
    padding: 24px;
}

/* Judge page two-column layout */
.fjp-judge-layout {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    max-width: 920px;
    margin: 0 auto;
}

.fjp-judge-box {
    background: #ffffff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 14px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
}

/* Film embed container */
.fjp-film-embed {
    margin-top: 12px;
}

.fjp-film-embed iframe,
.fjp-film-embed embed,
.fjp-film-embed object {
    width: 100%;
    max-width: 100%;
}

.fjp-film-embed-wide {
    width: 100%;
    max-width: 100%;
    margin: 10px 0 16px;
}

@media (max-width: 860px) {
    .fjp-judge-layout {
        grid-template-columns: 1fr;
    }
}

/* Collapsible admin sections */
.fjp-section {
    margin-top: 12px;
}

.fjp-section summary {
    cursor: pointer;
    font-weight: 600;
    margin-bottom: 8px;
}

.fjp-judge-form .fjp-film-search {
    margin: 6px 0 10px;
}

.fjp-judge-form .fjp-film-search input[type="text"] {
    width: 100%;
    padding: 8px;
}

.fjp-judge-form .fjp-score-row > div:last-child,
.fjp-judge-form .fjp-score-header > div:last-child {
    flex: 0 0 120px;
    text-align: right;
}


.fjp-film-embed-empty {
    padding: 10px 12px;
    background: #f8f9fb;
    border: 1px dashed #c7cdd1;
    border-radius: 6px;
}

@media (max-width: 860px) {
    .fjp-judge-layout {
        grid-template-columns: 1fr;
    }
}
