/*
 * Product authentication (checker) theme — Royal Madjapahit Mint.
 * Standalone from the landing/admin styles; every class is prefixed `rmm-`.
 * Desktop > 1024px (two panels side by side), tablet <= 1024px (stacked),
 * phone <= 480px.
 */

:root {
    --rmm-bg-from: #590909;
    --rmm-bg-to: #941c1c;
    --rmm-panel: rgba(202, 176, 176, 0.2);
    --rmm-panel-solid: #cab0b0;
    --rmm-gold: #e2cc8b;
    --rmm-gold-ink: #941c1c;
    --rmm-danger: #ff3b30;
    --rmm-danger-ink: #e52c30;
    --rmm-ok: #34c759;
    --rmm-text: #fff;
    --rmm-serif: 'Sorts Mill Goudy', Georgia, 'Times New Roman', serif;
    --rmm-sans: 'Wix Madefor Display', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
    --rmm-gutter: max(16px, 8.4vw);
}

html {
    background: var(--rmm-bg-to);
}

.rmm-checker {
    margin: 0;
    min-height: 100vh;
    color: var(--rmm-text);
    font-family: var(--rmm-sans);
    font-size: 15px;
    line-height: 1.27;
    background: linear-gradient(171.44deg, var(--rmm-bg-from) 0%, var(--rmm-bg-to) 74.879%) no-repeat;
    background-size: 100% 100%;
    -webkit-font-smoothing: antialiased;
}

.rmm-checker *,
.rmm-checker *::before,
.rmm-checker *::after {
    box-sizing: border-box;
}

.rmm-checker a {
    color: inherit;
    text-decoration: none;
}

.rmm-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    max-width: 1440px;
    margin: 0 auto;
    padding: 26px var(--rmm-gutter) 18px;
}

/* ---------- header ---------- */

.rmm-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.rmm-brand {
    display: flex;
    align-items: center;
    gap: 4px;
    min-width: 0;
}

.rmm-logo {
    flex: none;
    width: 38px;
    height: 48px;
    object-fit: contain;
}

.rmm-brand-name {
    width: 172px;
    margin-left: 4px;
    font-family: var(--rmm-serif);
    font-size: 20px;
    line-height: 1.146;
}

.rmm-divider {
    flex: none;
    align-self: center;
    width: 1px;
    height: 39px;
    margin: 0 4px;
    background: #fff;
}

.rmm-title {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.27;
}

.rmm-lang {
    display: flex;
    align-items: center;
    gap: 5px;
    flex: none;
    font-family: 'Inter', var(--rmm-sans);
    font-size: 18px;
    line-height: 22px;
}

.rmm-lang a {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    opacity: 0.8;
}

.rmm-lang a.is-active,
.rmm-lang a:hover,
.rmm-lang a:focus-visible {
    opacity: 1;
}

.rmm-lang a.is-active {
    font-weight: 600;
}

.rmm-globe {
    width: 20px;
    height: 20px;
}

/* ---------- main ---------- */

.rmm-main {
    flex: 1;
    padding-top: 22px;
}

.rmm-grid {
    display: grid;
    grid-template-columns: 467fr 708fr;
    gap: 22px;
}

.rmm-panel {
    min-width: 0;
    background: var(--rmm-panel);
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 50px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.12);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.rmm-panel-product {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 33px;
    min-height: 769px;
    padding: 120px 31px 26px 30px;
    text-align: center;
}

.rmm-panel-cert {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 36px;
    min-height: 769px;
    padding: 91px 10px 40px 16px;
}

.rmm-verified {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    margin: 0;
    font-family: var(--rmm-serif);
    font-size: 20px;
    font-weight: 400;
    line-height: 1.45;
}

.rmm-check {
    flex: none;
    width: 20px;
    height: 20px;
    color: var(--rmm-ok);
}

.rmm-coins {
    --coin: 202px; /* upper bound per face; smaller panels shrink both faces together */
    display: flex;
    justify-content: center;
    align-items: flex-start;
    width: 100%;
    max-width: calc(var(--coin) * 2);
}

.rmm-coins img {
    display: block;
    flex: 0 0 50%;
    width: 50%;
    height: auto;
    aspect-ratio: 1;
    /* Same square slot for both faces; "cover" keeps a non-square upload from shrinking one coin. */
    object-fit: cover;
    object-position: center;
    filter: drop-shadow(0 calc(var(--coin) * 0.103) calc(var(--coin) * 0.052) rgba(0, 0, 0, 0.25));
}

.rmm-name {
    margin: 0;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.27;
}

.rmm-desc {
    margin: 0;
    font-size: 15px;
    font-weight: 400;
}

/* certificate */

.rmm-cert {
    display: flex;
    flex-direction: column;
    gap: 50px;
    width: 100%;
    max-width: 619px;
}

.rmm-cert-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 38px;
    text-align: center;
}

.rmm-cert-title {
    margin: 0;
    padding-bottom: 0;
    font-family: var(--rmm-serif);
    font-size: 20px;
    font-weight: 400;
    line-height: 1.45;
    text-transform: uppercase;
}

.rmm-cert-title::after {
    content: '';
    display: block;
    width: 204px;
    max-width: 100%;
    height: 1px;
    margin: 0 auto;
    background: #fff;
}

.rmm-cert-sub {
    margin: 0;
    font-family: var(--rmm-serif);
    font-size: 20px;
    font-style: italic;
    font-weight: 400;
    line-height: 1.45;
}

.rmm-specs {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 35px 10px;
    margin: 0;
    padding: 0 90px;
    font-size: 18px;
}

.rmm-spec {
    min-width: 0;
}

.rmm-spec dt {
    font-weight: 700;
}

.rmm-spec dd {
    margin: 8px 0 0;
    font-weight: 400;
    overflow-wrap: anywhere;
}

.rmm-thanks {
    margin: 0;
    font-size: 18px;
    line-height: 1.278;
    text-align: center;
}

/* SNI / ISO badges (positions follow the Figma group, 162 x 43) */

.rmm-badges {
    position: relative;
    flex: none;
    width: 162.05px;
    height: 43px;
}

.rmm-badge {
    position: absolute;
    top: 0;
    font-family: Arial, Helvetica, sans-serif;
    text-align: center;
    color: #fff;
    line-height: 1.17;
}

.rmm-badge-sni {
    top: 2px;
    width: 45.42px;
    height: 41px;
}

.rmm-badge-sni .rmm-badge-img {
    position: absolute;
    left: 8.04px;
    top: 0;
    width: 29.7px;
    height: 32.2px;
    overflow: hidden;
}

.rmm-badge-sni .rmm-badge-img img {
    position: absolute;
    left: 0;
    top: -0.04%;
    width: 226.17%;
    max-width: none;
    height: 100.08%;
}

.rmm-badge-sni b {
    position: absolute;
    left: 8.04px;
    top: 30.95px;
    width: 29.75px;
    font-size: 6.03px;
}

.rmm-badge-sni i {
    position: absolute;
    left: 0;
    top: 38.19px;
    width: 45.42px;
    font-size: 3.22px;
    font-style: normal;
    font-weight: 700;
}

.rmm-badge-iso {
    left: 98.21px;
    width: 63.84px;
    height: 43px;
}

.rmm-badge-iso .rmm-badge-img {
    position: absolute;
    left: 1.36px;
    top: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 62.49px;
    height: 37.73px;
}

.rmm-badge-iso .rmm-badge-turn {
    position: relative;
    flex: none;
    width: 37.73px;
    height: 62.49px;
    overflow: hidden;
    transform: rotate(-90deg);
}

.rmm-badge-iso .rmm-badge-turn img {
    position: absolute;
    left: -12.5%;
    top: -0.31%;
    width: 125%;
    max-width: none;
    height: 100.63%;
}

.rmm-badge-iso i {
    position: absolute;
    left: 0;
    top: 37.65px;
    width: 62.61px;
    font-size: 4.72px;
    font-style: normal;
    text-align: right;
}

.rmm-badge-sni.is-second {
    left: 47.21px;
}

/* buttons */

.rmm-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-width: 261.8px;
    height: 35.74px;
    padding: 0 28px;
    border: 0;
    border-radius: 44.68px;
    background: var(--rmm-gold);
    box-shadow: inset 0 3.57px 10.54px rgba(255, 245, 245, 0.25);
    color: var(--rmm-gold-ink);
    font: 600 13.4px/1 var(--rmm-sans);
    cursor: pointer;
}

.rmm-btn:hover,
.rmm-btn:focus-visible {
    filter: brightness(1.05);
}

.rmm-btn svg {
    width: 12px;
    height: 12px;
    flex: none;
}

.rmm-actions {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.rmm-btn-ghost {
    background: transparent;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.7);
    color: #fff;
}

.rmm-btn-ghost:hover,
.rmm-btn-ghost:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    filter: none;
}

.rmm-btn[hidden] {
    display: none;
}

/* ---------- scan state ---------- */

.rmm-scan-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 24px;
    min-height: 584px;
    padding: 40px 24px;
    background: var(--rmm-panel-solid);
    border: 3px dashed #fff;
    border-radius: 50px;
    text-align: center;
}

.rmm-reader {
    width: min(100%, 480px);
    overflow: hidden;
    border-radius: 24px;
}

.rmm-reader[hidden] {
    display: none;
}

.rmm-reader video {
    border-radius: 24px;
}

.rmm-scan-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 38px;
    max-width: 520px;
}

.rmm-scan-icon {
    width: 100px;
    height: 100px;
    transform: scaleY(-1);
}

.rmm-scan-title {
    margin: 0;
    font-size: 25px;
    font-weight: 800;
}

.rmm-scan-text {
    margin: 0;
    font-size: 25px;
    font-weight: 500;
}

.rmm-scan-panel.is-scanning .rmm-scan-icon,
.rmm-scan-panel.is-scanning .rmm-scan-title {
    display: none;
}

.rmm-scan-panel.is-scanning .rmm-scan-text {
    font-size: 18px;
}

/* ---------- single-panel states (not verified / generic) ---------- */

.rmm-panel-single {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 28px;
    min-height: 0;
    padding: 56px 40px 48px;
    text-align: center;
}

.rmm-panel-fail {
    background: var(--rmm-panel-solid);
    color: var(--rmm-gold-ink);
}

.rmm-fail-icon {
    width: 110px;
    height: 110px;
    color: var(--rmm-danger);
}

.rmm-fail-title {
    margin: 0;
    color: var(--rmm-danger-ink);
    font-size: 28px;
    font-weight: 700;
}

.rmm-fail-text {
    margin: 0;
    max-width: 1040px;
    font-size: 18px;
}

.rmm-tips {
    width: 100%;
    max-width: 1040px;
    font-size: 18px;
    text-align: left;
}

.rmm-tips h2 {
    margin: 0 0 4px;
    font-size: 18px;
    font-weight: 700;
}

.rmm-tips ol {
    margin: 0;
    padding-left: 24px;
}

.rmm-tips strong {
    font-weight: 700;
}

.rmm-panel-generic {
    max-width: 708px;
    margin: 0 auto;
}

.rmm-code {
    margin: 0;
    font-size: 18px;
}

.rmm-code strong {
    font-weight: 700;
    overflow-wrap: anywhere;
}

/* ---------- footer ---------- */

.rmm-footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 46px;
    padding-top: 32px;
    text-align: center;
    font-size: 15px;
}

.rmm-footer p {
    margin: 0;
}

.rmm-contact strong {
    display: block;
    margin-bottom: 8px;
}

.rmm-copy img {
    width: 14px;
    height: 14px;
    margin-right: 4px;
    vertical-align: -2px;
}

/* ---------- tablet & phone ---------- */

@media (max-width: 1024px) {
    .rmm-logo {
        width: 27px;
        height: 34px;
    }

    .rmm-brand-name {
        width: 116px;
        font-size: 13.5px;
    }

    .rmm-divider {
        height: 39px;
    }

    .rmm-title {
        font-size: 12px;
    }

    .rmm-lang {
        font-size: 10px;
        line-height: 12px;
    }

    .rmm-lang a {
        padding: 6px 0;
    }

    .rmm-globe {
        width: 10px;
        height: 10px;
    }

    .rmm-grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .rmm-panel-product {
        min-height: 0;
        padding: 28px 31px 30px;
        gap: 32px;
    }

    .rmm-panel-cert {
        min-height: 0;
        gap: 32px;
        padding: 45px 16px 22px;
    }

    .rmm-coins {
        --coin: 166px;
    }

    .rmm-btn {
        min-width: 207px;
        height: 28.26px;
        font-size: 10.6px;
    }

    .rmm-scan-panel {
        min-height: 420px;
    }

    .rmm-scan-title,
    .rmm-scan-text {
        font-size: 20px;
    }

    .rmm-footer {
        padding-top: 37px;
        font-size: 11px;
    }
}

@media (max-width: 480px) {
    :root {
        --rmm-gutter: max(16px, 8.7vw);
    }

    .rmm-title {
        max-width: 60px;
    }

    .rmm-panel-product {
        padding: 15px 20px 20px;
    }

    .rmm-panel-cert {
        padding: 35px 16px 35px;
        gap: 20px;
    }

    .rmm-coins {
        --coin: 118px;
    }

    .rmm-cert {
        gap: 27px;
    }

    .rmm-specs {
        padding: 0;
        font-size: 17px;
    }

    .rmm-scan-panel {
        min-height: 360px;
        padding: 32px 16px;
        border-radius: 36px;
    }

    .rmm-scan-icon {
        width: 72px;
        height: 72px;
    }

    .rmm-scan-title,
    .rmm-scan-text {
        font-size: 18px;
    }

    .rmm-panel-single {
        padding: 36px 20px 32px;
    }

    .rmm-fail-icon {
        width: 80px;
        height: 80px;
    }

    .rmm-fail-title {
        font-size: 22px;
    }

    .rmm-fail-text,
    .rmm-tips,
    .rmm-tips h2 {
        font-size: 15px;
    }
}

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .rmm-panel {
        background: rgba(202, 176, 176, 0.24);
    }
}
