/* ================= CEK ONGKIR ================= */

/* Section background lebih lembut dan rapi */
.cek-ongkir-section {
    background: radial-gradient(
            circle at 0% 0%,
            rgba(0, 229, 255, 0.2),
            transparent 55%
        ),
        radial-gradient(
            circle at 100% 100%,
            rgba(0, 120, 255, 0.18),
            transparent 55%
        ),
        linear-gradient(135deg, #f6fcff 0%, #ffffff 62%);
    padding: 68px 16px 86px;
}

/* Title + subtitle */
.cek-ongkir-section .section-title {
    text-align: center;
    letter-spacing: 0.06em;
    font-weight: 800;
}

.cek-ongkir-section .section-subtitle {
    text-align: center;
    max-width: 720px;
    margin: 10px auto 0;
    font-size: 14.5px;
    color: rgba(20, 55, 90, 0.78);
    line-height: 1.7;
}

/* Wrapper card */
.cek-ongkir-card {
    max-width: 920px;
    margin: 28px auto 0;
    position: relative;
}

/* Border gradient (lebih halus) */
.cek-ongkir-card::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 24px;
    padding: 1px;
    background: linear-gradient(
        135deg,
        rgba(0, 229, 255, 0.55),
        rgba(0, 120, 255, 0.4),
        rgba(0, 229, 255, 0.62)
    );
    -webkit-mask: linear-gradient(#000 0 0) content-box,
        linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
    opacity: 0.9;
    z-index: 0;
}

/* Card glass premium */
.glass-ongkir {
    position: relative;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.96),
        rgba(248, 252, 255, 0.9)
    );
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-radius: 24px;
    padding: 26px 28px 22px;
    border: 1px solid rgba(255, 255, 255, 0.92);
    box-shadow: 0 26px 58px rgba(11, 46, 86, 0.16),
        0 0 0 1px rgba(0, 0, 0, 0.02);
    transition: transform 0.25s ease, box-shadow 0.25s ease,
        background 0.25s ease;
    position: relative;
    z-index: 1;
}

.glass-ongkir:hover {
    transform: translateY(-4px);
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.98),
        rgba(242, 250, 255, 0.95)
    );
    box-shadow: 0 32px 70px rgba(11, 46, 86, 0.22),
        0 0 0 1px rgba(0, 0, 0, 0.03);
}

/* Grid */
.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px 16px;
    margin-bottom: 16px;
    align-items: end;
}

.form-group label {
    font-size: 12px;
    display: block;
    margin-bottom: 6px;
    color: rgba(18, 52, 86, 0.82);
    letter-spacing: 0.2px;
    font-weight: 700;
}

/* ===== Inputs ===== */
.input-select,
.input-number {
    width: 100%;
    padding: 11px 12px;
    border-radius: 13px;
    border: 1px solid rgba(191, 217, 232, 0.95);
    font-size: 14px;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.98),
        rgba(244, 250, 255, 0.98)
    );
    color: #132a42;
    transition: border-color 0.25s ease, box-shadow 0.25s ease,
        transform 0.15s ease;
    appearance: none;
}

/* Placeholder */
.input-select::placeholder,
.input-number::placeholder {
    color: #9aa8b5;
}

/* Hover */
.input-select:hover,
.input-number:hover {
    border-color: rgba(0, 120, 255, 0.55);
    box-shadow: 0 0 0 4px rgba(0, 120, 255, 0.08);
}

/* Focus */
.input-select:focus,
.input-number:focus {
    border-color: rgba(0, 120, 255, 0.75);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(0, 229, 255, 0.18);
    outline: none;
    transform: translateY(-1px);
}

/* Select arrow (lebih profesional) */
.form-group select.input-select {
    padding-right: 42px;
    background-image: linear-gradient(
            45deg,
            transparent 50%,
            rgba(19, 42, 66, 0.6) 50%
        ),
        linear-gradient(135deg, rgba(19, 42, 66, 0.6) 50%, transparent 50%),
        linear-gradient(to right, rgba(0, 0, 0, 0.08), rgba(0, 0, 0, 0));
    background-position: calc(100% - 18px) 52%, calc(100% - 12px) 52%,
        calc(100% - 38px) 50%;
    background-size: 6px 6px, 6px 6px, 1px 18px;
    background-repeat: no-repeat;
}

/* ===== CTA Button ===== */
.btn-cek-tarif {
    margin-top: 6px;
    padding: 12px 24px;
    border-radius: 999px;
    border: none;

    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    color: #fff;

    font-size: 14px;
    font-weight: 800;
    letter-spacing: 0.02em;

    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    box-shadow: 0 14px 34px rgba(255, 27, 28, 0.3);
    transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn-cek-tarif:hover {
    filter: brightness(1.04);
    transform: translateY(-2px);
    box-shadow: 0 18px 42px rgba(255, 27, 28, 0.42);
}

.btn-cek-tarif:active {
    transform: translateY(0);
    box-shadow: 0 10px 26px rgba(255, 27, 28, 0.3);
}

/* Hasil fallback */
.cek-ongkir-result {
    margin-top: 14px;
}

/* Result box elegan */
.glass-result {
    padding: 14px 16px;
    background: linear-gradient(
        135deg,
        rgba(231, 244, 255, 0.98),
        rgba(255, 255, 255, 0.98)
    );
    border-radius: 14px;
    border: 1px solid rgba(136, 196, 255, 0.65);
    font-size: 14px;
    color: rgba(10, 40, 75, 0.92);
    box-shadow: 0 12px 28px rgba(8, 39, 81, 0.1);
    line-height: 1.7;
}

.glass-result b {
    color: var(--accent-dark);
}

/* ================= MODAL POPUP CEK ONGKIR ================= */

.modal-ongkir {
    position: fixed;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 999;
    padding: 18px;
}

.modal-ongkir.show {
    display: flex;
}

/* Overlay */
.modal-ongkir-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(
            circle at 20% 0%,
            rgba(0, 229, 255, 0.25),
            transparent 55%
        ),
        rgba(2, 16, 42, 0.62);
    animation: ongkirFade 0.18s ease both;
}

/* Modal content */
.modal-ongkir-content {
    position: relative;
    z-index: 1;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.98),
        rgba(240, 248, 255, 0.98)
    );
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    padding: 22px 24px 20px;
    border-radius: 22px;
    box-shadow: 0 22px 62px rgba(4, 28, 64, 0.55);
    max-width: 420px;
    width: 100%;
    font-size: 14px;
    color: #142a42;
    border: 1px solid rgba(0, 0, 0, 0.92);
    animation: ongkirPop 0.2s ease both;
}

.modal-ongkir-content h3 {
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 900;
    color: var(--accent-dark);
    letter-spacing: 0.02em;
}

.modal-ongkir-content p {
    margin: 6px 0;
    line-height: 1.6;
}

.modal-ongkir-content b {
    color: rgba(10, 35, 60, 0.95);
}

/* Close */
.modal-close {
    position: absolute;
    top: 10px;
    right: 12px;
    border: none;
    background: rgba(0, 0, 0, 0.04);
    width: 34px;
    height: 34px;
    border-radius: 999px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    color: #61738a;

    transition: transform 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.modal-close:hover {
    background: rgba(0, 0, 0, 0.08);
    color: #0f2236;
    transform: scale(1.06);
}

/* Animations */
@keyframes ongkirFade {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes ongkirPop {
    from {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Responsif */
@media (max-width: 900px) {
    .glass-ongkir {
        padding: 22px 20px 20px;
    }
}

@media (max-width: 600px) {
    .cek-ongkir-section {
        padding: 54px 14px 70px;
    }

    .glass-ongkir {
        padding: 20px 16px 18px;
    }

    .btn-cek-tarif {
        width: 100%;
    }

    .modal-ongkir-content {
        border-radius: 18px;
        padding: 20px 18px 18px;
    }
}
/* FORCE agar teks tombol selalu kelihatan */
.btn-cek-tarif {
    color: #1962ff !important;
    opacity: 1 !important;
    visibility: visible !important;
    font-size: 14px !important;
    line-height: 1 !important;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.18);
}

.btn-cek-tarif i {
    color: #fff !important;
}
