/* ============================================================
   CLAIM SOUVENIR - FRONTEND STYLES (Modern Clean)
   V2 design, V1 markup compatibility
   ============================================================ */

* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    /* Surface */
    --bg:           rgb(43,0,0);
    --bg-soft:      #ffffff;
    --bg-muted:     #f1f3f6;
    --surface:      rgb(136, 5, 5);
    --surface-2:    #fafbfc;
    --linear-header: linear-gradient(to bottom, rgb(247,17,17), rgb(136,5,5));
    --linear-orange: linear-gradient(to bottom, #fdef02 0%, #ffae00 100%);

    /* Brand accents */
    --red:          #ff0000;
    --red-soft:     #fde8eb;
    --red-dark:     #b8152e;
    --orange:       #ffe400;
    --orange-soft:  #fff1e6;
    --orange-dark:  #c2570c;

    /* Allow override from settings.primary_color */
    --accent-primary: var(--red);

    /* Text */
    --text:         #f1efef;
    --text-soft:    #a7a7a8;
    --text-muted:   #d8dadd;

    /* Borders & shadow */
    --border:       rgb(247,17,17);
    --border-strong:#d4d8e0;
    --ring:         rgba(225, 29, 58, 0.12);

    --shadow-sm:    0 1px 2px rgba(15, 23, 42, 0.04),
                    0 1px 3px rgba(15, 23, 42, 0.06);
    --shadow-md:    0 4px 6px -1px rgba(15, 23, 42, 0.06),
                    0 2px 4px -2px rgba(15, 23, 42, 0.06);
    --shadow-lg:    0 10px 25px -5px rgba(15, 23, 42, 0.08),
                    0 8px 10px -6px rgba(15, 23, 42, 0.05);
    --shadow-cs:    inset 0 0 4px 2px #60010180, inset 0 1px 0 0 #ff00003d, inset 0 0 0 2px #ff000054, 3px 3px 2px 1px rgb(0 0 0 / 0%);
    --shadow-orange: inset 0 0 5px 3px #f18700ad, inset 0 2px 0 0 #fff, inset 0 0 0 2px #64006729, 3px 3px 3px 1px rgba(0, 0, 0, .2);

    /* State */
    --success:      #16a34a;
    --success-soft: #dcfce7;
    --danger:       #dc2626;
    --danger-soft:  #fee2e2;
    --warning:      #d97706;
    --warning-soft: #fef3c7;
    --info:         #0284c7;
    --info-soft:    #e0f2fe;

    --radius-sm:    6px;
    --radius:       10px;
    --radius-lg:    16px;

    --font-display: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-body:    'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

html { scroll-behavior: smooth; }

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 15px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    min-height: 100vh;
}

body.has-bg {
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
}

img { max-width: 100%; display: block; }
a { color: var(--red); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--red-dark); }

.container {
    max-width: 1100px;
    margin: 0 auto;
    padding: 0 24px;
}

/* ===== Header strip (logo top) ===== */
.header-strip {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--linear-header);
    border-bottom: 2px solid var(--border);
    border-radius: 0 0 100px 100px;
    padding: 14px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-cs);
}
.header-strip .container {
    display: flex;
    align-items: center;
    gap: 12px;
}
.header-strip-logo img {
    max-height: 40px;
    width: auto;
}
.header-strip-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 18px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
}
.header-strip-brand .logo-mark {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: linear-gradient(135deg, var(--red), var(--orange));
    display: grid; place-items: center;
    color: #fff; font-size: 16px; font-weight: 800;
}

/* ===== Section flow ===== */
/* Hero: selalu tampil */
.page-section { padding: 32px 0 48px; }
.section-visible { display: block; }

/* Collapsible panels (form claim & form track) */
.section-collapsible {
    /* Default: hidden via [hidden] attribute */
    overflow: hidden;
    /* Saat ditampilkan, transisi dari opacity 0 → 1 + slide */
    opacity: 0;
    max-height: 0;
    padding-top: 0;
    padding-bottom: 0;
    transition: opacity .35s ease, max-height .4s cubic-bezier(.4,0,.2,1),
                padding-top .35s ease, padding-bottom .35s ease;
}
.section-collapsible[hidden] { display: none; }
.section-collapsible.is-open {
    opacity: 1;
    max-height: 4000px; /* cukup besar untuk seluruh form */
    padding-top: 8px;
    padding-bottom: 48px;
}

/* CTA chevron rotation when active */
.btn-cta .cta-chevron {
    width: 16px; height: 16px;
    transition: transform .2s ease;
    opacity: .85;
}
.btn-cta.is-active .cta-chevron {
    transform: rotate(180deg);
}
.btn-cta.is-active {
    box-shadow: inset 0 2px 6px rgba(0,0,0,0.15);
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

.premium-container {
    max-width: 880px;
    margin: 0 auto;
    background: var(--bg);
    padding: 25px 30px;
    border-radius: 20px;
    border: 2px solid var(--red);
}

/* ===== Hero (landing) ===== */
.landing-banner {
    border-radius: var(--radius-lg);
    overflow: hidden;
    margin: 0 auto 28px;
    box-shadow: var(--shadow-md);
    background: linear-gradient(135deg, var(--red), var(--orange));
    aspect-ratio: 7/4;       /* 840 × 480 */
    max-width: 840px;
    width: 100%;
    transition: all 0.3s ease;
}
.landing-banner:hover {
    transform: translateY(-4px);
}
.landing-banner img {
    width: 100%; height: 100%;
    object-fit: cover;
}

.landing-content {
    text-align: center;
    margin-bottom: 32px;
}
.landing-content h1 {
    font-family: var(--font-display);
    font-size: 36px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 10px;
}
.landing-content .subtitle {
    color: var(--text-muted);
    font-size: 16px;
    max-width: 560px;
    margin: 0 auto 28px;
}

/* CTA buttons */
.landing-cta {
    display: flex;
    gap: 14px;
    justify-content: center;
    flex-wrap: wrap;
}
.btn-cta {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
    text-decoration: none;
    color: #fff;
}
.btn-cta:nth-child(1) {
    background: var(--linear-header);
    box-shadow: var(--shadow-cs);
    border-radius: 999px;
    border-right: 6px solid var(--red);
    border-left: 6px solid var(--red);
    border-top: 1px solid var(--red);
    border-bottom: 1px solid var(--red);
}
.btn-cta:nth-child(1):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(225, 29, 58, 0.25);
    color: #fff;
}
.btn-cta:nth-child(2) {
    background: var(--linear-orange);
    box-shadow: var(--shadow-orange);
    border-radius: 999px;
    border-right: 6px solid var(--orange);
    border-left: 6px solid var(--orange);
    border-top: 1px solid var(--orange);
    border-bottom: 1px solid var(--orange);
    color: #000;
}
.btn-cta:nth-child(2):hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
    color: #000;
}
.btn-cta svg {
    width: 18px; height: 18px;
    stroke-width: 2;
}

/* Terms box */
.terms-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px 24px;
    margin-top: 32px;
    box-shadow: var(--shadow-sm);
}
.terms-title {
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 700;
    color: var(--red);
    letter-spacing: 0.04em;
    margin-bottom: 12px;
}
.terms-content ul {
    list-style: none;
    padding: 0;
    margin: 0;
}
.terms-content li {
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.6;
    padding: 6px 0 6px 22px;
    position: relative;
    border-bottom: 1px dashed var(--border);
}
.terms-content li:hover {
    color: var(--text-soft);
}
.terms-content li:last-child { border-bottom: none; }
.terms-content li::before {
    content: "✓";
    position: absolute;
    left: 0;
    top: 6px;
    color: var(--orange);
    font-weight: 700;
}

/* ===== Back button ===== */
.back-to-home {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: var(--linear-header);
    border: 1px solid var(--red);
    border-radius: 999px;
    padding: 7px 14px;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    margin-bottom: 18px;
    transition: all .15s;
    float: right;
    box-shadow: var(--shadow-cs);
}
.back-to-home:hover {
    background: var(--danger-soft);
    color: var(--danger);
    border-color: var(--danger);
}
.back-to-home svg {
    width: 14px; height: 14px;
    stroke-width: 2.5;
}
.back-to-home + .form-section-title { clear: both; padding-top: 8px; }

/* ===== Form section title ===== */
.form-section-title {
    text-align: center;
    margin-bottom: 28px;
}
.form-section-title h2 {
    font-family: var(--font-display);
    font-size: 28px;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 4px;
}
.form-section-title h2 .accent {
    background: linear-gradient(90deg, var(--red), var(--orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.form-section-title p {
    color: var(--text-muted);
    font-size: 15px;
}

/* ===== Form ===== */
.claim-form,
.track-form {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    box-shadow: var(--shadow-md);
}
.track-form { max-width: 520px; margin: 0 auto; }

.form-section {
    padding: 0 0 22px;
    margin-bottom: 22px;
    border-bottom: 1px solid var(--border);
}
.form-section:last-of-type {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}
.form-section h2 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    margin-bottom: 16px;
    letter-spacing: -0.01em;
}
.section-icon {
    width: 32px; height: 32px;
    border-radius: 8px;
    background: var(--orange-soft);
    color: var(--orange-dark);
    display: grid; place-items: center;
}
.section-icon svg {
    width: 16px; height: 16px;
    stroke-width: 2;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}
.form-group { margin-bottom: 16px; }
.form-group:last-child { margin-bottom: 0; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.form-group label .required { color: var(--red); }
.form-group input[type="text"],
.form-group input[type="tel"],
.form-group input[type="number"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 11px 14px;
    background: var(--surface);
    border: 1px solid var(--red);
    border-radius: var(--radius);
    color: var(--text);
    font-family: var(--font-body);
    font-size: 14px;
    transition: border-color .15s, box-shadow .15s;
}
.form-group input::placeholder,
.form-group textarea::placeholder { color: var(--text-muted); }
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--border-strong);
    box-shadow: var(--shadow-cs);
}
.form-group select:disabled {
    color: var(--text-muted);
    cursor: not-allowed;
}
.form-group textarea {
    min-height: 88px;
    resize: vertical;
    line-height: 1.5;
}
.form-group select {
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'><path fill='%238b93a3' d='M6 8L2 4h8z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}
.help-text {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Phone input with prefix */
.phone-wrapper {
    display: flex;
    align-items: stretch;
    overflow: hidden;
    transition: border-color .15s, box-shadow .15s;
}
.phone-wrapper:focus-within {
    border-color: var(--red);
    box-shadow: 0 0 0 3px var(--ring);
}
.phone-prefix {
    background: var(--linear-header);
    color: var(--text-muted);
    font-weight: 600;
    font-size: 14px;
    padding: 11px 14px;
    border: 1px solid var(--red);
    display: flex;
    align-items: center;
    border-radius: 10px 0 0 10px;
}
.phone-wrapper input {
    flex: 1;
    border-radius: 0 10px 10px 0 !important;
}

/* ===== Souvenir grid (radio cards) ===== */
.souvenir-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 240px));
    gap: 14px;
    margin-bottom: 16px;
    justify-content: center;
}
.souvenir-card {
    cursor: pointer;
    display: block;
}
.souvenir-card input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.souvenir-card-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 20px 16px;
    text-align: center;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.souvenir-card:hover .souvenir-card-content {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--orange);
}
.souvenir-card input[type="radio"]:checked ~ .souvenir-card-content {
    border-color: var(--red);
    box-shadow: var(--shadow-cs);
    background: var(--linear-header);
}
.souvenir-icon {
    width: 130px;
    height: 130px;
    margin: 0 auto 12px;
    display: grid;
    place-items: center;
}
.souvenir-icon img {
    width: 100%;
    height: 100%;
    border-radius: 10%;
    object-fit: contain;
}
.souvenir-icon:not(.has-image)::before {
    content: "🎁";
    font-size: 48px;
}
.souvenir-name {
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
    margin-top: 6px;
}
.souvenir-desc {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
    line-height: 1.4;
}

/* ===== Form actions ===== */
.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 22px;
    border-top: 1px solid var(--border);
    margin-top: 22px;
}
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 22px;
    border: 1px solid transparent;
    border-radius: var(--radius);
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s ease;
    text-decoration: none;
    line-height: 1;
}
.btn svg {
    width: 16px; height: 16px;
    stroke-width: 2;
}
.btn-primary {
    background: var(--linear-header);
    box-shadow: var(--shadow-cs);
    border: 1px solid var(--red);
    color: #fff;
}
.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(225, 29, 58, 0.25);
    color: #fff;
}
.btn-secondary {
    background: var(--linear-orange);
    box-shadow: var(--shadow-orange);
    color: #000;
    border-color: var(--orange);
}
.btn-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(249, 115, 22, 0.25);
    color: #000;
}
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }

/* ===== Alert ===== */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 16px;
    border-radius: var(--radius);
    border-left: 4px solid var(--text-muted);
    background: var(--surface);
    border: 1px solid var(--border);
    color: var(--text);
    font-size: 14px;
    margin-bottom: 18px;
    box-shadow: var(--shadow-sm);
}
.alert-success { border-left-color: var(--success); background: var(--success-soft); color: var(--success); border-color: transparent; }
.alert-error   { border-left-color: var(--danger); background: var(--danger-soft);   color: var(--danger);  border-color: transparent; }
.alert-warning { border-left-color: var(--warning); background: var(--warning-soft); color: var(--warning); border-color: transparent; }

/* ===== Track result ===== */
.track-result { margin-top: 24px; }
.track-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 22px;
    margin-bottom: 16px;
    box-shadow: var(--shadow-sm);
}
.track-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 16px;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--border);
    flex-wrap: wrap;
}
.track-card-title {
    font-family: var(--font-display);
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
}
.track-card-id {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}
.track-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
}
.track-status svg { width: 14px; height: 14px; stroke-width: 2; }
.track-status.status-pending   { background: var(--warning-soft); color: var(--warning); }
.track-status.status-approved  { background: var(--info-soft);    color: var(--info); }
.track-status.status-shipped   { background: var(--success-soft); color: var(--success); }
.track-status.status-delivered { background: #d1fae5;             color: #065f46; }
.track-status.status-rejected  { background: var(--danger-soft);  color: var(--danger); }

.track-info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px 22px;
}
.track-info-item.full { grid-column: 1 / -1; }
.track-info-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-weight: 600;
    margin-bottom: 2px;
}
.track-info-value {
    font-size: 14px;
    color: var(--text);
}

.tracking-box {
    margin-top: 16px;
    padding: 14px 18px;
    background: var(--orange-soft);
    border: 1px solid rgba(249,115,22,0.2);
    border-radius: var(--radius);
}
.tracking-box-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--orange-dark);
    margin-bottom: 4px;
}
.tracking-box-value {
    font-family: 'Courier New', monospace;
    font-size: 16px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.02em;
}
.tracking-box-courier {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.track-no-data {
    text-align: center;
    padding: 40px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}
.track-no-data svg {
    width: 56px; height: 56px;
    color: var(--text-muted);
    stroke-width: 1.5;
    margin: 0 auto 12px;
}
.track-no-data h3 {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    margin-bottom: 4px;
}
.track-no-data p {
    color: var(--text-muted);
    font-size: 14px;
}

/* ===== Footer ===== */
.footer-strip {
    text-align: center;
    padding: 24px 16px;
    color: var(--text-muted);
    font-size: 13px;
}
.footer-strip a {
    color: var(--red);
    font-weight: 500;
}

/* ===== Responsive ===== */
@media (max-width: 768px) {
    .container { padding: 0 16px; }
    .landing-content h1 { font-size: 26px; }
    .landing-content .subtitle { font-size: 14px; }
    .landing-cta .btn-cta { width: 100%; justify-content: center; }
    .form-row { grid-template-columns: 1fr; }
    .souvenir-grid { grid-template-columns: repeat(2, 1fr); }
    .souvenir-icon { width: 90px; height: 90px; padding: 12px; }
    .form-section-title h2 { font-size: 22px; }
    .claim-form { padding: 20px; }
    .track-info-grid { grid-template-columns: 1fr; gap: 8px; }
    .track-card-header { flex-direction: column; align-items: stretch; }
    .form-actions { flex-direction: column-reverse; }
    .form-actions .btn { width: 100%; }
    .header-strip { padding: 6px 0; }
}
@media (max-width: 480px) {
    .souvenir-grid { grid-template-columns: 1fr; }
}
