/* ================================================================
   Google Forms-style public form CSS
   Pixel-accurate recreation of the Google Forms respondent view
   ================================================================ */

/* ── Page shell ────────────────────────────────────────── */
.gf-page {
    min-height: 100vh;
    padding: 0;
    background: var(--gf-page-bg, #f0ebf8);
    font-family: "Google Sans", "Public Sans", Roboto, Arial, sans-serif;
    color: #202124;
    -webkit-font-smoothing: antialiased;
}

/* ── Full-screen background image ──────────────────────── */
.gf-page--bg-image {
    background: #f0ebf8;
    position: relative;
}
.gf-page--bg-image::before {
    content: "";
    position: fixed;
    inset: 0;
    background: var(--gf-page-bg-img) center / cover no-repeat;
    z-index: 0;
}
.gf-page--bg-image > * {
    position: relative;
    z-index: 1;
}

.gf-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 12px 16px 40px;
}

/* ── Top progress bar (optional) ───────────────────────── */
.gf-progress {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: #e0d6f0;
    z-index: 100;
}
.gf-progress__bar {
    height: 100%;
    background: var(--gf-accent, #673ab7);
    border-radius: 0 2px 2px 0;
    transition: width .3s ease;
}

/* ── Title card ────────────────────────────────────────── */
.gf-title-card {
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    border-top: 10px solid var(--gf-accent, #673ab7);
    padding: 24px 24px 22px;
    margin-bottom: 12px;
    overflow: hidden;
}

/* Header image (Google Forms style banner) */
.gf-title-card--has-image {
    padding-top: 0;
}

.gf-title-card__image {
    margin: 0 -24px 20px;
}

.gf-title-card__image img {
    display: block;
    width: 100%;
    height: 200px;
    object-fit: cover;
}

.gf-title-card__name {
    margin: 0;
    font-size: 32px;
    font-weight: 400;
    line-height: 40px;
    color: #202124;
    font-family: "Google Sans", "Public Sans", Roboto, sans-serif;
    word-break: break-word;
}

.gf-title-card__desc {
    margin: 12px 0 0;
    font-size: 14px;
    line-height: 20px;
    color: #202124;
    white-space: pre-wrap;
    word-break: break-word;
}

.gf-admin-edit-banner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    background: #e8f0fe;
    color: #1a73e8;
    border: 1px solid #c5d9fc;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .3px;
    margin-bottom: 12px;
}

.gf-admin-edit-note {
    margin: 10px 0 0;
    font-size: 13px;
    color: #5f6368;
    border-top: 1px solid #dadce0;
    padding-top: 10px;
}

.gf-required-note {
    margin: 16px 0 0;
    padding-top: 16px;
    border-top: 1px solid #dadce0;
    font-size: 13px;
    color: #70757a;
}

.gf-required-note .gf-asterisk {
    color: #d93025;
    margin-right: 2px;
}

/* ── Section header card ───────────────────────────────── */
.gf-section-card {
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    border-top: 10px solid var(--gf-accent, #673ab7);
    padding: 24px 24px 22px;
    margin-bottom: 12px;
}

.gf-section-card__title {
    margin: 0;
    font-size: 24px;
    font-weight: 400;
    line-height: 32px;
    color: #202124;
}

.gf-section-card__desc {
    margin: 8px 0 0;
    font-size: 14px;
    line-height: 20px;
    color: #202124;
}

/* ── Question card ─────────────────────────────────────── */
.gf-question {
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    padding: 24px 24px 24px;
    margin-bottom: 12px;
    position: relative;
    transition: border-color .15s;
}

.gf-question:focus-within {
    border-color: var(--gf-accent, #673ab7);
    box-shadow: inset 4px 0 0 var(--gf-accent, #673ab7);
}

.gf-question--error,
.gf-question--error-live {
    border-color: #d93025;
    box-shadow: inset 4px 0 0 #d93025;
}

/* ── Locked (non-editable on resubmit) ─────────────────── */
.gf-question--locked {
    opacity: .65;
    pointer-events: none;
    background: #f8f9fa;
}
.gf-question__fieldset {
    border: none;
    margin: 0;
    padding: 0;
    min-inline-size: auto;
}
.gf-locked-label {
    font-size: 12px;
    font-weight: 600;
    color: #5f6368;
    margin-left: 8px;
}

.gf-question__title {
    margin: 0;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: #202124;
    padding-bottom: 8px;
}

.gf-question__title .gf-asterisk {
    color: #d93025;
    margin-left: 4px;
    font-weight: 400;
}

.gf-question__desc {
    margin: 0 0 12px;
    font-size: 12px;
    line-height: 16px;
    color: #70757a;
}

/* ── Error messages ────────────────────────────────────── */
.gf-errors {
    list-style: none;
    margin: 10px 0 0;
    padding: 0;
}

.gf-errors li {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #d93025;
    padding: 4px 0;
}

.gf-errors li::before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='%23d93025'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-2h2v2zm0-4h-2V7h2v6z'/%3E%3C/svg%3E") center/contain no-repeat;
}

.gf-password-chip {
    display: inline-flex;
    align-items: center;
    margin: 0 0 10px;
    padding: 5px 10px;
    border-radius: 999px;
    background: rgba(103, 58, 183, .08);
    color: var(--gf-accent, #673ab7);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .02em;
}

.gf-password-status {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 8px;
}

.gf-password-status--error {
    background: #fce8e6;
    border: 1px solid #f5c6cb;
}

.gf-password-status--locked {
    background: #fff4db;
    border: 1px solid #f4c56b;
}

.gf-password-status__title {
    margin: 0 0 4px;
    font-size: 13px;
    font-weight: 600;
    color: #202124;
}

.gf-password-status__text {
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
    color: #5f6368;
}

/* ── Form-level alert card ─────────────────────────────── */
.gf-alert-card {
    background: #fce8e6;
    border: 1px solid #f5c6cb;
    border-radius: 8px;
    padding: 16px 24px;
    margin-bottom: 12px;
}

.gf-alert-card--hidden {
    display: none;
}

.gf-alert-card__title {
    margin: 0 0 8px;
    font-size: 14px;
    font-weight: 500;
    color: #d93025;
}

.gf-alert-card__text {
    margin: 0;
    font-size: 13px;
    line-height: 1.6;
    color: #d93025;
}

.gf-alert-card ul {
    margin: 0;
    padding: 0 0 0 20px;
    font-size: 13px;
    color: #d93025;
    line-height: 1.6;
}

.gf-required-list {
    margin: 6px 0 8px;
    padding: 0 0 0 18px;
    font-size: 13px;
    color: #d93025;
    line-height: 1.8;
}

.gf-required-list:empty {
    display: none;
}

/* ── Text inputs (short answer / long answer) ──────────── */
.gf-input {
    display: block;
    width: 100%;
    padding: 8px 0 6px;
    border: none;
    border-bottom: 1px solid #dadce0;
    background: transparent;
    font: inherit;
    font-size: 14px;
    line-height: 20px;
    color: #202124;
    outline: none;
    transition: border-color .2s;
    border-radius: 0;
    -webkit-appearance: none;
}

.gf-input::placeholder {
    color: #80868b;
}

.gf-input:focus {
    border-bottom: 2px solid var(--gf-accent, #673ab7);
    padding-bottom: 5px;
}

.gf-input--error {
    border-bottom: 2px solid #d93025 !important;
    padding-bottom: 5px;
}

.gf-input--half {
    width: 50%;
}

.gf-textarea {
    display: block;
    width: 100%;
    padding: 8px 0 6px;
    border: none;
    border-bottom: 1px solid #dadce0;
    background: transparent;
    font: inherit;
    font-size: 14px;
    line-height: 20px;
    color: #202124;
    outline: none;
    resize: vertical;
    min-height: 28px;
    transition: border-color .2s;
    border-radius: 0;
    -webkit-appearance: none;
}

.gf-textarea:focus {
    border-bottom: 2px solid var(--gf-accent, #673ab7);
    padding-bottom: 5px;
}

.gf-textarea--error {
    border-bottom: 2px solid #d93025 !important;
    padding-bottom: 5px;
}

.gf-textarea::placeholder {
    color: #80868b;
}

/* ── Radio & Checkbox choices ──────────────────────────── */
.gf-choices {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.gf-choice {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 40px;
    padding: 4px 0;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
}

.gf-choice__control {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
    accent-color: var(--gf-accent, #673ab7);
    cursor: pointer;
    margin: 0;
}

.gf-choice__label {
    font-size: 14px;
    line-height: 20px;
    color: #202124;
}

/* Choice images in public form */
.gf-choices--with-images {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}
.gf-choices--with-images .gf-choice {
    flex-direction: column;
    align-items: center;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    padding: 12px 8px;
    text-align: center;
    transition: border-color .15s;
}
.gf-choices--with-images .gf-choice:has(:checked) {
    border-color: var(--gf-accent, #673ab7);
    background: rgba(103, 58, 183, .04);
}
.gf-choice__img {
    width: 100%;
    max-width: 130px;
    height: auto;
    border-radius: 6px;
    margin-bottom: 6px;
}

.gf-other-input {
    display: block;
    width: calc(100% - 32px);
    margin-left: 32px;
    margin-top: -4px;
    margin-bottom: 4px;
    padding: 4px 0;
    border: none;
    border-bottom: 1px solid #dadce0;
    background: transparent;
    font: inherit;
    font-size: 14px;
    color: #202124;
    outline: none;
}

.gf-other-input:focus {
    border-bottom: 2px solid var(--gf-accent, #673ab7);
}

.gf-other-input--error {
    border-bottom: 2px solid #d93025 !important;
}

/* ── Dropdown ──────────────────────────────────────────── */
.gf-select-wrap {
    display: inline-block;
    position: relative;
    margin-top: 4px;
}

.gf-select {
    appearance: none;
    -webkit-appearance: none;
    padding: 8px 36px 8px 12px;
    border: 1px solid #dadce0;
    border-radius: 4px;
    background: #fff;
    font: inherit;
    font-size: 14px;
    color: #202124;
    outline: none;
    cursor: pointer;
    min-width: 200px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='%235f6368'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

.gf-select:focus {
    border-color: var(--gf-accent, #673ab7);
    box-shadow: 0 0 0 1px var(--gf-accent, #673ab7);
}

.gf-select--error {
    border-color: #d93025 !important;
    box-shadow: 0 0 0 1px rgba(217, 48, 37, .2);
}

/* ── Linear scale ──────────────────────────────────────── */
.gf-scale {
    display: flex;
    align-items: center;
    gap: 0;
    margin-top: 8px;
    overflow-x: auto;
}

.gf-choices--error,
.gf-scale--error,
.gf-grid-wrap--error,
.gf-file-wrap--error,
.gf-answer-img--error {
    padding: 10px 12px;
    border: 1px solid rgba(217, 48, 37, .32);
    border-radius: 8px;
    background: #fce8e6;
}

.gf-scale__label {
    font-size: 14px;
    color: #5f6368;
    padding: 0 12px;
    white-space: nowrap;
    flex-shrink: 0;
}

.gf-scale__label:first-child {
    padding-left: 0;
}

.gf-scale__label:last-child {
    padding-right: 0;
}

.gf-scale__options {
    display: flex;
    align-items: center;
    gap: 0;
}

.gf-scale__option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    min-width: 48px;
    padding: 8px 4px;
    cursor: pointer;
}

.gf-scale__option input {
    accent-color: var(--gf-accent, #673ab7);
    width: 20px;
    height: 20px;
    cursor: pointer;
    margin: 0;
}

.gf-scale__option span {
    font-size: 14px;
    color: #202124;
}

/* ── Date / Time / DateTime ────────────────────────────── */
.gf-date-input,
.gf-time-input,
.gf-datetime-input {
    display: inline-block;
    padding: 8px 0 6px;
    border: none;
    border-bottom: 1px solid #dadce0;
    background: transparent;
    font: inherit;
    font-size: 14px;
    color: #202124;
    outline: none;
    -webkit-appearance: none;
}

.gf-date-input:focus,
.gf-time-input:focus,
.gf-datetime-input:focus {
    border-bottom: 2px solid var(--gf-accent, #673ab7);
    padding-bottom: 5px;
}

.gf-date-input--error,
.gf-time-input--error,
.gf-datetime-input--error {
    border-bottom: 2px solid #d93025 !important;
    padding-bottom: 5px;
}

/* ── File upload ───────────────────────────────────────── */
.gf-file-wrap {
    margin-top: 8px;
}

.gf-file-input {
    font: inherit;
    font-size: 14px;
    color: #5f6368;
}

.gf-file-current {
    margin: 10px 0 0;
    font-size: 13px;
    color: #5f6368;
}

.gf-file-current__info {
    display: flex; align-items: center; gap: 6px;
    margin: 0; font-size: 13px; color: #5f6368;
}

.gf-file-current__info a {
    color: var(--gf-accent, #673ab7);
    font-weight: 500;
    text-decoration: none;
}
.gf-file-current__info a:hover {
    text-decoration: underline;
}

.gf-file-current__info svg {
    flex-shrink: 0; opacity: .6;
}

.gf-file-download {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; border-radius: 50%;
    color: var(--gf-accent, #673ab7); transition: background .15s;
}
.gf-file-download:hover { background: #f3f0fa; }

.gf-file-preview {
    margin-top: 8px; margin-bottom: 6px;
}
.gf-file-preview__img {
    max-width: 200px; max-height: 150px;
    border-radius: 6px; border: 1px solid #e0e0e0;
    object-fit: cover; display: block;
}

.gf-file-live-preview {
    margin-top: 12px;
    display: grid;
    gap: 10px;
}

.gf-file-live-preview--hidden,
.gf-file-live-preview__image--hidden,
.gf-file-live-preview__pdf--hidden,
.gf-file-live-preview__media--hidden,
.gf-file-live-preview__video--hidden,
.gf-file-live-preview__audio--hidden,
.gf-file-live-preview__link--hidden {
    display: none;
}

.gf-file-live-preview__image,
.gf-file-live-preview__pdf,
.gf-file-live-preview__media {
    width: 100%;
}

.gf-file-live-preview__img {
    width: 50px;
    height: 50px;
    max-width: 50px;
    max-height: 50px;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
    background: #fff;
    object-fit: cover;
    display: block;
}

.gf-file-live-preview__pdf iframe,
.gf-file-live-preview__video {
    width: min(100%, 360px);
    max-height: 240px;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: #fff;
    display: block;
}

.gf-file-live-preview__pdf iframe {
    min-height: 240px;
}

.gf-file-live-preview__audio {
    width: min(100%, 360px);
}

.gf-file-live-preview__card {
    width: min(100%, 360px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 14px;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    background: #fafafb;
}

.gf-file-live-preview__meta {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.gf-file-live-preview__name,
.gf-file-live-preview__details {
    display: block;
    min-width: 0;
    overflow-wrap: anywhere;
}

.gf-file-live-preview__name {
    font-size: 13px;
    color: #202124;
}

.gf-file-live-preview__details {
    font-size: 12px;
    color: #5f6368;
}

.gf-file-live-preview__link {
    flex-shrink: 0;
    color: var(--gf-accent, #673ab7);
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
}

.gf-file-live-preview__link:hover {
    text-decoration: underline;
}

.gf-file-current a {
    color: var(--gf-accent, #673ab7);
    font-weight: 500;
    text-decoration: none;
}

.gf-file-current a:hover {
    text-decoration: underline;
}

/* ── Answer image upload (optional per-question) ───────── */
.gf-answer-img {
    margin-top: 10px; padding-top: 8px;
    border-top: 1px dashed #e0e0e0;
}
.gf-answer-img__pick {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 500; color: var(--gf-accent, #673ab7);
    cursor: pointer; padding: 4px 12px; border-radius: 6px;
    border: 1px solid #e0e0e0; transition: background .15s;
}
.gf-answer-img__pick:hover { background: #f3f0fa; }
.gf-answer-img__preview {
    margin-top: 8px; display: flex; align-items: center; gap: 10px;
}
.gf-answer-img__thumb {
    max-width: 180px; max-height: 120px;
    border-radius: 6px; border: 1px solid #e0e0e0;
    object-fit: cover;
}
.gf-answer-img__fallback {
    font-size: 12px;
    color: #5f6368;
    line-height: 1.45;
    max-width: 280px;
}
.gf-answer-img__view {
    font-size: 12px; color: var(--gf-accent, #673ab7);
    text-decoration: none; font-weight: 500;
}
.gf-answer-img__view:hover { text-decoration: underline; }

/* ── Form actions (submit / clear) ─────────────────────── */
.gf-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    padding: 0;
}

.gf-actions__left {
    display: flex;
    align-items: center;
    gap: 16px;
}

.gf-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 36px;
    padding: 0 24px;
    border: none;
    border-radius: 4px;
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, box-shadow .15s;
}

.gf-btn--primary {
    background: var(--gf-accent, #673ab7);
    color: #fff;
}

.gf-btn--primary:hover {
    background: #5e35b1;
    box-shadow: 0 1px 3px rgba(0,0,0,.3);
}

.gf-btn:disabled {
    opacity: .6;
    cursor: not-allowed;
    box-shadow: none;
}

.gf-btn--clear {
    background: transparent;
    color: var(--gf-accent, #673ab7);
    padding: 0 8px;
}

.gf-btn--clear:hover {
    background: rgba(103,58,183,.04);
}

/* ── Footer ────────────────────────────────────────────── */
.gf-footer {
    max-width: 900px;
    margin: 16px auto 0;
    padding: 0 16px;
    text-align: center;
}

.gf-footer__text {
    font-size: 12px;
    color: #70757a;
    margin: 0 0 8px;
}

.gf-footer__links {
    display: flex;
    justify-content: center;
    gap: 16px;
    font-size: 12px;
}

.gf-footer__links a {
    color: #70757a;
    text-decoration: none;
}

.gf-footer__links a:hover {
    text-decoration: underline;
}

/* ── Submitted / success page ──────────────────────────── */
.gf-success-card {
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    border-top: 10px solid var(--gf-accent, #673ab7);
    padding: 32px 24px;
    margin-bottom: 12px;
    text-align: center;
}

/* ── Animated checkmark icon ───────────────────────────── */
.gf-success-icon {
    width: 72px;
    height: 72px;
    margin: 0 auto 20px;
    color: var(--gf-accent, #673ab7);
}
.gf-success-icon__circle {
    width: 72px;
    height: 72px;
}
.gf-success-icon__ring {
    stroke-dasharray: 151;
    stroke-dashoffset: 151;
    animation: gf-ring .6s ease forwards;
}
.gf-success-icon__check {
    stroke-dasharray: 36;
    stroke-dashoffset: 36;
    animation: gf-check .4s ease .5s forwards;
}
@keyframes gf-ring {
    to { stroke-dashoffset: 0; }
}
@keyframes gf-check {
    to { stroke-dashoffset: 0; }
}

.gf-success-card__title {
    margin: 0;
    font-size: 28px;
    font-weight: 400;
    line-height: 36px;
    color: #202124;
}

.gf-success-card__msg {
    margin: 10px auto 0;
    font-size: 15px;
    line-height: 22px;
    color: #5f6368;
    max-width: 480px;
}

.gf-resubmission-summary {
    margin: 24px auto 0;
    max-width: 560px;
    padding: 16px 18px;
    border: 1px solid #d7e3fc;
    border-radius: 12px;
    background: #f8fbff;
    text-align: left;
}

.gf-resubmission-summary__eyebrow {
    margin: 0 0 8px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .04em;
    text-transform: uppercase;
    color: #1565c0;
}

.gf-resubmission-summary__text {
    margin: 0;
    font-size: 14px;
    line-height: 1.6;
    color: #35506b;
}

.gf-resubmission-summary__list {
    margin: 12px 0 0;
    padding-left: 18px;
    color: #35506b;
}

.gf-resubmission-summary__list li {
    margin-bottom: 8px;
    font-size: 13px;
    line-height: 1.5;
}

.gf-resubmission-summary__list span {
    color: #5f6368;
}

.gf-resubmission-summary__link {
    display: inline-flex;
    margin-top: 8px;
    color: #1565c0;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
}

.gf-resubmission-summary__link:hover {
    text-decoration: underline;
}

.gf-success-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 20px;
    justify-content: center;
}

.gf-btn--outline {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 20px;
    border-radius: 8px;
    border: 1px solid #d1c4e9;
    background: #fff;
    color: var(--gf-accent, #673ab7);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    transition: background .15s;
}
.gf-btn--outline:hover {
    background: #f3e5f5;
}

.gf-link {
    color: var(--gf-accent, #673ab7);
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
}

.gf-link:hover {
    text-decoration: underline;
}

/* ── Receipt card ──────────────────────────────────────── */
.gf-receipt-card {
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 12px;
}

.gf-receipt-card__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.gf-receipt-card__heading {
    margin: 0;
    font-size: 18px;
    font-weight: 500;
    color: #202124;
}

.gf-receipt-card__badge {
    font-size: 12px;
    font-weight: 500;
    background: #e8f5e9;
    color: #2e7d32;
    padding: 3px 10px;
    border-radius: 12px;
    white-space: nowrap;
}

.gf-receipt-section {
    margin-bottom: 16px;
}

.gf-receipt-section:last-child {
    margin-bottom: 0;
}

.gf-receipt-section__title {
    margin: 0 0 12px;
    font-size: 16px;
    font-weight: 400;
    color: #202124;
    padding-bottom: 8px;
    border-bottom: 1px solid #dadce0;
}

.gf-receipt-item {
    padding: 12px 0;
    border-bottom: 1px solid #f1f3f4;
}

.gf-receipt-item:last-child {
    border-bottom: none;
}

.gf-receipt-item__q {
    margin: 0;
    font-size: 12px;
    font-weight: 500;
    color: #5f6368;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.gf-receipt-item__a {
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
}

.gf-receipt-item__a li {
    font-size: 14px;
    line-height: 22px;
    color: #202124;
}

.gf-receipt-item__a a {
    color: var(--gf-accent, #673ab7);
    font-weight: 500;
    text-decoration: none;
}

.gf-receipt-item__a a:hover {
    text-decoration: underline;
}

/* ── Receipt file / image preview ──────────────────────── */
.gf-receipt-file {
    display: flex; align-items: center; gap: 8px;
    margin: 4px 0;
}
.gf-receipt-file__thumb {
    max-width: 160px; max-height: 100px;
    border-radius: 6px; border: 1px solid #e0e0e0;
    object-fit: cover; display: block;
}
.gf-receipt-file__icon {
    color: #80868b; flex-shrink: 0;
}
.gf-receipt-file__name {
    font-size: 12px; color: #5f6368; margin-top: 4px;
}
.gf-receipt-file__link {
    color: var(--gf-accent, #673ab7); font-weight: 500;
    text-decoration: none; font-size: 13px;
}
.gf-receipt-file__link:hover { text-decoration: underline; }

.gf-receipt-answer-img {
    display: flex; align-items: center; gap: 8px;
    margin-top: 6px; padding-top: 6px;
    border-top: 1px dashed #e8eaed;
}
.gf-receipt-answer-img__thumb {
    max-width: 140px; max-height: 90px;
    border-radius: 6px; border: 1px solid #e0e0e0;
    object-fit: cover;
}
.gf-receipt-answer-img__label {
    font-size: 11px; color: #80868b;
}

.gf-receipt-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 16px;
    margin: 16px 0 0;
    font-size: 12px;
    color: #70757a;
}

/* ── Status page ───────────────────────────────────────── */
.gf-status-card {
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    border-top: 10px solid var(--gf-accent, #673ab7);
    padding: 40px 24px;
    margin-bottom: 12px;
    text-align: center;
}

.gf-status-icon {
    width: 88px;
    height: 88px;
    margin: 0 auto 20px;
    background: linear-gradient(135deg, #f3e5f5 0%, #ede7f6 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gf-accent, #673ab7);
}

.gf-status-card__heading {
    margin: 0;
    font-size: 22px;
    font-weight: 500;
    line-height: 30px;
    color: #202124;
}

.gf-status-card__text {
    margin: 10px auto 0;
    font-size: 15px;
    line-height: 22px;
    color: #5f6368;
    max-width: 420px;
}

.gf-status-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
    justify-content: center;
}

/* ── Email field card ──────────────────────────────────── */
.gf-email-card {
    background: #fff;
    border: 1px solid #dadce0;
    border-radius: 8px;
    padding: 24px;
    margin-bottom: 12px;
}

.gf-email-card--error {
    border-color: #d93025;
    box-shadow: inset 4px 0 0 #d93025;
}

.gf-email-card__label {
    margin: 0 0 4px;
    font-size: 16px;
    font-weight: 400;
    line-height: 24px;
    color: #202124;
}

.gf-email-card__label .gf-asterisk {
    color: #d93025;
    margin-left: 4px;
}

.gf-email-card__hint {
    margin: 0 0 12px;
    font-size: 12px;
    color: #70757a;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 660px) {
    .gf-container {
        padding: 8px 8px 32px;
    }

    .gf-title-card__image {
        margin-left: -16px;
        margin-right: -16px;
    }

    .gf-title-card__image img {
        height: 160px;
    }

    .gf-title-card,
    .gf-section-card,
    .gf-question,
    .gf-alert-card,
    .gf-success-card,
    .gf-receipt-card,
    .gf-status-card,
    .gf-email-card {
        padding: 20px 16px;
        border-radius: 8px;
    }

    .gf-title-card {
        border-radius: 8px;
        border-top-width: 8px;
    }

    .gf-title-card__name {
        font-size: 24px;
        line-height: 32px;
    }

    .gf-section-card__title {
        font-size: 20px;
        line-height: 28px;
    }

    .gf-input--half {
        width: 100%;
    }

    .gf-scale {
        flex-wrap: wrap;
        gap: 4px;
    }

    .gf-choices--with-images {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .gf-scale__options {
        flex-wrap: wrap;
    }

    .gf-scale__option {
        min-width: 40px;
    }

    .gf-actions {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .gf-actions,
    .gf-actions__left {
        width: 100%;
    }

    .gf-actions__left {
        flex-wrap: wrap;
        gap: 10px;
    }

    .gf-btn,
    .gf-btn--outline,
    .gf-btn--primary {
        width: 100%;
        justify-content: center;
    }

    .gf-select {
        min-width: 160px;
        width: 100%;
    }

    .gf-select-wrap,
    .gf-date-input,
    .gf-time-input,
    .gf-datetime-input {
        width: 100%;
    }

    .gf-other-input {
        width: calc(100% - 32px);
    }

    .gf-file-current__info,
    .gf-answer-img__preview,
    .gf-receipt-card__header,
    .gf-footer__links {
        flex-wrap: wrap;
    }

    .gf-file-preview__img,
    .gf-answer-img__thumb {
        max-width: 100%;
    }

    .gf-grid {
        min-width: 560px;
    }

    .gf-question__image img {
        max-height: 220px;
    }

    .gf-success-card__title {
        font-size: 24px;
        line-height: 32px;
    }
}

@media (max-width: 400px) {
    .gf-container {
        padding: 6px 6px 28px;
    }

    .gf-title-card__image {
        margin-left: -12px;
        margin-right: -12px;
    }

    .gf-title-card__image img {
        height: 132px;
    }

    .gf-title-card,
    .gf-section-card,
    .gf-question,
    .gf-alert-card,
    .gf-success-card,
    .gf-receipt-card,
    .gf-status-card,
    .gf-email-card {
        padding: 16px 12px;
    }

    .gf-title-card__name {
        font-size: 20px;
        line-height: 28px;
    }

    .gf-choices--with-images {
        grid-template-columns: 1fr;
    }

    .gf-scale__option {
        min-width: 36px;
        padding: 6px 2px;
    }

    .gf-other-input {
        width: 100%;
        margin-left: 0;
    }
}

/* ═══════════════════════════════════════════════════════════
   Dark Mode
   ═══════════════════════════════════════════════════════════ */
.gf-page--dark {
    background: #1a1a2e;
    color: #e0e0e0;
}
.gf-page--dark .gf-title-card,
.gf-page--dark .gf-section-card,
.gf-page--dark .gf-email-card,
.gf-page--dark .gf-success-card,
.gf-page--dark .gf-receipt-card {
    background: #16213e;
    border-color: #0f3460;
    color: #e0e0e0;
}
.gf-page--dark .gf-status-card {
    background: #16213e;
    border-color: #0f3460;
    color: #e0e0e0;
}
.gf-page--dark .gf-status-icon {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
}
.gf-page--dark .gf-success-card__title,
.gf-page--dark .gf-status-card__heading,
.gf-page--dark .gf-receipt-card__heading {
    color: #f0f0f0;
}
.gf-page--dark .gf-success-card__msg,
.gf-page--dark .gf-status-card__text {
    color: #aaa;
}
.gf-page--dark .gf-receipt-card__badge {
    background: #0f3460;
    color: #81c784;
}
.gf-page--dark .gf-btn--outline {
    background: #16213e;
    border-color: #0f3460;
    color: var(--gf-accent, #bb86fc);
}
.gf-page--dark .gf-btn--outline:hover {
    background: #0f3460;
}
.gf-page--dark .gf-status-card {
    background: #16213e;
    border-color: #0f3460;
    color: #e0e0e0;
}
.gf-page--dark .gf-status-icon {
    background: linear-gradient(135deg, #1a1a2e 0%, #0f3460 100%);
}
.gf-page--dark .gf-success-card__title,
.gf-page--dark .gf-status-card__heading,
.gf-page--dark .gf-receipt-card__heading {
    color: #f0f0f0;
}
.gf-page--dark .gf-success-card__msg,
.gf-page--dark .gf-status-card__text {
    color: #aaa;
}
.gf-page--dark .gf-receipt-card__badge {
    background: #0f3460;
    color: #81c784;
}
.gf-page--dark .gf-btn--outline {
    background: #16213e;
    border-color: #0f3460;
    color: var(--gf-accent, #bb86fc);
}
.gf-page--dark .gf-btn--outline:hover {
    background: #0f3460;
}
.gf-page--dark .gf-question {
    background: #16213e;
    border-color: #0f3460;
}
.gf-page--dark .gf-input,
.gf-page--dark .gf-textarea,
.gf-page--dark .gf-select,
.gf-page--dark .gf-date-input,
.gf-page--dark .gf-time-input,
.gf-page--dark .gf-datetime-input {
    background: #1a1a2e;
    border-color: #0f3460;
    color: #e0e0e0;
}
.gf-page--dark .gf-footer {
    color: #888;
}
.gf-page--dark .gf-footer a {
    color: #aaa;
}
.gf-page--dark .gf-question__title {
    color: #f0f0f0;
}
.gf-page--dark .gf-question__desc {
    color: #aaa;
}
.gf-page--dark .gf-choice__label {
    color: #e0e0e0;
}
.gf-page--dark .gf-progress-bar {
    background: #0f3460;
}

/* ═══════════════════════════════════════════════════════════
   Grid / Matrix Questions
   ═══════════════════════════════════════════════════════════ */
.gf-grid-wrap {
    overflow-x: auto;
    margin: 8px 0;
}
.gf-grid {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.gf-grid th {
    padding: 10px 14px;
    text-align: center;
    font-weight: 500;
    color: #5f6368;
    border-bottom: 2px solid #e0e0e0;
    white-space: nowrap;
}
.gf-grid td {
    padding: 10px 14px;
    text-align: center;
    border-bottom: 1px solid #f0f0f0;
}
.gf-grid__row-label {
    text-align: left !important;
    font-weight: 400;
    color: #202124;
    min-width: 140px;
}
.gf-grid tbody tr:hover {
    background: #f8f9fa;
}
.gf-grid input[type="radio"],
.gf-grid input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
    accent-color: var(--gf-accent, #673ab7);
}
.gf-page--dark .gf-grid th {
    color: #aaa;
    border-color: #0f3460;
}
.gf-page--dark .gf-grid td {
    border-color: #1a1a2e;
}
.gf-page--dark .gf-grid__row-label {
    color: #e0e0e0;
}
.gf-page--dark .gf-grid tbody tr:hover {
    background: #0f3460;
}

/* ═══════════════════════════════════════════════════════════
   Question Image
   ═══════════════════════════════════════════════════════════ */
.gf-question__image img {
    max-width: 100%;
    max-height: 300px;
    border-radius: 8px;
    margin-bottom: 12px;
    object-fit: contain;
}

/* ═══════════════════════════════════════════════════════════
   Quiz Results
   ═══════════════════════════════════════════════════════════ */
.gf-quiz-result {
    text-align: center;
    padding: 24px 0 16px;
    border-bottom: 1px solid #e0e0e0;
    margin-bottom: 16px;
}
.gf-quiz-result__score {
    font-size: 48px;
    font-weight: 300;
    color: var(--gf-accent, #673ab7);
}
.gf-quiz-result__num {
    font-weight: 700;
}
.gf-quiz-result__total {
    color: #5f6368;
}
.gf-quiz-result__pct {
    font-size: 20px;
    color: #5f6368;
    margin-top: 4px;
}
.gf-quiz-details {
    margin-top: 20px;
    text-align: left;
}
.gf-quiz-detail {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 0;
    border-bottom: 1px solid #f0f0f0;
    flex-wrap: wrap;
}
.gf-quiz-detail__icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}
.gf-quiz-detail--correct .gf-quiz-detail__icon {
    background: #e8f5e9;
    color: #2e7d32;
}
.gf-quiz-detail--wrong .gf-quiz-detail__icon {
    background: #ffebee;
    color: #c62828;
}
.gf-quiz-detail__title {
    flex: 1;
    min-width: 120px;
    font-weight: 500;
}
.gf-quiz-detail__pts {
    color: #5f6368;
    font-size: 13px;
    white-space: nowrap;
}
.gf-quiz-detail__expl {
    width: 100%;
    margin: 6px 0 0 34px;
    font-size: 13px;
    color: #5f6368;
    line-height: 1.4;
}
/* Dark mode quiz */
.gf-page--dark .gf-quiz-result {
    border-color: #0f3460;
}
.gf-page--dark .gf-quiz-result__total {
    color: #aaa;
}
.gf-page--dark .gf-quiz-detail {
    border-color: #0f3460;
}
.gf-page--dark .gf-quiz-detail__pts,
.gf-page--dark .gf-quiz-detail__expl {
    color: #aaa;
}
