/* NovelKita: fitur saran tema (file terpisah, memakai token dari style.css) */

.saran {
    padding-block: clamp(1rem, 3vw, 2rem) clamp(3.5rem, 8vw, 6rem);
}

.saran-grid {
    display: grid;
    grid-template-columns: 1fr 1.15fr;
    gap: clamp(2rem, 6vw, 5rem);
    align-items: start;
    position: relative;
    padding-top: clamp(2rem, 5vw, 3.5rem);
}

.saran-grid::before {
    content: "";
    position: absolute;
    top: 0;
    left: var(--pad);
    right: var(--pad);
    height: 1px;
    background: var(--line);
}

.saran-intro p {
    margin-top: .9rem;
    max-width: 28rem;
    color: var(--ink-soft);
    line-height: 1.65;
}

.saran-intro .chips-label {
    margin-top: 1.75rem;
    font-weight: 600;
    color: var(--ink);
}

.chips {
    display: flex;
    flex-wrap: wrap;
    gap: .55rem;
    margin-top: .8rem;
}

.chip {
    padding: .42rem .95rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-size: .98rem;
    color: var(--ink);
    background: transparent;
    transition: background-color .25s var(--ease), color .25s var(--ease),
        border-color .25s var(--ease), transform .35s var(--spring);
}

.chip:hover {
    border-color: var(--green);
    transform: translateY(-2px);
}

.chip:active {
    transform: scale(.95);
}

.chip.pop {
    background: var(--green);
    border-color: var(--green);
    color: var(--paper);
}

/* ───────── Form ───────── */
.saran-form {
    display: grid;
    gap: 1.6rem;
    transition: opacity .35s var(--ease), transform .35s var(--ease);
}

.saran-wrap.sent .saran-form {
    opacity: 0;
    transform: translateY(-8px);
    pointer-events: none;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

.fld {
    position: relative;
    display: block;
}

.fld>span,
.jenis legend {
    display: block;
    margin-bottom: .2rem;
    font-size: .95rem;
    font-weight: 600;
    color: var(--ink);
}

.fld small {
    font-weight: 400;
    color: var(--ink-soft);
}

.fld input,
.fld textarea {
    width: 100%;
    font: inherit;
    color: var(--ink);
    background: transparent;
    border: 0;
    border-bottom: 2px solid var(--line);
    border-radius: 0;
    padding: .6rem 0;
    resize: vertical;
    transition: border-color .25s var(--ease);
}

.fld textarea {
    min-height: 6.5rem;
    line-height: 1.55;
}

.fld input::placeholder,
.fld textarea::placeholder {
    color: #9a9cb3;
}

.fld input:focus,
.fld textarea:focus {
    outline: none;
}

.fld::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    height: 2px;
    background: var(--green);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform .45s var(--ease);
}

.fld:focus-within::after {
    transform: scaleX(1);
}

.jenis {
    border: 0;
    min-width: 0;
}

.jenis .opts {
    display: flex;
    gap: .6rem;
    margin-top: .5rem;
}

.jenis label {
    position: relative;
    cursor: pointer;
}

.jenis input {
    position: absolute;
    opacity: 0;
    inset: 0;
    cursor: pointer;
}

.jenis label span {
    display: inline-block;
    padding: .5rem 1.2rem;
    border: 1px solid var(--line);
    border-radius: 999px;
    font-weight: 500;
    transition: background-color .3s var(--ease), color .3s var(--ease),
        border-color .3s var(--ease), transform .35s var(--spring);
}

.jenis label:hover span {
    border-color: var(--ink);
}

.jenis input:checked+span {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper);
    transform: scale(1.03);
}

.jenis input:focus-visible+span {
    outline: 2px solid var(--fox);
    outline-offset: 3px;
}

.saran-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .75rem 1.25rem;
}

.saran-actions .btn[disabled] {
    opacity: .7;
    cursor: progress;
}

.saran-err {
    min-height: 1.3em;
    font-size: .95rem;
    color: #a8381a;
}

/* ───────── Pesan berhasil ───────── */
.saran-wrap {
    position: relative;
}

.saran-ok {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: .75rem;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: opacity .5s var(--ease) .2s, transform .5s var(--ease) .2s, visibility 0s linear .7s;
}

.saran-wrap.sent .saran-ok {
    opacity: 1;
    visibility: visible;
    transform: none;
    transition-delay: .2s, .2s, 0s;
}

.saran-ok .tick {
    width: 3.2rem;
    height: 3.2rem;
}

.saran-ok .tick circle {
    fill: none;
    stroke: var(--green);
    stroke-width: 2.5;
    stroke-dasharray: 126;
    stroke-dashoffset: 126;
}

.saran-ok .tick path {
    fill: none;
    stroke: var(--green);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 30;
    stroke-dashoffset: 30;
}

.saran-wrap.sent .tick circle {
    animation: draw .7s var(--ease) .3s forwards;
}

.saran-wrap.sent .tick path {
    animation: draw .45s var(--ease) .85s forwards;
}

@keyframes draw {
    to {
        stroke-dashoffset: 0;
    }
}

.saran-ok h3 {
    font-family: var(--serif);
    font-size: clamp(1.3rem, 3.5vw, 1.7rem);
    line-height: 1.25;
}

.saran-ok p {
    color: var(--ink-soft);
    max-width: 26rem;
}

.saran-ok .again {
    margin-top: .4rem;
    padding: 0;
    font-weight: 600;
    color: var(--green);
    background-image: linear-gradient(currentColor, currentColor);
    background-repeat: no-repeat;
    background-size: 100% 2px;
    background-position: 0 100%;
    transition: background-size .35s var(--ease);
}

.saran-ok .again:hover {
    background-size: 0 2px;
}

/* ───────── Responsive ───────── */
@media (max-width: 800px) {
    .saran-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .saran-wrap {
        min-height: 22rem;
    }
}

@media (max-width: 640px) {
    .saran-actions .btn {
        width: 100%;
        justify-content: center;
    }
}
