/* ——— Footer إنماء سوفت ——— */
.enmaa-footer {
    --enmaa-accent: #0d9488;
    --enmaa-accent-2: #6366f1;
    --enmaa-surface: rgba(255, 255, 255, 0.92);
    --enmaa-card-bg: linear-gradient(145deg, rgba(255, 255, 255, 0.98) 0%, rgba(240, 253, 250, 0.95) 100%);
    --enmaa-border: rgba(148, 163, 184, 0.28);
    --enmaa-text: #0f172a;
    --enmaa-muted: #475569;
    --enmaa-subtle: #64748b;

    position: relative;
    margin-top: auto;
    width: 100%;
    padding: 0.75rem 0.85rem 0.85rem;
    padding-bottom: max(0.85rem, env(safe-area-inset-bottom, 0px));
    background: var(--enmaa-surface);
    border-top: 1px solid var(--enmaa-border);
}

.enmaa-footer__accent {
    position: absolute;
    inset-inline: 0;
    top: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--enmaa-accent) 0%, #14b8a6 35%, var(--enmaa-accent-2) 100%);
}

.enmaa-footer__wrap {
    max-width: 48rem;
    margin: 0 auto;
}

.enmaa-footer__card {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
    padding: 0.75rem 0.9rem;
    border-radius: 0.85rem;
    border: 1px solid var(--enmaa-border);
    background: var(--enmaa-card-bg);
    box-shadow:
        0 2px 4px rgba(15, 23, 42, 0.04),
        0 8px 24px rgba(13, 148, 136, 0.06);
}

.enmaa-footer__brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-align: right;
}

.enmaa-footer__logo-frame {
    flex-shrink: 0;
    width: 5rem;
    height: 5rem;
    padding: 0.35rem;
    border-radius: 0.65rem;
    background: #fff;
    border: 1px solid rgba(13, 148, 136, 0.2);
    box-shadow: 0 2px 8px rgba(13, 148, 136, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.enmaa-footer__logo {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.enmaa-footer__brand-text {
    flex: 1;
    min-width: 0;
}

.enmaa-footer__name {
    margin: 0 0 0.25rem;
    font-size: 0.9rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--enmaa-text);
    line-height: 1.3;
}

.enmaa-footer__tagline {
    margin: 0;
    font-size: 0.72rem;
    line-height: 1.45;
    font-weight: 600;
    color: var(--enmaa-muted);
}

.enmaa-footer__divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(148, 163, 184, 0.45), transparent);
}

.enmaa-footer__contacts {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
}

.enmaa-footer__label {
    margin: 0;
    font-size: 0.62rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--enmaa-subtle);
    text-align: center;
}

.enmaa-footer__phones {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.enmaa-footer__chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 0.65rem;
    border-radius: 0.65rem;
    border: 1px solid transparent;
    text-decoration: none;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.enmaa-footer__chip:hover {
    transform: translateY(-1px);
}

.enmaa-footer__chip-icon {
    flex-shrink: 0;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.45rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.enmaa-footer__chip-icon svg {
    width: 0.9rem;
    height: 0.9rem;
    display: block;
}

.enmaa-footer__chip-body {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.1rem;
    min-width: 0;
}

.enmaa-footer__chip-type {
    font-size: 0.6rem;
    font-weight: 700;
    opacity: 0.85;
    line-height: 1.2;
}

.enmaa-footer__chip-num {
    font-size: 0.82rem;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0.03em;
    line-height: 1.2;
}

/* واتساب */
.enmaa-footer__chip--whatsapp {
    background: linear-gradient(135deg, rgba(236, 253, 245, 0.95) 0%, rgba(209, 250, 229, 0.9) 100%);
    border-color: rgba(37, 211, 102, 0.35);
    color: #065f46;
}

.enmaa-footer__chip--whatsapp .enmaa-footer__chip-icon {
    background: #25d366;
    color: #fff;
    box-shadow: 0 4px 12px rgba(37, 211, 102, 0.35);
}

.enmaa-footer__chip--whatsapp:hover {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.2);
    border-color: rgba(37, 211, 102, 0.55);
}

/* اتصال */
.enmaa-footer__chip--call {
    background: linear-gradient(135deg, rgba(239, 246, 255, 0.95) 0%, rgba(224, 231, 255, 0.9) 100%);
    border-color: rgba(99, 102, 241, 0.3);
    color: #312e81;
}

.enmaa-footer__chip--call .enmaa-footer__chip-icon {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.35);
}

.enmaa-footer__chip--call:hover {
    background: linear-gradient(135deg, #eff6ff 0%, #e0e7ff 100%);
    box-shadow: 0 8px 20px rgba(99, 102, 241, 0.18);
    border-color: rgba(99, 102, 241, 0.5);
}

@media (min-width: 640px) {
    .enmaa-footer {
        padding: 0.85rem 1rem 0.95rem;
    }

    .enmaa-footer__card {
        flex-direction: row;
        align-items: center;
        gap: 1rem;
        padding: 0.75rem 1rem;
    }

    .enmaa-footer__brand {
        flex: 1.15;
    }

    .enmaa-footer__divider {
        width: 1px;
        height: auto;
        align-self: stretch;
        min-height: 3rem;
        background: linear-gradient(180deg, transparent, rgba(148, 163, 184, 0.45), transparent);
    }

    .enmaa-footer__contacts {
        flex: 1;
        min-width: 12rem;
    }

    .enmaa-footer__label {
        text-align: right;
    }

    .enmaa-footer__phones {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.45rem;
    }

    .enmaa-footer__chip {
        flex: 1;
        min-width: 9.5rem;
    }

    .enmaa-footer__name {
        font-size: 0.95rem;
    }

    .enmaa-footer__tagline {
        font-size: 0.75rem;
    }
}

/* ——— لوحة التحكم (داكن) ——— */
.enmaa-footer--admin {
    --enmaa-surface: rgba(13, 17, 23, 0.96);
    --enmaa-card-bg: linear-gradient(145deg, rgba(30, 41, 59, 0.95) 0%, rgba(15, 23, 42, 0.98) 100%);
    --enmaa-border: rgba(148, 163, 184, 0.16);
    --enmaa-text: #f1f5f9;
    --enmaa-muted: #cbd5e1;
    --enmaa-subtle: #94a3b8;
}

.enmaa-footer--admin .enmaa-footer__logo-frame {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(45, 212, 191, 0.25);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.25);
}

.enmaa-footer--admin .enmaa-footer__chip--whatsapp {
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.45) 0%, rgba(4, 47, 46, 0.55) 100%);
    border-color: rgba(37, 211, 102, 0.3);
    color: #a7f3d0;
}

.enmaa-footer--admin .enmaa-footer__chip--call {
    background: linear-gradient(135deg, rgba(49, 46, 129, 0.4) 0%, rgba(30, 27, 75, 0.5) 100%);
    border-color: rgba(129, 140, 248, 0.35);
    color: #c7d2fe;
}

/* ——— الصفحات العامة ——— */
.enmaa-footer--public {
    --enmaa-surface: var(--pc-footer-bg, rgba(248, 250, 252, 0.88));
}

.dark .enmaa-footer--public,
.dark .enmaa-footer:not(.enmaa-footer--admin):not(.enmaa-footer--panel-light) {
    --enmaa-surface: rgba(15, 23, 42, 0.88);
    --enmaa-card-bg: linear-gradient(145deg, rgba(30, 41, 59, 0.92) 0%, rgba(15, 23, 42, 0.96) 100%);
    --enmaa-border: rgba(71, 85, 105, 0.55);
    --enmaa-text: #f1f5f9;
    --enmaa-muted: #cbd5e1;
    --enmaa-subtle: #94a3b8;
}

.dark .enmaa-footer:not(.enmaa-footer--admin) .enmaa-footer__logo-frame {
    background: rgba(15, 23, 42, 0.85);
    border-color: rgba(45, 212, 191, 0.22);
}

.dark .enmaa-footer:not(.enmaa-footer--admin) .enmaa-footer__chip--whatsapp {
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.4) 0%, rgba(4, 47, 46, 0.5) 100%);
    border-color: rgba(37, 211, 102, 0.28);
    color: #a7f3d0;
}

.dark .enmaa-footer:not(.enmaa-footer--admin) .enmaa-footer__chip--call {
    background: linear-gradient(135deg, rgba(49, 46, 129, 0.35) 0%, rgba(30, 27, 75, 0.45) 100%);
    border-color: rgba(129, 140, 248, 0.3);
    color: #c7d2fe;
}

body.pc-theme-waiting .dark .enmaa-footer--public {
    --enmaa-surface: rgba(28, 25, 23, 0.9);
    --enmaa-card-bg: linear-gradient(145deg, rgba(41, 37, 36, 0.92) 0%, rgba(28, 25, 23, 0.96) 100%);
    --enmaa-border: rgba(127, 29, 29, 0.35);
}

/* ——— لوحات الورش / الأوراق ——— */
.enmaa-footer--panel-light {
    --enmaa-surface: #f1f5f9;
}

.enmaa-footer--panel-dark {
    --enmaa-surface: rgba(11, 18, 32, 0.98);
    --enmaa-card-bg: linear-gradient(145deg, rgba(30, 41, 59, 0.92) 0%, rgba(11, 18, 32, 0.98) 100%);
    --enmaa-border: rgba(148, 163, 184, 0.14);
    --enmaa-text: #f1f5f9;
    --enmaa-muted: #cbd5e1;
    --enmaa-subtle: #94a3b8;
}

.enmaa-footer--panel-dark .enmaa-footer__logo-frame {
    background: rgba(15, 23, 42, 0.9);
    border-color: rgba(34, 211, 238, 0.2);
}

.enmaa-footer--panel-dark .enmaa-footer__chip--whatsapp {
    background: linear-gradient(135deg, rgba(6, 78, 59, 0.45) 0%, rgba(4, 47, 46, 0.55) 100%);
    border-color: rgba(37, 211, 102, 0.3);
    color: #a7f3d0;
}

.enmaa-footer--panel-dark .enmaa-footer__chip--call {
    background: linear-gradient(135deg, rgba(49, 46, 129, 0.4) 0%, rgba(30, 27, 75, 0.5) 100%);
    border-color: rgba(129, 140, 248, 0.35);
    color: #c7d2fe;
}
