/* AuraPay UI refinements: header controls, locale modal, mobile order bar */

/* ---------- HEADER ---------- */
.ap-menu-left { display: none !important; }

.desktop-only { display: none; }
@media (min-width: 1024px) { .desktop-only { display: block; } }

.ap-head-tools {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: auto !important;
}

/* Force the tools cluster to be the last item, hard-pinned to the right on mobile */
@media (max-width: 1023px) {
    .navbar .container > div { position: relative; }
    .navbar .container > div > .ml-auto:not(.ap-head-tools) { margin-left: 0 !important; }
    .ap-head-tools {
        order: 99;
        margin-left: auto !important;
        margin-right: 0 !important;
        justify-content: flex-end;
    }
}
@media (min-width: 1024px) { .ap-head-tools { display: none; } }

.ap-icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    padding: 0;
    border: 1px solid #3a3a3a;
    border-radius: 9999px;
    background: transparent;
    color: #fff;
    line-height: 0;
    flex: 0 0 auto;
}
.ap-icon-btn svg { width: 17px; height: 17px; display: block; }

.ap-locale-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 34px;
    padding: 0 10px;
    border: 1px solid #3a3a3a;
    border-radius: 9999px;
    background: transparent;
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    flex: 0 0 auto;
}
.ap-flag { width: 17px; height: 17px; border-radius: 9999px; display: block; object-fit: cover; flex: 0 0 auto; }
.ap-flag-lg { width: 26px; height: 26px; border-radius: 9999px; display: block; object-fit: cover; flex: 0 0 auto; }

.ap-burger { display: flex; flex-direction: column; gap: 3px; }
.ap-burger span { display: block; width: 15px; height: 1.5px; background: #fff; border-radius: 2px; }

/* ---------- LOCALE MODAL ---------- */
.ap-modal { position: fixed; inset: 0; z-index: 100; display: none; }
.ap-modal.is-open { display: block; }
.ap-modal__overlay { position: absolute; inset: 0; background: rgba(0, 0, 0, .72); }
.ap-modal__panel {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: #262626;
    border-radius: 22px;
    padding: 22px 18px;
    max-width: 460px;
    margin: 0 auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, .5);
}
.ap-modal__title { font-size: 17px; font-weight: 700; color: #fff; margin: 0 0 12px; }
.ap-modal__title + .ap-opt { margin-bottom: 0; }
.ap-modal__group + .ap-modal__group { margin-top: 22px; }

.ap-opt {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    height: 52px;
    padding: 0 16px;
    border: 1px solid #3a3a3a;
    border-radius: 14px;
    background: transparent;
    color: #fff;
    font-size: 14px;
    font-weight: 600;
    text-align: left;
}
.ap-opt.is-active { border-color: var(--warna_2, #1a41ff); }
.ap-opt__check { margin-left: auto; color: var(--warna_2, #1a41ff); display: none; }
.ap-opt.is-active .ap-opt__check { display: block; }
.ap-opt__check svg { width: 18px; height: 18px; display: block; }

.ap-lang-row { display: flex; gap: 12px; }
.ap-lang-row .ap-opt { flex: 1 1 0; min-width: 0; }

/* ---------- MOBILE ORDER BAR ---------- */
.ap-orderbar { padding: 10px 12px 12px !important; border-radius: 14px 14px 0 0 !important; }
.ap-orderbar > .ap-order-btn {
    height: 40px !important;
    min-height: 40px !important;
    border-radius: 10px !important;
    font-size: 13.5px !important;
    font-weight: 600 !important;
    letter-spacing: .1px;
    gap: 8px !important;
    padding-left: 14px !important;
    padding-right: 14px !important;
}
.ap-orderbar > .ap-order-btn svg { width: 17px !important; height: 17px !important; flex: 0 0 auto; }

/* CSS flags (no external requests) */
.ap-flag--id { background: linear-gradient(#e30613 0 50%, #ffffff 50% 100%); }
.ap-flag--gb {
    background:
        linear-gradient(#00247d, #00247d);
    position: relative;
    overflow: hidden;
}
.ap-flag--gb::before {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, transparent calc(50% - 2px), #fff calc(50% - 2px) calc(50% + 2px), transparent calc(50% + 2px)),
        linear-gradient(to right, transparent calc(50% - 2px), #fff calc(50% - 2px) calc(50% + 2px), transparent calc(50% + 2px));
}
.ap-flag--gb::after {
    content: "";
    position: absolute;
    inset: 0;
    background:
        linear-gradient(to bottom, transparent calc(50% - 1px), #cf142b calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px)),
        linear-gradient(to right, transparent calc(50% - 1px), #cf142b calc(50% - 1px) calc(50% + 1px), transparent calc(50% + 1px));
}
