/* Explain: Styles for promotional popups and quick order modals. */
/* UAE National Day 2026 promotional popup + quick order modal */

.nd-popup,
.nd-qo {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
}

.nd-popup[hidden],
.nd-qo[hidden] { display: none; }

.nd-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(20, 17, 10, 0.62);
    backdrop-filter: blur(3px);
}

.nd-popup__panel {
    position: relative;
    z-index: 1;
    width: min(42rem, 100%);
    max-height: calc(100vh - 2.5rem);
    overflow: hidden auto;
    display: grid;
    grid-template-columns: 1fr;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}
@media (min-width: 720px) {
    .nd-popup__panel { grid-template-columns: 0.9fr 1.1fr; }
}

.nd-popup__close,
.nd-qo__close {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    z-index: 3;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2.6rem;
    height: 2.6rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-color);
    background: rgba(251, 248, 243, 0.94);
    color: var(--text-color);
    cursor: pointer;
    transition: background 0.25s ease, color 0.25s ease;
}
.nd-popup__close:hover,
.nd-qo__close:hover { background: var(--primary-color); color: #FBF8F3; }
html[dir="rtl"] .nd-popup__close,
html[dir="rtl"] .nd-qo__close { right: auto; left: 0.6rem; }

.nd-popup__media {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 13rem;
    padding: 1.25rem;
    background: #fff;
}
.nd-popup__media img { width: 100%; height: 100%; max-height: 22rem; object-fit: contain; }
.nd-popup__tag { position: absolute; top: 0.85rem; left: 0.85rem; }
html[dir="rtl"] .nd-popup__tag { left: auto; right: 0.85rem; }

.nd-popup__body { padding: 2rem 1.75rem; }
@media (min-width: 720px) { .nd-popup__body { padding: 2.5rem 2.25rem; } }
.nd-popup__title { font-size: clamp(1.5rem, 3vw, 2rem); line-height: 1.12; margin: 0.5rem 0 0; }
.nd-popup__text { margin: 0.75rem 0 0; color: var(--text-muted); line-height: 1.65; font-size: 0.95rem; }
.nd-popup__price { display: flex; align-items: baseline; gap: 0.75rem; margin-top: 1.1rem; }
.nd-popup__price s { color: var(--text-muted); font-size: 1.05rem; }
.nd-popup__price span { font-family: var(--font-heading); font-size: 1.9rem; font-weight: 700; color: var(--accent-color); }
.nd-popup__actions { display: flex; flex-wrap: wrap; gap: 0.65rem; margin-top: 1.5rem; }
.nd-popup__actions .fgc-btn { flex: 1 1 9rem; }

.nd-qo__panel {
    position: relative;
    z-index: 1;
    width: min(32rem, 100%);
    max-height: calc(100vh - 2.5rem);
    overflow: hidden auto;
    padding: 2rem 1.6rem;
    background: var(--background-color);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-soft);
}
.nd-qo__title { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 0.4rem 0 0; }
.nd-qo__text { margin: 0.6rem 0 0; color: var(--text-muted); font-size: 0.92rem; line-height: 1.6; }
.nd-qo__form { display: grid; gap: 0.85rem; margin-top: 1.4rem; }
.nd-qo__form .fgc-field { margin-bottom: 0; }
.nd-qo__row { display: grid; gap: 0.85rem 1rem; grid-template-columns: 1fr; }
@media (min-width: 520px) { .nd-qo__row { grid-template-columns: 1fr 1fr; } }
.nd-qo__note { display: flex; align-items: flex-start; gap: 0.5rem; margin-top: 0; line-height: 1.55; }
.nd-qo__note[hidden] { display: none; }
.nd-qo__note i { margin-top: 0.15rem; }
.nd-qo__note span { min-width: 0; }
.nd-qo__foot { margin: 0; font-size: 0.76rem; line-height: 1.55; color: var(--text-muted); text-align: center; }

@media (max-width: 719px) {
    .nd-popup,
    .nd-qo { padding: 0.75rem; align-items: flex-end; }
    .nd-popup__panel { max-height: 90vh; }
    .nd-popup__media { min-height: 9rem; max-height: 12rem; }
    .nd-popup__body { padding: 1.5rem 1.35rem 1.75rem; }
    .nd-qo__panel { max-height: 90vh; }
}

.nd-popup__label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0;
    font-size: 0.6rem;
    font-weight: 600;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--accent-color);
}

.nd-popup__pricehead {
    margin: 0.85rem 0 0;
    font-family: var(--font-heading);
    font-size: clamp(1.15rem, 2vw, 1.45rem);
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--primary-color);
}

.nd-popup__list {
    list-style: none;
    margin: 1.15rem 0 0;
    padding: 0;
    border-top: 1px solid var(--border-color);
}

.nd-popup__item { border-bottom: 1px solid var(--border-color); }

.nd-popup__item a {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.6rem 0;
    color: var(--text-color);
    transition: color 0.25s ease;
}

.nd-popup__item a:hover { color: var(--accent-color); }

.nd-popup__item-name {
    font-size: 0.86rem;
    line-height: 1.45;
}

.nd-popup__item-price {
    flex: none;
    font-family: var(--font-heading);
    font-size: 0.98rem;
    font-weight: 600;
    color: var(--accent-color);
    white-space: nowrap;
}

.nd-popup__corp {
    display: inline-block;
    margin-top: 1rem;
    font-size: 0.63rem;
    font-weight: 500;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.2rem;
    transition: color 0.25s ease, border-color 0.25s ease;
}

.nd-popup__corp:hover {
    color: var(--accent-color);
    border-color: var(--accent-color);
}

.nd-popup__flag {
    position: absolute;
    top: 0.85rem;
    left: 0.85rem;
    margin: 0;
}

html[dir="rtl"] .nd-popup__flag { left: auto; right: 0.85rem; }