/* ============================================
   All Saints Photo Competition — Public Styles
   ============================================ */

/* ---- Notices ---- */
.aspc-notice {
    background: #f5f5f7;
    border-left: 4px solid #e8e8e8;
    padding: 16px 20px;
    border-radius: 4px;
    margin: 20px 0;
    font-size: 18px;
    line-height: 1.8;
}
.aspc-notice--error { border-color: #f34334; background: #fff5f5; }
.aspc-notice--login { text-align: center; padding: 30px; }
.aspc-notice a { color: #f34334; text-decoration: none; }
.aspc-notice a:hover { color: #b53426; }

/* ---- Competition status bar ---- */
.aspc-status-bar {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 20px;
}
.aspc-status-bar--open   { background: #d4edda; color: #155724; }
.aspc-status-bar--closed { background: #f5f5f7; color: #555; }
.aspc-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: currentColor;
    display: inline-block;
    animation: aspc-pulse 1.5s infinite;
}
@keyframes aspc-pulse {
    0%, 100% { opacity: 1; }
    50%       { opacity: .4; }
}

/* ---- Form layout ---- */
.aspc-form-wrap {
    max-width: 680px;
    margin: 0 auto;
}
.aspc-form-header h3 {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 4px;
    color: #242424;
}
.aspc-submissions-remaining {
    font-size: 16px;
    line-height: 1.8;
    color: #555;
    margin-bottom: 24px;
}

/* Two-column row for first / last name */
.aspc-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
@media (max-width: 480px) {
    .aspc-field-row { grid-template-columns: 1fr; }
}

/* Section headings within the form */
.aspc-section-label {
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: #242424;
    margin: 28px 0 14px;
    padding-bottom: 6px;
    border-bottom: 1px solid #e8e8e8;
}

/* Feedback message */
.aspc-form-message {
    padding: 14px 18px;
    border-radius: 4px;
    margin-bottom: 20px;
    font-size: 16px;
    line-height: 1.8;
}
.aspc-form-message--success { background: #d4edda; color: #155724; border-left: 4px solid #28a745; }
.aspc-form-message--error   { background: #fff5f5; color: #b53426; border-left: 4px solid #f34334; }

/* ---- Individual field ---- */
.aspc-field {
    margin-bottom: 20px;
    position: relative;
}
.aspc-field label {
    display: block;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
    color: #242424;
    margin-bottom: 6px;
}
.aspc-field-hint {
    font-size: 14px;
    line-height: 1.8;
    color: #888;
    margin: 5px 0 0;
}
.required { color: #f34334; }
.optional  { font-size: 14px; color: #999; font-weight: 400; }

/* Text / email inputs */
.aspc-field input[type="text"],
.aspc-field input[type="email"],
.aspc-field textarea {
    width: 100%;
    color: #242424;
    font-size: 16px;
    line-height: 1.8;
    padding: 8px 14px;
   border: 1px solid #e8e8e8;
    border-radius: 4px;
    font-family: inherit;
    box-sizing: border-box;
    transition: background-color .15s, border-color .15s;
}
.aspc-field input[type="text"]:focus,
.aspc-field input[type="email"]:focus,
.aspc-field textarea:focus {
    outline: none;
    border-color: #242424;
}
.aspc-char-count {
    position: absolute;
    right: 0;
    bottom: -20px;
    font-size: 14px;
    color: #999;
}

/* ---- Upload area ---- */
.aspc-upload-area {
    border: 2px dashed #e8e8e8;
    border-radius: 4px;
    padding: 32px 20px;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: border-color .15s, background-color .15s;
}
.aspc-upload-area:hover {
    border-color: #242424;
    background-color: #f5f5f7;
}
.aspc-upload-area input[type="file"] {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}
.aspc-upload-icon { font-size: 36px; display: block; margin-bottom: 8px; }
.aspc-upload-placeholder p {
    margin: 0 0 6px;
    font-size: 16px;
    line-height: 1.8;
    color: #555;
}
.aspc-upload-placeholder small { font-size: 14px; color: #999; }
.aspc-upload-preview { position: relative; }
.aspc-upload-preview img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 4px;
    display: block;
    margin: 0 auto;
}
.aspc-remove-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,.6);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 4px 10px;
    font-size: 14px;
    cursor: pointer;
}

/* ---- Declarations / checkboxes ---- */
.aspc-checkboxes {
    background: #f5f5f7;
    border-radius: 4px;
    padding: 22px;
    margin-bottom: 24px;
}
.aspc-checkbox-field { margin-bottom: 14px; }
.aspc-checkbox-field:last-child { margin-bottom: 0; }
.aspc-checkbox-field label {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 14px;
    font-weight: 400;
    line-height: 1.8;
    color: #242424;
    cursor: pointer;
}
.aspc-checkbox-field--optional label { color: #555; }
.aspc-checkbox-field input[type="checkbox"] {
    width: 18px;
    height: 18px;
    flex-shrink: 0;
    margin-top: 3px;
    cursor: pointer;
    accent-color: #242424;
}
.aspc-checkbox-field a { color: #f34334; text-decoration: none; }
.aspc-checkbox-field a:hover { color: #b53426; }

/* ---- Submit button ---- */
.aspc-submit-row { margin-top: 8px; }
.aspc-btn {
    display: inline-block;
    font-size: 16px;
    font-weight: 400;
    font-family: inherit;
    padding: 8px 32px;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: background-color .15s, transform .1s;
}
.aspc-btn--primary { background-color: #f34334; color: #fff; }
.aspc-btn--primary:hover {
    background-color: #b53426;
    color: #fff;
    transform: translateY(-1px);
}
.aspc-btn--primary:disabled {
    background-color: #ccc;
    color: #fff;
    cursor: not-allowed;
    transform: none;
}

/* ---- Status badges ---- */
.aspc-status {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.aspc-status--pending     { background: #fff3cd; color: #856404; }
.aspc-status--approved    { background: #d4edda; color: #155724; }
.aspc-status--rejected    { background: #fff5f5; color: #b53426; }
.aspc-status--shortlisted { background: #d7ebf9; color: #004085; }
.aspc-status--winner      { background: #fff3cd; color: #856404; border: 1px solid #f0b429; }

/* ---- Gallery ---- */
.aspc-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
    margin: 20px 0;
}
.aspc-gallery-item {
    border-radius: 4px;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,.08);
    transition: transform .2s, box-shadow .2s;
    background: #fff;
}
.aspc-gallery-item:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0,0,0,.13);
}
.aspc-gallery-img-wrap { overflow: hidden; height: 180px; }
.aspc-gallery-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .3s;
    display: block;
}
.aspc-gallery-item:hover .aspc-gallery-img-wrap img { transform: scale(1.05); }
.aspc-gallery-caption { padding: 10px 12px; background: #fff; }
.aspc-gallery-caption strong { display: block; font-size: 14px; font-weight: 700; color: #242424; }
.aspc-gallery-caption span   { font-size: 14px; color: #888; }

/* ---- Lightbox ---- */
.aspc-lightbox {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
}
.aspc-lightbox-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,.88);
    cursor: pointer;
}
.aspc-lightbox-content {
    position: relative;
    z-index: 1;
    max-width: 90vw;
    max-height: 90vh;
    text-align: center;
}
.aspc-lightbox-content img {
    max-width: 90vw;
    max-height: 80vh;
    border-radius: 4px;
    display: block;
}
.aspc-lightbox-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    line-height: 1;
    padding: 0;
}
.aspc-lightbox-caption {
    color: #fff;
    margin-top: 12px;
    font-size: 16px;
    line-height: 1.8;
}

/* ---- Judging panel ---- */
.aspc-judging-panel { max-width: 900px; }
.aspc-panel-title {
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: #242424;
    margin-bottom: 24px;
}
.aspc-judge-card {
    display: flex;
    gap: 20px;
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    margin-bottom: 24px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,.06);
}
.aspc-judge-card-img { flex: 0 0 240px; }
.aspc-judge-card-img img { width: 100%; height: 220px; object-fit: cover; display: block; }
.aspc-judge-card-body { flex: 1; padding: 18px 18px 18px 0; }
.aspc-judge-card-body h4 { font-size: 18px; font-weight: 400; line-height: 1; margin: 0 0 4px; color: #242424; }
.aspc-judge-submitter { font-size: 14px; color: #888; margin: 0 0 8px; line-height: 1.8; }
.aspc-judge-desc { font-size: 14px; color: #555; font-style: italic; line-height: 1.8; }

.aspc-score-row { margin: 12px 0 8px; }
.aspc-score-row label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 6px; }
.aspc-score-stars { display: flex; gap: 4px; margin-bottom: 6px; }
.aspc-star {
    width: 32px;
    height: 32px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    background: #f5f5f7;
    font-size: 12px;
    font-weight: 700;
    color: #242424;
    cursor: pointer;
    font-family: inherit;
    transition: background-color .15s;
}
.aspc-star.active,
.aspc-star:hover { background: #f34334; color: #fff; border-color: #f34334; }
.aspc-avg-score { font-size: 14px; color: #555; }

.aspc-comment-row { margin: 8px 0 12px; }
.aspc-comment-row label { display: block; font-size: 14px; font-weight: 700; margin-bottom: 4px; }
.aspc-judge-comment {
    width: 100%;
    background-color: #f5f5f7;
    color: #242424;
    font-size: 14px;
    line-height: 1.8;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    padding: 8px 14px;
    font-family: inherit;
    box-sizing: border-box;
}
.aspc-judge-comment:focus {
    outline: none;
    background-color: #e8e8e8;
    border-color: #bbb;
}

.aspc-judge-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.aspc-btn--save-score {
    background: #f34334;
    color: #fff;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: background-color .15s;
}
.aspc-btn--save-score:hover { background: #b53426; }
.aspc-btn--status {
    background: #f5f5f7;
    color: #242424;
    border: 1px solid #e8e8e8;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: background-color .15s;
}
.aspc-btn--status.active        { font-weight: 700; }
.aspc-btn--approved.active      { background: #d4edda; border-color: #28a745; color: #155724; }
.aspc-btn--shortlisted.active   { background: #d7ebf9; border-color: #004085; color: #004085; }
.aspc-btn--rejected.active      { background: #fff5f5; border-color: #f34334; color: #b53426; }

.aspc-slot-assign { display: flex; align-items: center; gap: 8px; margin-top: 8px; width: 100%; flex-wrap: wrap; }
.aspc-slot-assign label { font-size: 14px; font-weight: 700; white-space: nowrap; }
.aspc-slot-select {
    font-size: 14px;
    padding: 6px 8px;
    border: 1px solid #e8e8e8;
    border-radius: 4px;
    background: #f5f5f7;
    color: #242424;
    font-family: inherit;
}
.aspc-btn--assign-slot {
    background: #242424;
    color: #fff;
    border: none;
    padding: 6px 14px;
    border-radius: 4px;
    font-size: 14px;
    cursor: pointer;
    font-family: inherit;
    transition: opacity .15s;
}
.aspc-btn--assign-slot:hover { opacity: .8; }

/* ---- Leaderboard ---- */
.aspc-leaderboard { max-width: 900px; }

/* ---- Responsive ---- */
@media (max-width: 640px) {
    .aspc-judge-card      { flex-direction: column; }
    .aspc-judge-card-img  { flex: none; }
    .aspc-judge-card-img img { height: 200px; width: 100%; }
    .aspc-judge-card-body { padding: 14px; }
    .aspc-gallery         { grid-template-columns: repeat(2, 1fr); }
}