/* صفحه / لایه قطع اینترنت — تم فروشگاه آنلاین */

@font-face {
    font-family: payda;
    src: url("../../fonts/payda/PeydaWebFaNum-Regular.woff2") format("woff2");
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: payda;
    src: url("../../fonts/payda/PeydaWebFaNum-Bold.woff2") format("woff2");
    font-weight: 700;
    font-display: swap;
}

.offline-root {
    --offline-brand: #3a3b9c;
    --offline-brand-dark: #2a2b82;
    --offline-accent: #00a651;
    --offline-bg: linear-gradient(145deg, #f4f5fb 0%, #e8eaf6 45%, #faf8ff 100%);
    --offline-card: #ffffff;
    --offline-text: #1e2139;
    --offline-muted: #6b7289;
    font-family: payda, Tahoma, sans-serif;
    direction: rtl;
}

.offline-root--page {
    min-height: 100vh;
    margin: 0;
    background: var(--offline-bg);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px 32px;
    box-sizing: border-box;
}

.offline-root--overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    background: var(--offline-bg);
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px 16px;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.offline-root--overlay.is-visible {
    display: flex;
    opacity: 1;
}

.offline-card {
    max-width: 440px;
    width: 100%;
    background: var(--offline-card);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(58, 59, 156, 0.12), 0 4px 16px rgba(0, 0, 0, 0.06);
    padding: 32px 28px 28px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.offline-card::before {
    content: "";
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--offline-brand), var(--offline-accent));
}

.offline-illustration {
    width: 160px;
    height: 140px;
    margin: 0 auto 20px;
    position: relative;
}

.offline-cart {
    width: 88px;
    height: 72px;
    border: 3px solid var(--offline-brand);
    border-radius: 8px 8px 12px 12px;
    position: absolute;
    bottom: 8px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(58, 59, 156, 0.06);
}

.offline-cart::before {
    content: "";
    position: absolute;
    top: -14px;
    right: 12px;
    width: 28px;
    height: 14px;
    border: 3px solid var(--offline-brand);
    border-bottom: none;
    border-radius: 8px 8px 0 0;
}

.offline-cart-wheel {
    position: absolute;
    bottom: -10px;
    width: 14px;
    height: 14px;
    border-radius: 50%;
    background: var(--offline-brand-dark);
    border: 2px solid var(--offline-card);
}

.offline-cart-wheel--r {
    right: 14px;
}

.offline-cart-wheel--l {
    left: 14px;
}

.offline-wifi {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 72px;
    height: 56px;
}

.offline-wifi-arc {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    border: 3px solid var(--offline-muted);
    border-bottom: none;
    border-radius: 50% 50% 0 0;
    opacity: 0.35;
}

.offline-wifi-arc--1 {
    width: 20px;
    height: 10px;
    bottom: 8px;
}

.offline-wifi-arc--2 {
    width: 36px;
    height: 18px;
    bottom: 8px;
}

.offline-wifi-arc--3 {
    width: 52px;
    height: 26px;
    bottom: 8px;
}

.offline-wifi-dot {
    position: absolute;
    bottom: 4px;
    left: 50%;
    transform: translateX(-50%);
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--offline-muted);
    opacity: 0.4;
}

.offline-wifi-slash {
    position: absolute;
    inset: 4px 8px 0;
    pointer-events: none;
}

.offline-wifi-slash line {
    stroke: #c62828;
    stroke-width: 4;
    stroke-linecap: round;
    animation: offline-pulse-slash 2s ease-in-out infinite;
}

@keyframes offline-pulse-slash {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.65; }
}

.offline-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    color: var(--offline-brand);
    background: rgba(58, 59, 156, 0.1);
    padding: 6px 14px;
    border-radius: 999px;
    margin-bottom: 12px;
}

.offline-title {
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--offline-text);
    margin: 0 0 10px;
    line-height: 1.5;
}

.offline-desc {
    font-size: 0.9rem;
    color: var(--offline-muted);
    margin: 0 0 22px;
    line-height: 1.75;
}

.offline-tips {
    list-style: none;
    margin: 0 0 24px;
    padding: 14px 16px;
    background: #f7f8fc;
    border-radius: 12px;
    text-align: right;
    font-size: 0.82rem;
    color: var(--offline-muted);
    line-height: 1.8;
}

.offline-tips li {
    position: relative;
    padding-right: 18px;
}

.offline-tips li::before {
    content: "•";
    position: absolute;
    right: 0;
    color: var(--offline-accent);
    font-weight: bold;
}

.offline-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.offline-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 12px 20px;
    border-radius: 12px;
    font-size: 0.95rem;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.15s;
}

.offline-btn:active {
    transform: scale(0.98);
}

.offline-btn--primary {
    background: var(--offline-brand);
    color: #fff;
}

.offline-btn--primary:hover {
    background: var(--offline-brand-dark);
}

.offline-btn--ghost {
    background: transparent;
    color: var(--offline-brand);
    border: 1px solid rgba(58, 59, 156, 0.35);
}

.offline-btn--ghost:hover {
    background: rgba(58, 59, 156, 0.06);
}

.offline-btn:disabled {
    opacity: 0.65;
    cursor: wait;
}

.offline-status {
    margin-top: 14px;
    font-size: 0.8rem;
    color: var(--offline-accent);
    min-height: 1.2em;
    opacity: 0;
    transition: opacity 0.3s;
}

.offline-status.is-shown {
    opacity: 1;
}

.offline-footer-note {
    margin-top: 20px;
    font-size: 0.75rem;
    color: var(--offline-muted);
    opacity: 0.85;
    line-height: 1.7;
}

.offline-support-tel {
    color: var(--offline-brand);
    font-weight: 700;
    text-decoration: none;
    direction: ltr;
    unicode-bidi: embed;
}

.offline-support-tel:hover {
    text-decoration: underline;
}

@media (max-width: 380px) {
    .offline-card {
        padding: 24px 18px 22px;
    }

    .offline-title {
        font-size: 1.2rem;
    }
}