:root {
    --qf-purple: #7545f5;
    --qf-purple-dark: #5f32da;
    --qf-pink: #ed5ca9;
    --qf-ink: #20202a;
    --qf-muted: #676779;
    --qf-border: #e5e1f2;
    --qf-soft: #f8f6ff;
    --qf-danger: #c83356;
}

.qf-cover-guidance,
.qf-poster-upload {
    box-sizing: border-box;
    margin: 0 0 24px;
    padding: 22px;
    border: 1px solid var(--qf-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(61, 38, 116, .06);
}

.qf-cover-guidance {
    margin-bottom: 18px;
    background: linear-gradient(145deg, #fff 0%, var(--qf-soft) 100%);
}

.qf-field-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
}

.qf-field-heading h3 {
    margin: 0 0 7px !important;
    color: var(--qf-ink);
    font-size: 19px !important;
    line-height: 1.3;
}

.qf-field-heading p,
.qf-field-note {
    margin: 0;
    color: var(--qf-muted);
    font-size: 14px;
    line-height: 1.6;
}

.qf-required {
    display: inline-flex;
    margin-left: 7px;
    padding: 4px 9px;
    border-radius: 999px;
    background: #ffe9ef;
    color: var(--qf-danger);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
    vertical-align: 2px;
}

.qf-ratio-badge {
    flex: 0 0 auto;
    padding: 9px 12px;
    border: 1px solid #d9d0fa;
    border-radius: 10px;
    background: #fff;
    color: var(--qf-purple-dark);
    font-size: 14px;
    font-weight: 800;
}

.qf-cover-specs {
    margin: 17px 0 9px;
    padding: 12px 14px;
    border-radius: 11px;
    background: #eee9ff;
    color: #4e328f;
    font-size: 13px;
    font-weight: 700;
}

.qf-ratio-warning,
.qf-cover-error {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.5;
}

.qf-ratio-warning {
    border: 1px solid #efd58a;
    background: #fff8df;
    color: #715716;
}

.qf-cover-error {
    border: 1px solid #efb7c3;
    background: #fff0f3;
    color: #9f2341;
    font-weight: 700;
}

.qf-poster-dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 150px;
    margin-top: 18px;
    padding: 24px;
    border: 2px dashed #d8cff4;
    border-radius: 14px;
    background: var(--qf-soft);
    cursor: pointer;
    text-align: center;
    transition: border-color .2s ease, background .2s ease, transform .2s ease;
}

.qf-poster-dropzone:hover {
    border-color: var(--qf-purple);
    background: #f3efff;
    transform: translateY(-1px);
}

.qf-poster-dropzone input[type="file"] {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
}

.qf-poster-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 21px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--qf-purple), var(--qf-pink));
    color: #fff;
    font-size: 14px;
    font-weight: 750;
    box-shadow: 0 8px 20px rgba(117, 69, 245, .2);
}

.qf-poster-formats {
    margin-top: 11px;
    color: var(--qf-muted);
    font-size: 12px;
}

.qf-poster-preview {
    margin-top: 20px;
    text-align: center;
}

.qf-poster-preview img {
    display: block;
    width: auto;
    max-width: 100%;
    max-height: 520px;
    margin: 0 auto 12px;
    border-radius: 12px;
    box-shadow: 0 12px 34px rgba(31, 22, 58, .15);
}

.qf-remove-poster {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--qf-danger);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
}

.qf-event-poster {
    width: 100%;
    max-width: 860px;
    margin: 54px auto 18px;
    padding: 28px;
    border: 1px solid var(--qf-border);
    border-radius: 22px;
    background: linear-gradient(145deg, #fff 0%, var(--qf-soft) 100%);
    box-shadow: 0 18px 50px rgba(53, 34, 96, .09);
    text-align: center;
}

.qf-event-poster__header {
    margin-bottom: 20px;
}

.qf-event-poster__eyebrow {
    display: block;
    margin-bottom: 5px;
    color: var(--qf-purple);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.qf-event-poster h2 {
    margin: 0 !important;
    color: var(--qf-ink);
    font-size: clamp(24px, 3vw, 34px) !important;
    line-height: 1.25;
}

.qf-event-poster__frame {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 180px;
    padding: 18px;
    border-radius: 16px;
    background: #f0edf8;
    text-decoration: none;
}

.qf-event-poster__image {
    display: block;
    width: auto !important;
    max-width: 100% !important;
    height: auto !important;
    max-height: 820px;
    margin: 0 auto;
    border-radius: 10px;
    object-fit: contain;
    box-shadow: 0 12px 34px rgba(30, 22, 49, .16);
}

.qf-event-poster__hint {
    margin: 12px 0 0 !important;
    color: var(--qf-muted);
    font-size: 12px;
}

.qf-admin-poster-preview {
    display: none;
    margin: 12px 0;
    padding: 8px;
    border-radius: 8px;
    background: #f6f4fb;
    text-align: center;
}

.qf-admin-poster-preview.has-image {
    display: block;
}

.qf-admin-poster-preview img {
    width: auto;
    max-width: 100%;
    height: auto;
    max-height: 280px;
}

.qf-is-hidden {
    display: none !important;
}

@media (max-width: 700px) {
    .qf-cover-guidance,
    .qf-poster-upload {
        padding: 18px;
        border-radius: 15px;
    }

    .qf-field-heading {
        display: block;
    }

    .qf-ratio-badge {
        display: inline-flex;
        margin-top: 13px;
    }

    .qf-event-poster {
        margin-top: 38px;
        padding: 18px;
        border-radius: 17px;
    }

    .qf-event-poster__frame {
        padding: 10px;
    }
}

/* v1.0.1 — custom QueerFriends front-end event form */
.qf-cover-field .qf-cover-guidance {
    margin: 10px 0 14px !important;
    padding: 14px 16px !important;
    border: 1px solid #e5e1f2 !important;
    border-radius: 14px !important;
    background: #faf9ff !important;
    box-shadow: none !important;
}

.qf-cover-guide-top {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 7px;
}

.qf-cover-guidance p {
    margin: 0 0 8px !important;
    color: #676779;
    font-size: 13px;
    line-height: 1.45;
}

.qf-cover-guidance .qf-cover-specs {
    margin: 8px 0 !important;
    padding: 9px 11px !important;
}

.qf-cover-file-input {
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 56px !important;
    padding: 7px 10px !important;
    border: 2px solid #eeeafd !important;
    border-radius: 16px !important;
    background: #fff !important;
    color: #20202a !important;
    font: inherit !important;
    line-height: 38px !important;
}

.qf-cover-file-input::file-selector-button {
    min-height: 40px;
    margin: 0 14px 0 0;
    padding: 0 18px;
    border: 0;
    border-radius: 11px;
    background: #7545f5;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-size: 14px;
    font-weight: 700;
}

.qf-poster-upload {
    box-sizing: border-box;
    min-width: 0;
    margin: 0 0 28px;
}

.qf-poster-heading > label {
    display: block;
    margin: 0 0 8px;
    color: #1f2030;
    font-size: inherit;
    font-weight: 700;
}

.qf-poster-heading > p {
    margin: 0 0 12px;
    color: #6b7187;
    font-size: 13px;
    line-height: 1.5;
}

.qf-poster-upload .qf-poster-dropzone {
    min-height: 118px;
    margin-top: 0;
    padding: 18px;
    border-radius: 16px;
}

@media (max-width: 767px) {
    .qf-cover-file-input::file-selector-button {
        display: block;
        margin-right: 10px;
        padding: 0 13px;
    }
}


/* v1.0.2 — keep poster directly beneath the cover field */
.qf-cover-field > .qf-poster-upload {
    width: 100%;
    margin: 26px 0 0 !important;
    padding: 22px !important;
}

.qf-cover-field > .qf-poster-upload .qf-poster-heading > label {
    margin-bottom: 8px;
}

.qf-cover-field > .qf-poster-upload .qf-poster-dropzone {
    width: 100%;
    margin-top: 16px;
}

@media (max-width: 767px) {
    .qf-cover-field > .qf-poster-upload {
        margin-top: 20px !important;
        padding: 18px !important;
    }
}


/* v1.0.3 — paired image uploads */
.qf-event-images-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    gap: 22px;
    align-items: stretch;
    width: 100%;
    margin-top: 10px;
}

.qf-cover-card,
.qf-event-images-row > .qf-poster-upload {
    box-sizing: border-box;
    min-width: 0;
    height: 100%;
    margin: 0 !important;
    padding: 22px !important;
    border: 1px solid var(--qf-border);
    border-radius: 18px;
    background: #fff;
    box-shadow: 0 10px 28px rgba(61, 38, 116, .06);
}

.qf-cover-card .qf-cover-guidance {
    margin: 0 0 16px !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
}

.qf-cover-guidance p,
.qf-cover-guidance .qf-field-note,
.qf-poster-heading > p,
.qf-cover-specs,
.qf-cover-formats,
.qf-poster-formats {
    font-size: 13px !important;
    line-height: 1.5 !important;
}

.qf-cover-dropzone {
    display: flex;
    align-items: center;
    gap: 14px;
    width: 100%;
    min-height: 58px;
    padding: 8px;
    border: 2px solid #eeeafd;
    border-radius: 16px;
    background: #fff;
    cursor: pointer;
}

.qf-cover-dropzone .qf-cover-file-input {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    white-space: nowrap !important;
}

.qf-cover-button,
.qf-poster-button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    padding: 0 22px;
    border-radius: 12px;
    background: var(--qf-purple) !important;
    color: #fff;
    font-size: 14px;
    font-weight: 750;
    box-shadow: 0 8px 20px rgba(117, 69, 245, .2);
    white-space: nowrap;
}

.qf-cover-filename {
    min-width: 0;
    overflow: hidden;
    color: var(--qf-ink);
    font-size: 14px;
    font-weight: 600;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qf-cover-formats {
    display: block;
    margin-top: 11px !important;
    color: var(--qf-muted) !important;
    font-weight: 400 !important;
}

.qf-event-images-row > .qf-poster-upload .qf-poster-dropzone {
    min-height: 132px;
    margin-top: 16px;
}

@media (max-width: 900px) {
    .qf-event-images-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 520px) {
    .qf-cover-dropzone {
        align-items: stretch;
        flex-direction: column;
    }

    .qf-cover-button,
    .qf-poster-button {
        width: 100%;
    }

    .qf-cover-filename {
        padding: 2px 6px 4px;
        text-align: center;
    }
}

/* v1.0.4 — full-width image row below Event Website */
.qf-cover-source-hidden {
    display: none !important;
}

.qf-event-images-row {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    margin: 26px 0 28px !important;
    gap: 28px !important;
}

.qf-cover-card,
.qf-event-images-row > .qf-poster-upload {
    width: 100% !important;
    padding: 24px !important;
}

.qf-cover-guidance h3,
.qf-poster-heading > label {
    display: block;
    margin: 0 0 14px !important;
    color: var(--qf-ink) !important;
    font-size: 19px !important;
    line-height: 1.3 !important;
    font-weight: 700 !important;
}

.qf-cover-guide-top {
    margin-bottom: 12px !important;
}

.qf-cover-guidance p,
.qf-cover-guidance .qf-field-note,
.qf-poster-heading > p,
.qf-cover-formats,
.qf-poster-formats,
.qf-cover-filename {
    font-size: 14px !important;
    line-height: 1.5 !important;
    font-weight: 400 !important;
}

.qf-cover-specs {
    margin: 12px 0 9px !important;
    font-size: 14px !important;
    line-height: 1.5 !important;
    font-weight: 600 !important;
}

.qf-event-images-row > .qf-poster-upload .qf-poster-dropzone {
    min-height: 126px;
}

.qf-poster-button,
.qf-cover-button {
    background: var(--qf-purple) !important;
}

@media (max-width: 900px) {
    .qf-event-images-row {
        gap: 20px !important;
        margin-top: 20px !important;
    }
}

/* v1.0.5 — cohesive cover and poster cards */
.qf-event-images-row {
    align-items: stretch;
}

.qf-cover-card,
.qf-event-images-row > .qf-poster-upload {
    display: flex;
    flex-direction: column;
    padding: 28px 30px !important;
}

.qf-cover-guidance h3,
.qf-poster-heading h3 {
    margin: 0 0 22px !important;
    color: #171927;
    font-size: 22px !important;
    line-height: 1.25;
    font-weight: 700;
}

.qf-cover-guide-top,
.qf-poster-guide-top {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    margin: 0 0 18px;
}

.qf-required,
.qf-optional {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    margin: 0;
    padding: 0 14px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
}

.qf-optional {
    background: #eee9ff;
    color: #5f32da;
}

.qf-ratio-badge {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 13px;
}

.qf-cover-guidance > p,
.qf-poster-heading > p,
.qf-cover-guidance .qf-field-note,
.qf-poster-heading .qf-field-note {
    margin: 0 0 16px !important;
    color: #6b7187 !important;
    font-size: 15px !important;
    line-height: 1.5 !important;
    font-weight: 400 !important;
}

.qf-cover-specs,
.qf-poster-specs {
    margin: 0 0 16px !important;
    padding: 13px 16px !important;
    border-radius: 12px;
    background: #eee9ff;
    color: #4e328f;
    font-size: 15px !important;
    line-height: 1.4 !important;
    font-weight: 700;
}

.qf-cover-guidance,
.qf-poster-heading {
    min-height: 278px;
}

.qf-cover-dropzone,
.qf-event-images-row > .qf-poster-upload .qf-poster-dropzone {
    box-sizing: border-box;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
        "button filename"
        "formats formats";
    align-items: center;
    gap: 14px 20px;
    width: 100%;
    min-height: 128px;
    margin-top: auto;
    padding: 16px 18px;
    border: 2px solid #eeeafd;
    border-radius: 16px;
    background: #fbfaff;
    text-align: left;
}

.qf-event-images-row > .qf-poster-upload .qf-poster-dropzone {
    border-style: solid;
}

.qf-cover-button,
.qf-poster-button {
    grid-area: button;
    min-width: 210px;
    min-height: 52px;
    border-radius: 13px;
    font-size: 15px;
}

.qf-cover-filename,
.qf-poster-filename {
    grid-area: filename;
    min-width: 0;
    overflow: hidden;
    color: #20202a;
    font-size: 15px;
    font-weight: 400;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.qf-cover-formats,
.qf-poster-formats {
    grid-area: formats;
    margin: 0 !important;
    color: #6b7187 !important;
    font-size: 13px !important;
    line-height: 1.4 !important;
    font-weight: 400 !important;
}

@media (max-width: 1100px) {
    .qf-cover-guidance,
    .qf-poster-heading {
        min-height: 300px;
    }

    .qf-cover-dropzone,
    .qf-event-images-row > .qf-poster-upload .qf-poster-dropzone {
        grid-template-columns: 1fr;
        grid-template-areas:
            "button"
            "filename"
            "formats";
        text-align: center;
    }

    .qf-cover-button,
    .qf-poster-button {
        width: 100%;
        min-width: 0;
    }
}

@media (max-width: 900px) {
    .qf-cover-guidance,
    .qf-poster-heading {
        min-height: 0;
    }
}


/* v1.0.6 — align cover card to poster card */
.qf-cover-card .qf-cover-dropzone,
.qf-event-images-row > .qf-poster-upload .qf-poster-dropzone {
    margin-top: auto !important;
}

.qf-cover-card .qf-cover-formats,
.qf-event-images-row > .qf-poster-upload .qf-poster-formats {
    align-self: center;
}

.qf-cover-card .qf-cover-guidance,
.qf-event-images-row > .qf-poster-upload .qf-poster-heading {
    display: flex;
    flex-direction: column;
}


/* v1.0.7 — pixel-align both cards using the poster card as reference */
.qf-cover-card,
.qf-event-images-row > .qf-poster-upload {
    gap: 0;
}

.qf-cover-card .qf-cover-guidance,
.qf-event-images-row > .qf-poster-upload .qf-poster-heading {
    display: grid;
    grid-template-rows: auto auto minmax(46px, auto) auto minmax(46px, auto);
    row-gap: 0;
    align-content: start;
    width: 100%;
    min-height: 278px;
}

.qf-cover-guidance h3,
.qf-poster-heading h3 {
    min-height: 55px;
}

.qf-cover-guide-top,
.qf-poster-guide-top {
    min-height: 50px;
    margin: 0 0 18px !important;
}

.qf-cover-guidance > p,
.qf-poster-heading > p {
    display: flex;
    align-items: flex-start;
    min-height: 46px;
    margin: 0 0 16px !important;
}

.qf-cover-specs,
.qf-poster-specs {
    display: flex;
    align-items: center;
    min-height: 60px;
    margin: 0 0 16px !important;
}

.qf-cover-guidance .qf-field-note,
.qf-poster-heading .qf-field-note {
    display: flex;
    align-items: flex-start;
    min-height: 46px;
    margin: 0 !important;
}

.qf-cover-dropzone,
.qf-event-images-row > .qf-poster-upload .qf-poster-dropzone {
    align-self: stretch;
}

@media (max-width: 900px) {
    .qf-cover-card .qf-cover-guidance,
    .qf-event-images-row > .qf-poster-upload .qf-poster-heading {
        display: flex;
        min-height: 0;
    }

    .qf-cover-guidance h3,
    .qf-poster-heading h3,
    .qf-cover-guidance > p,
    .qf-poster-heading > p,
    .qf-cover-specs,
    .qf-poster-specs,
    .qf-cover-guidance .qf-field-note,
    .qf-poster-heading .qf-field-note {
        min-height: 0;
    }
}


/* v1.0.8 — exact cover/poster spacing parity */
.qf-cover-card {
    box-shadow: none !important;
}

.qf-cover-card .qf-cover-guidance {
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.qf-cover-card .qf-cover-specs,
.qf-event-images-row > .qf-poster-upload .qf-poster-specs {
    box-sizing: border-box !important;
    width: 100% !important;
    min-height: 60px !important;
    margin: 0 0 16px !important;
    padding: 13px 16px !important;
    border: 0 !important;
    border-radius: 12px !important;
    box-shadow: none !important;
}

.qf-cover-card .qf-cover-specs {
    align-self: stretch !important;
}

/* v1.0.9 — independent card heights and matching image previews */
.qf-event-images-row {
    align-items: start !important;
}

.qf-cover-card,
.qf-event-images-row > .qf-poster-upload {
    height: auto !important;
    align-self: start !important;
    box-shadow: 0 10px 28px rgba(61, 38, 116, .06) !important;
}

.qf-cover-card .qf-cover-guidance {
    box-shadow: none !important;
}

.qf-cover-preview,
.qf-poster-preview {
    width: 100%;
    margin-top: 26px;
    text-align: center;
}

.qf-cover-preview[hidden],
.qf-poster-preview[hidden] {
    display: none !important;
}

.qf-cover-preview img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    height: auto;
    margin: 0 auto 14px;
    border-radius: 0;
    object-fit: cover;
    box-shadow: none;
}

.qf-cover-preview .qf-remove-cover,
.qf-poster-preview .qf-remove-poster {
    appearance: none;
    border: 0;
    background: transparent;
    color: var(--qf-danger);
    cursor: pointer;
    font-size: 13px;
    font-weight: 700;
    text-decoration: underline;
}

@media (max-width: 900px) {
    .qf-cover-card,
    .qf-event-images-row > .qf-poster-upload {
        align-self: stretch !important;
    }
}
