/* News Game Module — public submission form.
   Identity: light surface, warm orange/red N-JOY accent. */

.gpf-wrap {
    --gpf-orange: #ff6a00;
    --gpf-orange-dark: #e85d00;
    --gpf-orange-soft: rgba(255,106,0,0.10);
    --gpf-success: #2e7d32;
    --gpf-success-soft: #eaf6ec;
    --gpf-text: #2b2b2b;
    --gpf-muted: #8a8a8a;
    --gpf-line: #e3e3e3;
    --gpf-line-soft: #f1f1f1;

    display: flex;
    width: 100%;
    box-sizing: border-box;
    margin: 32px 0;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow:
        0 1px 2px rgba(0,0,0,0.04),
        0 10px 30px rgba(0,0,0,0.06);
    font-family: inherit;
    color: var(--gpf-text);
    max-width: 100%;
    position: relative;
    animation: gpf-form-in .55s cubic-bezier(.2,.9,.3,1.05) both;
}
@keyframes gpf-form-in {
    0%   { opacity: 0; transform: translateY(14px); }
    100% { opacity: 1; transform: translateY(0); }
}

.gpf-stripe {
    flex: 0 0 80px;
    position: relative;
    background:
        linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,0.20) 100%),
        repeating-linear-gradient(
            180deg,
            rgba(255,255,255,0.10) 0px,
            rgba(255,255,255,0.10) 2px,
            transparent 2px,
            transparent 5px
        ),
        linear-gradient(180deg, #ff8a18 0%, #ff5300 40%, #d31a1a 75%, #8a0e0e 100%);
}
.gpf-stripe::after {
    content: "";
    position: absolute;
    inset: 0 -1px 0 auto;
    width: 1px;
    background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,0.06), rgba(0,0,0,0));
}

.gpf-form-body {
    flex: 1;
    padding: 36px 42px 32px;
    min-width: 0;
}

.gpf-intro {
    margin: 0 0 22px;
    color: #4a4a4a;
    line-height: 1.55;
    font-size: 15px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--gpf-line-soft);
}

.gpf-row {
    display: flex;
    gap: 32px;
    margin-bottom: 22px;
    flex-wrap: wrap;
}
.gpf-col {
    flex: 1 1 240px;
    min-width: 0;
}
.gpf-col--full { flex-basis: 100%; }

/* Floating-label input */
.gpf-field {
    display: block;
    position: relative;
    padding-top: 16px;
}
.gpf-field input {
    width: 100%;
    box-sizing: border-box;
    border: 0;
    border-bottom: 1.5px solid var(--gpf-line);
    background: transparent;
    padding: 10px 0 9px;
    font-size: 16px;
    color: var(--gpf-text);
    outline: none;
    transition: border-color .2s ease;
    font-family: inherit;
}
.gpf-field input:focus {
    border-bottom-color: var(--gpf-orange);
}
.gpf-field::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--gpf-orange);
    transform: scaleX(0);
    transform-origin: left center;
    transition: transform .25s cubic-bezier(.2,.9,.3,1);
    pointer-events: none;
}
.gpf-field:focus-within::after { transform: scaleX(1); }
.gpf-field input::placeholder { color: transparent; }

.gpf-label {
    position: absolute;
    left: 0;
    top: 24px;
    color: var(--gpf-muted);
    font-size: 16px;
    pointer-events: none;
    transform-origin: 0 0;
    transition: transform .2s ease, color .2s ease;
    background: transparent;
}
.gpf-field input:focus + .gpf-label,
.gpf-field input:not(:placeholder-shown) + .gpf-label {
    transform: translateY(-22px) scale(0.78);
    color: var(--gpf-orange);
    font-weight: 500;
}

/* Choices */
.gpf-choices {
    margin: 8px 0 22px;
    padding: 18px 0 0;
    border-top: 1px solid var(--gpf-line-soft);
}
.gpf-choices-label {
    font-size: 13px;
    color: var(--gpf-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 12px;
}
.gpf-choice {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 14px;
    cursor: pointer;
    font-size: 15px;
    color: #333;
    border: 1.5px solid var(--gpf-line);
    border-radius: 8px;
    margin-bottom: 8px;
    transition: border-color .15s ease, background-color .15s ease;
    user-select: none;
}
.gpf-choice:hover { border-color: #c8c8c8; }
.gpf-choice input { position: absolute; opacity: 0; pointer-events: none; width: 0; height: 0; }
.gpf-choice::before {
    content: "";
    flex: 0 0 20px;
    width: 20px; height: 20px;
    border: 1.5px solid #c8c8c8;
    border-radius: 50%;
    background: #fff;
    transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
    position: relative;
}
.gpf-choice:has(input[type="checkbox"])::before { border-radius: 5px; }
.gpf-choice:hover::before { border-color: var(--gpf-orange); }
.gpf-choice:has(input:checked) {
    border-color: var(--gpf-orange);
    background: var(--gpf-orange-soft);
}
.gpf-choice:has(input:checked)::before {
    border-color: var(--gpf-orange);
    background: var(--gpf-orange);
    box-shadow: inset 0 0 0 4px #fff;
}
.gpf-choice:has(input[type="checkbox"]:checked)::before {
    background-color: var(--gpf-orange);
    box-shadow: none;
}
.gpf-choice:has(input[type="checkbox"]:checked)::after {
    content: "";
    position: absolute;
    margin-left: -14px;
    margin-top: 4px;
    width: 5px;
    height: 10px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Consent checkboxes */
.gpf-checks {
    margin: 26px 0 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.gpf-check {
    position: relative;
    display: flex;
    gap: 14px;
    align-items: flex-start;
    cursor: pointer;
    font-style: italic;
    color: #555;
    font-size: 14px;
    line-height: 1.55;
    user-select: none;
    margin: 0;
}
.gpf-check input[type=checkbox] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
    pointer-events: none;
}
.gpf-check-box {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border: 1.5px solid #c8c8c8;
    border-radius: 6px;
    background: #fff;
    position: relative;
    transition: background-color .15s ease, border-color .15s ease, transform .12s ease;
}
.gpf-check-box::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 6px;
    height: 11px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) scale(0);
    transition: transform .15s ease;
}
.gpf-check:hover .gpf-check-box { border-color: var(--gpf-orange); }
.gpf-check input[type=checkbox]:focus + .gpf-check-box {
    box-shadow: 0 0 0 3px rgba(255,106,0,0.22);
    border-color: var(--gpf-orange);
}
.gpf-check input[type=checkbox]:checked + .gpf-check-box {
    background: var(--gpf-orange);
    border-color: var(--gpf-orange);
}
.gpf-check input[type=checkbox]:checked + .gpf-check-box::after {
    transform: rotate(45deg) scale(1);
}
.gpf-check-text { flex: 1; min-width: 0; padding-top: 1px; }
.gpf-check a {
    color: var(--gpf-orange);
    text-decoration: none;
    font-weight: 600;
    font-style: normal;
    border-bottom: 1px solid currentColor;
    transition: color .15s ease, border-color .15s ease;
}
.gpf-check a:hover { color: var(--gpf-orange-dark); border-bottom-color: var(--gpf-orange-dark); }

.gpf-hp {
    position: absolute;
    left: -10000px; top: -10000px;
    width: 0; height: 0;
    overflow: hidden;
    visibility: hidden;
}

.gpf-error {
    color: #c0392b;
    font-size: 14px;
    min-height: 18px;
    margin: 6px 0 14px;
    font-weight: 500;
}

.gpf-submit-wrap {
    text-align: center;
    margin: 18px 0 4px;
}

.gpf-submit {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-width: 200px;
    background: var(--gpf-orange);
    color: #fff;
    border: 0;
    padding: 15px 52px;
    font-size: 15px;
    letter-spacing: 1.6px;
    font-weight: 700;
    cursor: pointer;
    border-radius: 999px;
    box-shadow: 0 4px 14px rgba(255,106,0,0.30);
    transition: background .2s ease, transform .12s ease, box-shadow .2s ease;
    font-family: inherit;
    overflow: hidden;
}
.gpf-submit:hover {
    background: var(--gpf-orange-dark);
    box-shadow: 0 8px 22px rgba(255,106,0,0.36);
    transform: translateY(-1px);
}
.gpf-submit:active {
    transform: translateY(1px);
    box-shadow: 0 3px 10px rgba(255,106,0,0.28);
}
.gpf-submit[disabled] { cursor: progress; }
.gpf-submit.is-loading { pointer-events: none; }
.gpf-submit.is-done {
    background: var(--gpf-success);
    box-shadow: 0 6px 18px rgba(46,125,50,0.32);
    pointer-events: none;
}

.gpf-submit-spinner {
    width: 18px; height: 18px;
    border: 2.5px solid rgba(255,255,255,0.35);
    border-top-color: #fff;
    border-radius: 50%;
    display: inline-block;
    animation: gpf-spin .7s linear infinite;
    flex: 0 0 auto;
}
@keyframes gpf-spin { to { transform: rotate(360deg); } }

.gpf-submit-check {
    width: 18px; height: 18px;
    position: relative;
    display: inline-block;
    flex: 0 0 auto;
}
.gpf-submit-check::after {
    content: "";
    position: absolute;
    left: 5px; top: 1px;
    width: 6px; height: 12px;
    border: solid #fff;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg) scale(0);
    transform-origin: center;
    animation: gpf-check-pop .35s cubic-bezier(.2,.9,.3,1.4) forwards;
}
@keyframes gpf-check-pop {
    0%   { transform: rotate(45deg) scale(0); }
    60%  { transform: rotate(45deg) scale(1.25); }
    100% { transform: rotate(45deg) scale(1); }
}

.gpf-form--leaving {
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity .3s ease, transform .3s ease;
    pointer-events: none;
}

/* Thank-you success state — proper SVG checkmark, draws in via stroke-dashoffset. */
.gpf-success {
    padding: 36px 28px 32px;
    background: linear-gradient(180deg, var(--gpf-success-soft) 0%, #ffffff 70%);
    color: #1f5d24;
    text-align: center;
    border-radius: 10px;
    border: 1px solid #d6e8d9;
    font-size: 17px;
    line-height: 1.5;
    opacity: 0;
    transform: translateY(10px) scale(.98);
    transition: opacity .45s ease, transform .45s cubic-bezier(.2,.9,.3,1.2);
}
.gpf-success--in { opacity: 1; transform: translateY(0) scale(1); }

.gpf-success-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 18px;
    display: block;
    filter: drop-shadow(0 8px 18px rgba(46,125,50,0.30));
}
.gpf-success-circle {
    fill: var(--gpf-success);
    stroke: var(--gpf-success);
    stroke-width: 0;
    transform-origin: 40px 40px;
    animation: gpf-success-bubble .55s cubic-bezier(.2,.9,.3,1.4) .1s both;
}
.gpf-success-tick {
    fill: none;
    stroke: #ffffff;
    stroke-width: 6;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 70;
    stroke-dashoffset: 70;
    animation: gpf-success-draw .5s cubic-bezier(.4,.0,.2,1) .5s forwards;
}
@keyframes gpf-success-bubble {
    0%   { transform: scale(0); }
    70%  { transform: scale(1.12); }
    100% { transform: scale(1); }
}
@keyframes gpf-success-draw {
    to { stroke-dashoffset: 0; }
}

.gpf-success-text {
    font-size: 18px;
    font-weight: 600;
    color: #1f5d24;
    margin-top: 4px;
}

/* Responsive */
@media (max-width: 760px) {
    .gpf-wrap { margin: 24px 0; border-radius: 8px; }
    .gpf-stripe { display: none; }
    .gpf-form-body { padding: 26px 20px 22px; }
    .gpf-row { gap: 14px; margin-bottom: 16px; }
    .gpf-col { flex-basis: 100%; }
    .gpf-submit { width: 100%; padding: 14px 28px; }
    .gpf-success { padding: 28px 18px 22px; }
}
