/* مساعد الطيبات — Hero Canva AI (صفحة ai-assistant) */

.ai-hero-canva {
    position: relative;
    overflow: hidden;
    background: #0a0f0c;
    padding: calc(var(--notice-height, 0px) + var(--nav-height, 72px) + 48px) 0 88px;
    min-height: min(92vh, 720px);
    color: #fff;
    scroll-margin-top: calc(var(--nav-height, 72px) + 16px);
}

.ai-hero-canva__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
}

.ai-hero-canva__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        135deg,
        rgba(10, 15, 12, 0.88) 0%,
        rgba(27, 67, 50, 0.75) 45%,
        rgba(10, 10, 15, 0.92) 100%
    );
    pointer-events: none;
}

.ai-hero-canva::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background:
        radial-gradient(ellipse at 25% 40%, rgba(82, 183, 136, 0.12) 0%, transparent 60%),
        radial-gradient(ellipse at 75% 20%, rgba(212, 160, 23, 0.08) 0%, transparent 50%);
    pointer-events: none;
}

.ai-hero-canva::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 2;
    background: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
}

.ai-hero-canva__beam {
    position: absolute;
    top: 0;
    left: 0;
    z-index: 3;
    width: 50%;
    height: 100%;
    pointer-events: none;
    background: linear-gradient(135deg, rgba(212, 160, 23, 0.08) 0%, transparent 50%);
}

.ai-hero-canva__neural {
    position: absolute;
    inset: 0;
    z-index: 3;
    width: 100%;
    height: 100%;
    opacity: 0.3;
    pointer-events: none;
}

.ai-hero-canva__neural line {
    stroke: rgba(82, 183, 136, 0.25);
    stroke-width: 1;
}

.ai-hero-canva__particle {
    position: absolute;
    z-index: 3;
    width: 4px;
    height: 4px;
    background: rgba(183, 228, 199, 0.5);
    border-radius: 50%;
    pointer-events: none;
    animation: ai-hero-particle 3s ease-in-out infinite;
}

@keyframes ai-hero-float1 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-12px); }
}

@keyframes ai-hero-float2 {
    0%, 100% { transform: translateY(0) rotate(2deg); }
    50% { transform: translateY(-8px) rotate(-2deg); }
}

@keyframes ai-hero-float3 {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

@keyframes ai-hero-pulse-ring {
    0% { transform: scale(1); opacity: 0.6; }
    100% { transform: scale(1.8); opacity: 0; }
}

@keyframes ai-hero-orb-glow {
    0%, 100% {
        box-shadow: 0 0 40px rgba(82, 183, 136, 0.4), 0 0 80px rgba(212, 160, 23, 0.2);
    }
    50% {
        box-shadow: 0 0 60px rgba(82, 183, 136, 0.6), 0 0 120px rgba(212, 160, 23, 0.3);
    }
}

@keyframes ai-hero-particle {
    0%, 100% { opacity: 0.3; transform: translateY(0); }
    50% { opacity: 0.8; transform: translateY(-20px); }
}

.ai-hero-canva__inner {
    position: relative;
    z-index: 4;
    max-width: 1280px;
    margin: 0 auto;
    padding: 24px 20px 32px;
    display: flex;
    flex-direction: column-reverse;
    align-items: center;
    justify-content: center;
    gap: 40px;
}

@media (min-width: 1024px) {
    .ai-hero-canva__inner {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 48px;
        min-height: 420px;
    }
}

.ai-hero-canva__content {
    width: 100%;
    text-align: center;
}

@media (min-width: 1024px) {
    .ai-hero-canva__content {
        width: 45%;
        text-align: right;
    }
}

.ai-hero-canva__breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    font-size: 0.875rem;
    color: rgba(183, 228, 199, 0.85);
    margin-bottom: 16px;
}

@media (min-width: 1024px) {
    .ai-hero-canva__breadcrumb {
        justify-content: flex-start;
    }
}

.ai-hero-canva__breadcrumb a {
    color: rgba(183, 228, 199, 0.85);
    transition: color 0.2s;
}

.ai-hero-canva__breadcrumb a:hover {
    color: #fff;
}

.ai-hero-canva__breadcrumb .current {
    color: #F4D03F;
}

.ai-hero-canva__badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    margin-bottom: 18px;
}

@media (min-width: 1024px) {
    .ai-hero-canva__badges {
        justify-content: flex-start;
    }
}

.ai-hero-canva__badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.ai-hero-canva__badge--vision {
    border-color: rgba(82, 183, 136, 0.45);
    background: rgba(45, 106, 79, 0.25);
}

.ai-hero-canva__badge-ico {
    display: flex;
    color: #F4D03F;
}

.ai-hero-canva__badge--vision .ai-hero-canva__badge-ico {
    color: #b7e4c7;
}

.ai-hero-canva__badge span:last-child {
    font-size: 0.8125rem;
    font-weight: 600;
    color: #F4D03F;
}

.ai-hero-canva__badge--vision span:last-child {
    color: #d8f3dc;
}

.ai-hero-canva__vision-head {
    margin: 0 0 12px;
    font-size: clamp(1.1rem, 2.5vw, 1.35rem);
    font-weight: 700;
    line-height: 1.35;
    color: #b7e4c7;
    letter-spacing: 0.01em;
}

@media (min-width: 1024px) {
    .ai-hero-canva__vision-head {
        text-align: right;
    }
}

.ai-hero-canva__title {
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 900;
    line-height: 1.2;
    margin: 0 0 16px;
    color: #fff;
}

.ai-hero-canva__title-gold {
    color: #F4D03F;
    text-shadow: 0 0 20px rgba(244, 208, 63, 0.3);
}

.ai-hero-canva__subtitle {
    font-size: clamp(1rem, 2.2vw, 1.125rem);
    font-weight: 300;
    line-height: 1.75;
    color: #d8f3dc;
    max-width: 32rem;
    margin: 0 auto 28px;
    opacity: 0.95;
}

@media (min-width: 1024px) {
    .ai-hero-canva__subtitle {
        margin-inline: 0 0 28px;
    }
}

.ai-hero-canva__ctas {
    display: flex;
    flex-direction: column;
    gap: 12px;
    justify-content: center;
    margin-bottom: 24px;
}

@media (min-width: 480px) {
    .ai-hero-canva__ctas {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

@media (min-width: 1024px) {
    .ai-hero-canva__ctas {
        justify-content: flex-start;
    }
}

.ai-hero-canva__btn-gold {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 1.05rem;
    font-weight: 700;
    color: #1B4332;
    text-decoration: none;
    border: none;
    cursor: pointer;
    background: linear-gradient(135deg, #D4A017, #F4D03F);
    box-shadow: 0 6px 0 rgba(0, 0, 0, 0.15), 0 0 20px rgba(212, 160, 23, 0.3);
    border-radius: 14px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.ai-hero-canva__btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 0 rgba(0, 0, 0, 0.15), 0 0 30px rgba(212, 160, 23, 0.5);
    color: #1B4332;
}

.ai-hero-canva__btn-glass {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    font-size: 1.05rem;
    font-weight: 500;
    color: #fff;
    text-decoration: none;
    background: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(255, 255, 255, 0.35);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 14px;
    transition: background 0.2s;
}

.ai-hero-canva__btn-glass:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.ai-hero-canva__btn-outline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 22px;
    font-size: 0.95rem;
    font-weight: 600;
    color: #d8f3dc;
    text-decoration: none;
    border-radius: 14px;
    border: 1px solid rgba(183, 228, 199, 0.35);
    background: transparent;
    transition: background 0.2s, border-color 0.2s;
}

.ai-hero-canva__btn-outline:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(244, 208, 63, 0.45);
    color: #fff;
}

.ai-hero-canva__disclaimer {
    margin: 14px 0 0;
    font-size: 0.75rem;
    line-height: 1.6;
    color: rgba(183, 228, 199, 0.75);
    text-align: center;
    max-width: 32rem;
}

@media (min-width: 1024px) {
    .ai-hero-canva__disclaimer {
        text-align: right;
        margin-inline: 0;
    }
}

.ai-hero-canva__trust {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

@media (min-width: 1024px) {
    .ai-hero-canva__trust {
        justify-content: flex-start;
    }
}

.ai-hero-canva__trust span {
    padding: 6px 12px;
    font-size: 0.8125rem;
    color: #b7e4c7;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.ai-hero-canva__hint {
    margin-top: 18px;
    font-size: 0.88rem;
    color: rgba(255, 255, 255, 0.72);
    text-align: center;
}

@media (min-width: 1024px) {
    .ai-hero-canva__hint {
        text-align: right;
    }
}

.ai-hero-canva__hint a {
    color: #F4D03F;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.ai-hero-canva__hint a:hover {
    color: #fff;
}

.ai-hero-canva__visual {
    position: relative;
    width: 100%;
    min-height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (min-width: 1024px) {
    .ai-hero-canva__visual {
        width: 52%;
        min-height: 480px;
    }
}

/* معاينة الشات — هاتف 3D */
.ai-hero-canva__phone-wrap {
    flex-shrink: 0;
    transform-style: preserve-3d;
    perspective: 1200px;
    padding: 4px;
    border-radius: 3rem;
    background: linear-gradient(145deg, rgba(45, 106, 79, 0.35), rgba(45, 106, 79, 0.05));
    animation: ai-hero-phone-float 4s ease-in-out infinite, ai-hero-phone-glow 3s ease-in-out infinite;
}

@keyframes ai-hero-phone-float {
    0%, 100% { transform: translateY(0) rotateY(-8deg) rotateX(4deg); }
    50% { transform: translateY(-12px) rotateY(-4deg) rotateX(2deg); }
}

@keyframes ai-hero-phone-glow {
    0%, 100% {
        box-shadow: 0 0 40px rgba(82, 183, 136, 0.35), 0 0 80px rgba(212, 160, 23, 0.15);
    }
    50% {
        box-shadow: 0 0 56px rgba(82, 183, 136, 0.5), 0 0 100px rgba(212, 160, 23, 0.22);
    }
}

.ai-hero-canva__phone {
    position: relative;
    width: 250px;
    height: 500px;
    background: #0a0f0c;
    border-radius: 2.5rem;
    border: 1px solid rgba(255, 255, 255, 0.12);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ai-hero-canva__status {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px 8px;
    font-size: 0.68rem;
    color: #9ca3af;
}

.ai-hero-canva__notch {
    width: 68px;
    height: 16px;
    background: #000;
    border-radius: 999px;
}

.ai-hero-canva__chat {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 8px 12px 10px;
    overflow: hidden;
}

.ai-hero-canva__food-img {
    align-self: flex-end;
    width: 8.5rem;
    height: 6.5rem;
    object-fit: cover;
    border-radius: 1rem;
    border: 1px solid rgba(82, 183, 136, 0.35);
}

.ai-hero-canva__bubble {
    max-width: 90%;
    padding: 10px 12px;
    border-radius: 1rem;
}

.ai-hero-canva__bubble--user {
    align-self: flex-end;
    border-top-left-radius: 4px;
    background: rgba(45, 106, 79, 0.22);
    border: 1px solid rgba(82, 183, 136, 0.4);
}

.ai-hero-canva__bubble--ai {
    align-self: flex-start;
    border-top-right-radius: 4px;
    background: #1f2937;
    border: 1px solid rgba(82, 183, 136, 0.35);
}

.ai-hero-canva__bubble p {
    margin: 0;
    font-size: 0.78rem;
    line-height: 1.5;
    color: #e0f0e0;
}

.ai-hero-canva__bubble--ai p {
    color: #d8f3dc;
}

.ai-hero-canva__bubble--ai .streaming-cursor {
    color: #52b788;
    font-weight: 700;
    animation: ai-hero-blink 0.8s step-end infinite;
}

.ai-hero-canva__alt-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 0.68rem;
    font-weight: 600;
    color: #f4d03f;
    text-decoration: none;
    background: rgba(244, 208, 63, 0.12);
    border: 1px solid rgba(244, 208, 63, 0.35);
    opacity: 0;
    transform: translateY(4px);
    transition: opacity 0.35s ease, transform 0.35s ease, background 0.2s ease;
}

.ai-hero-canva__alt-link.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.ai-hero-canva__alt-link:hover {
    background: rgba(244, 208, 63, 0.22);
    color: #fff;
}

.ai-hero-canva__typing {
    align-self: flex-start;
    padding: 10px 12px;
    background: #1f2937;
    border-radius: 1rem;
    border-top-right-radius: 4px;
}

.ai-hero-canva__typing-dots {
    display: flex;
    gap: 5px;
}

.ai-hero-canva__typing-dots span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #52b788;
    animation: ai-hero-dot-pulse 1.2s ease-in-out infinite;
}

.ai-hero-canva__typing-dots span:nth-child(2) { animation-delay: 0.2s; }
.ai-hero-canva__typing-dots span:nth-child(3) { animation-delay: 0.4s; }

@keyframes ai-hero-dot-pulse {
    0%, 100% { opacity: 0.35; transform: scale(0.9); }
    50% { opacity: 1; transform: scale(1); }
}

.ai-hero-canva__input-bar {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 12px 12px;
    padding: 10px 12px;
    background: rgba(31, 41, 55, 0.9);
    border-radius: 999px;
    border: 1px solid #374151;
    color: #52b788;
}

.ai-hero-canva__input-bar span {
    flex: 1;
    font-size: 0.65rem;
    color: #9ca3af;
    text-align: right;
}

a.ai-hero-canva__chip {
    cursor: pointer;
    z-index: 2;
}

a.ai-hero-canva__chip:hover {
    background: rgba(255, 255, 255, 0.14);
}

.ai-hero-canva__chip {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.8125rem;
    font-weight: 500;
    color: #fff;
    white-space: nowrap;
}

.ai-hero-canva__chip-ico {
    display: flex;
    color: #F4D03F;
}

.ai-hero-canva__chip--1 {
    top: 8px;
    right: 8px;
    animation: ai-hero-float1 4s ease-in-out infinite;
}

.ai-hero-canva__chip--2 {
    bottom: 48px;
    right: 0;
    animation: ai-hero-float2 5s ease-in-out infinite 0.5s;
}

.ai-hero-canva__chip--3 {
    top: 50%;
    left: 0;
    transform: translateY(-50%);
    animation: ai-hero-float3 4.5s ease-in-out infinite 1s;
}

.ai-hero-canva__chip-preview .streaming-cursor {
    color: #F4D03F;
    font-weight: 700;
    animation: ai-hero-blink 0.8s step-end infinite;
}

@keyframes ai-hero-blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

.ai-hero-canva__chip-preview {
    position: absolute;
    bottom: 8px;
    left: 24px;
    max-width: 200px;
    padding: 10px 14px;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    font-size: 0.75rem;
    color: #d8f3dc;
    animation: ai-hero-float2 5s ease-in-out infinite 0.5s;
}

@media (min-width: 1024px) {
    .ai-hero-canva__chip--1 { top: 16px; right: 24px; }
    .ai-hero-canva__chip--2 { bottom: 64px; right: 16px; }
    .ai-hero-canva__chip--3 { left: 16px; }
    .ai-hero-canva__chip-preview { bottom: 16px; left: 48px; }
}

.ai-hero-canva__quota {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin: 0 auto 20px;
    padding: 12px 18px;
    border-radius: 16px;
    background: rgba(45, 106, 79, 0.35);
    border: 1px solid rgba(82, 183, 136, 0.5);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.25);
}

@media (min-width: 1024px) {
    .ai-hero-canva__quota {
        margin-inline: 0;
        margin-bottom: 22px;
    }
}

.ai-hero-canva__quota-ico {
    display: flex;
    flex-shrink: 0;
    color: #f4d03f;
}

.ai-hero-canva__quota-label {
    font-size: 0.95rem;
    font-weight: 500;
    color: #d8f3dc;
    line-height: 1.5;
}

.ai-hero-canva__quota-num,
.ai-hero-canva__quota-label strong[data-hero-vision-limit] {
    font-size: 1.15rem;
    font-weight: 800;
    color: #f4d03f;
}

.ai-hero-canva__quota.is-low {
    border-color: rgba(244, 208, 63, 0.55);
    background: rgba(212, 160, 23, 0.2);
}

.ai-hero-canva__quota.is-low .ai-hero-canva__quota-num,
.ai-hero-canva__quota.is-low .ai-hero-canva__quota-label strong[data-hero-vision-limit] {
    color: #fde68a;
}

.ai-hero-canva__quota.is-empty {
    border-color: rgba(231, 76, 60, 0.45);
    background: rgba(127, 29, 29, 0.28);
}

.ai-hero-canva__quota.is-empty .ai-hero-canva__quota-label {
    color: #fecaca;
}

.ai-hero-canva__quota.is-empty .ai-hero-canva__quota-num,
.ai-hero-canva__quota.is-empty .ai-hero-canva__quota-label strong[data-hero-vision-limit] {
    color: #fca5a5;
}

.ai-hero-canva__quota.is-unlimited {
    border-color: rgba(82, 183, 136, 0.65);
    background: rgba(45, 106, 79, 0.42);
}

.ai-hero-canva__quota-label--unlimited strong {
    color: #f4d03f;
    font-weight: 800;
}

.ai-hero-canva__wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    z-index: 5;
    pointer-events: none;
    line-height: 0;
}

.ai-hero-canva__wave svg {
    width: 100%;
    height: 100%;
    display: block;
}

@media (max-width: 640px) {
    .ai-hero-canva {
        min-height: auto;
        padding-bottom: 72px;
    }

    .ai-hero-canva__chip {
        font-size: 0.75rem;
        padding: 8px 10px;
    }

    .ai-hero-canva__phone {
        width: 220px;
        height: 440px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .ai-hero-canva__particle,
    .ai-hero-canva__phone-wrap,
    .ai-hero-canva__chip,
    .ai-hero-canva__chip-preview,
    .ai-hero-canva__typing-dots span,
    .ai-hero-canva__bubble--ai .streaming-cursor,
    .ai-hero-canva__chip-preview .streaming-cursor {
        animation: none;
    }
}

/* ── قسم المحادثة — نفس خلفية الهيرو / رؤية الطعام ── */
.ai-chat-section {
    position: relative;
    overflow: hidden;
    padding: 48px 0 56px;
    scroll-margin-top: calc(var(--nav-height, 72px) + 16px);
    background: #0a0f0c;
}

.ai-chat-section__bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    pointer-events: none;
}

.ai-chat-section__overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(
        135deg,
        rgba(10, 15, 12, 0.9) 0%,
        rgba(27, 67, 50, 0.78) 45%,
        rgba(10, 10, 15, 0.93) 100%
    );
    pointer-events: none;
}

.ai-chat-section__inner {
    position: relative;
    z-index: 2;
}

.ai-chat-section__header {
    margin-bottom: 28px;
}

.ai-chat-section__header h2 {
    color: #fff;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
}

.ai-chat-section__header p {
    color: #b7e4c7;
    max-width: 640px;
}

.ai-open-app-cta-wrap {
    margin: 14px 0 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px 14px;
}

.ai-open-app-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border-radius: 12px;
    font-size: 0.92rem;
    font-weight: 700;
    text-decoration: none;
    color: #1b4332;
    background: linear-gradient(135deg, #f4d03f 0%, #d4a017 100%);
    border: 1px solid rgba(255, 255, 255, 0.35);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.ai-open-app-cta:hover,
.ai-open-app-cta:focus-visible {
    transform: translateY(-1px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.28);
    color: #0d2818;
}

.ai-open-app-cta__hint {
    font-size: 0.82rem;
    color: rgba(183, 228, 199, 0.85);
    line-height: 1.5;
}

.ai-chat-section__badge {
    background: rgba(45, 106, 79, 0.45);
    color: #d8f3dc;
    border: 1px solid rgba(82, 183, 136, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.85rem;
}

.ai-chat-section__disclaimer {
    margin: 16px auto 0;
    max-width: 640px;
    text-align: center;
    font-size: 0.8rem;
    line-height: 1.65;
    color: rgba(183, 228, 199, 0.75);
}

.ai-chat-section .tayibat-live-chat-wrap {
    position: relative;
    z-index: 1;
}

/* صندوق الشات — شفاف (بدون blur على الأب لتعمل background-attachment: fixed) */
.ai-chat-section .tayibat-live-chat--ai {
    background: rgba(10, 15, 12, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.22);
    box-shadow: 0 28px 64px rgba(0, 0, 0, 0.35);
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__chips {
    background: rgba(10, 15, 12, 0.35);
    border-bottom-color: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-chip {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(183, 228, 199, 0.35);
    color: #e8f5e9;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-chip:hover {
    background: rgba(45, 106, 79, 0.85);
    color: #fff;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-vision-previews {
    background: rgba(10, 15, 12, 0.4);
    border-bottom-color: rgba(255, 255, 255, 0.08);
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-vision-previews__label {
    color: #b7e4c7;
}

/* غلاف الرسائل — الخلفية ثابتة والنص يمرّ فوقها */
.ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__messages-shell {
    position: relative;
    flex: 1;
    min-height: 340px;
    max-height: 520px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__messages-scene {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: var(--ai-scene-bg);
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    transform: translateZ(0);
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__messages-scene::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(10, 15, 12, 0.35) 0%,
        rgba(27, 67, 50, 0.3) 50%,
        rgba(10, 10, 15, 0.4) 100%
    );
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__messages {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    max-height: none;
    background: transparent;
    box-shadow: none;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-msg,
.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-typing {
    position: relative;
}

/* فقاعة ردّ المساعد — زجاج أخضر داكن + خط Tajawal */
.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-msg--bot .tayibat-lc-msg__bubble {
    font-family: var(--font-primary, 'Tajawal', 'Segoe UI', sans-serif);
    font-size: 0.95rem;
    font-weight: 400;
    line-height: 1.9;
    letter-spacing: 0.02em;
    color: #f0fdf4;
    background: linear-gradient(
        155deg,
        rgba(15, 38, 28, 0.94) 0%,
        rgba(29, 70, 52, 0.9) 48%,
        rgba(22, 58, 42, 0.93) 100%
    );
    border: 1px solid rgba(183, 228, 199, 0.32);
    border-radius: 18px 18px 18px 6px;
    box-shadow:
        0 12px 40px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(16px) saturate(1.15);
    -webkit-backdrop-filter: blur(16px) saturate(1.15);
    max-width: min(92%, 560px);
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-msg--bot .tayibat-lc-msg__bubble p,
.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-msg--bot .tayibat-lc-msg__bubble li,
.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-msg--bot .tayibat-lc-msg__bubble ul {
    color: #e8f5e9;
    margin: 0 0 10px;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-msg--bot .tayibat-lc-msg__bubble ul {
    padding-inline-start: 1.35rem;
    margin-bottom: 12px;
}

/* أزرار روابط الموقع داخل ردّ المساعد */
.ai-chat-section .tayibat-ai-link-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 10px 0 4px;
}

.ai-chat-section .tayibat-ai-link-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 9px 16px;
    border-radius: 999px;
    font-family: var(--font-primary, 'Tajawal', sans-serif);
    font-size: 0.82rem;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
    color: #0f2918;
    background: linear-gradient(135deg, #fef9c3 0%, #d4a017 55%, #b8860b 100%);
    border: 1px solid rgba(255, 255, 255, 0.45);
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.22);
    transition: transform 0.15s ease, box-shadow 0.15s ease, filter 0.15s ease;
}

.ai-chat-section .tayibat-ai-link-btn:hover,
.ai-chat-section .tayibat-ai-link-btn:focus-visible {
    transform: translateY(-1px);
    filter: brightness(1.06);
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.28);
    color: #0a1f12;
    outline: none;
}

.ai-chat-section .tayibat-ai-link-btn__ico {
    font-size: 0.75rem;
    opacity: 0.85;
    line-height: 1;
}

.ai-chat-section .tayibat-lc-msg--bot .tayibat-lc-msg__bubble--rich .tayibat-ai-link-btn {
    color: #0f2918;
}

.ai-chat-section .tayibat-lc-msg--bot .tayibat-lc-msg__bubble p:has(.tayibat-ai-link-btn) {
    margin-bottom: 4px;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-msg--bot .tayibat-lc-msg__bubble li {
    margin-bottom: 6px;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-msg--bot .tayibat-lc-msg__bubble p:last-child,
.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-msg--bot .tayibat-lc-msg__bubble ul:last-child {
    margin-bottom: 0;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-msg--bot .tayibat-lc-msg__bubble strong {
    color: #f4d03f;
    font-weight: 800;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-msg--bot .tayibat-lc-msg__bubble em {
    color: #b7e4c7;
    font-style: normal;
    font-weight: 600;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-msg--bot .tayibat-lc-msg__bubble--rich strong {
    color: #f4d03f;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-msg--bot .tayibat-lc-stream-cursor {
    color: #fde68a;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-typing {
    background: linear-gradient(155deg, rgba(15, 38, 28, 0.9), rgba(29, 70, 52, 0.88));
    border: 1px solid rgba(183, 228, 199, 0.28);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.28);
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-msg--warn .tayibat-lc-msg__bubble {
    background: linear-gradient(155deg, rgba(68, 48, 8, 0.92), rgba(120, 80, 12, 0.88));
    border-color: rgba(244, 208, 63, 0.45);
    color: #fef3c7;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-msg--error .tayibat-lc-msg__bubble {
    background: linear-gradient(155deg, rgba(68, 20, 16, 0.92), rgba(100, 28, 22, 0.9));
    border-color: rgba(252, 165, 165, 0.4);
    color: #fecaca;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__messages::-webkit-scrollbar-thumb {
    background: rgba(183, 228, 199, 0.65);
}

/* ── شريط الإدخال الاحترافي (وضوح النص على الهاتف أولوية) ── */
.ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__foot--composer {
    position: sticky;
    bottom: 0;
    z-index: 12;
    padding: 12px 14px calc(12px + env(safe-area-inset-bottom, 0px));
    background: linear-gradient(180deg, rgba(12, 18, 14, 0.72) 0%, rgba(8, 12, 10, 0.96) 100%);
    border-top: 1px solid rgba(183, 228, 199, 0.22);
    backdrop-filter: blur(14px) saturate(1.2);
    -webkit-backdrop-filter: blur(14px) saturate(1.2);
    box-shadow: 0 -8px 32px rgba(0, 0, 0, 0.35);
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__composer {
    display: flex;
    align-items: flex-end;
    gap: 10px;
    width: 100%;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__composer-side {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex-shrink: 0;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__input-wrap {
    flex: 1;
    min-width: 0;
    display: flex;
    margin: 0;
    padding: 3px;
    border-radius: 20px;
    background: #ffffff;
    border: 2px solid rgba(45, 106, 79, 0.35);
    box-shadow:
        0 2px 12px rgba(0, 0, 0, 0.12),
        inset 0 1px 0 rgba(255, 255, 255, 1);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__input-wrap:focus-within,
.ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__input-wrap.is-focused {
    border-color: #52b788;
    box-shadow:
        0 0 0 4px rgba(82, 183, 136, 0.28),
        0 4px 16px rgba(0, 0, 0, 0.15);
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__input--composer,
.ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__input {
    flex: 1;
    width: 100%;
    min-height: 48px;
    max-height: 140px;
    margin: 0;
    padding: 12px 16px;
    border: none;
    border-radius: 17px;
    font-family: var(--font-primary, 'Tajawal', 'Segoe UI', sans-serif);
    font-size: 16px;
    font-weight: 500;
    line-height: 1.55;
    letter-spacing: 0.01em;
    color: #0f2918 !important;
    -webkit-text-fill-color: #0f2918 !important;
    caret-color: #2d6a4f;
    background: transparent !important;
    opacity: 1 !important;
    -webkit-appearance: none;
    appearance: none;
    resize: none;
    box-shadow: none;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__input::placeholder {
    color: #6b7280 !important;
    -webkit-text-fill-color: #6b7280 !important;
    opacity: 1;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__input:focus {
    outline: none;
    box-shadow: none;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-neo-btn {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    color: #1b4332;
    background: linear-gradient(145deg, #f8faf9, #e8f5e9);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-send-btn--composer {
    width: 52px;
    height: 52px;
    min-width: 52px;
    padding: 0;
    border-radius: 16px;
    justify-content: center;
    flex-shrink: 0;
    background: linear-gradient(145deg, #52b788, #2d6a4f);
    box-shadow: 0 4px 14px rgba(45, 106, 79, 0.45);
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-send-btn--composer .tayibat-lc-send-icon {
    display: block;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-send-btn--composer .tayibat-lc-send-label {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__meta {
    margin-top: 10px;
    gap: 8px;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__meta,
.ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__meta-hint {
    color: rgba(216, 243, 220, 0.9);
    font-size: 0.78rem;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__meta-hint--mob {
    display: none;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__meta kbd {
    background: rgba(255, 255, 255, 0.14);
    border-color: rgba(255, 255, 255, 0.22);
    color: #e8f5e9;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-char-count {
    color: rgba(183, 228, 199, 0.75);
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-status {
    color: #95d5b2;
}

.ai-chat-section .tayibat-live-chat__counter--free {
    background: linear-gradient(135deg, rgba(212, 160, 23, 0.35), rgba(82, 183, 136, 0.35));
    border: 1px solid rgba(244, 208, 63, 0.55);
    color: #fef9c3;
    font-weight: 700;
    font-size: 0.78rem;
    padding: 4px 10px;
    border-radius: 999px;
}

/* الوضع الداكن: الحقل يبقى أبيض ونصاً داكناً (لا يختفي على iOS) */
html[data-theme="dark"] .ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__input-wrap,
html[data-theme="dark"] .ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__input {
    background: transparent !important;
    color: #0f2918 !important;
    -webkit-text-fill-color: #0f2918 !important;
}

html[data-theme="dark"] .ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__input-wrap {
    background: #ffffff !important;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-tool-btn {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(183, 228, 199, 0.3);
    color: #d8f3dc;
}

.ai-chat-section .tayibat-live-chat--ai .tayibat-lc-tool-btn:hover {
    background: rgba(45, 106, 79, 0.5);
}

html[data-theme="dark"] .ai-chat-section__overlay {
    background: linear-gradient(
        135deg,
        rgba(8, 12, 10, 0.94) 0%,
        rgba(27, 67, 50, 0.82) 45%,
        rgba(6, 8, 12, 0.96) 100%
    );
}

@media (max-width: 640px) {
    .ai-chat-section {
        padding: 32px 0 calc(24px + env(safe-area-inset-bottom, 0px));
    }

    .ai-chat-section__header {
        margin-bottom: 20px;
    }

    .ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__messages-shell {
        min-height: min(42vh, 320px);
        max-height: min(50vh, 380px);
    }

    .ai-chat-section .tayibat-live-chat--ai .tayibat-lc-msg--bot .tayibat-lc-msg__bubble {
        font-size: 0.9rem;
        max-width: 94%;
    }

    .ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__foot--composer {
        padding: 10px 10px calc(10px + env(safe-area-inset-bottom, 0px));
        margin: 0 -4px;
        border-radius: 20px 20px 0 0;
    }

    .ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__composer {
        flex-wrap: wrap;
        gap: 8px;
    }

    .ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__composer-side {
        flex-direction: row;
        order: 2;
        width: 100%;
        justify-content: flex-start;
    }

    .ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__input-wrap {
        order: 0;
        flex: 1 1 calc(100% - 60px);
        min-width: 0;
    }

    .ai-chat-section .tayibat-live-chat--ai .tayibat-lc-send-btn--composer {
        order: 1;
        width: 52px;
        height: 52px;
        align-self: flex-end;
    }

    .ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__input--composer {
        min-height: 52px;
        font-size: 16px;
        padding: 14px 16px;
    }

    .ai-chat-section .tayibat-live-chat--ai .tayibat-lc-neo-btn {
        width: 44px;
        height: 44px;
    }

    .ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__meta-hint--desk {
        display: none;
    }

    .ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__meta-hint--mob {
        display: inline;
    }

    .ai-chat-section .tayibat-live-chat--ai .tayibat-live-chat__toolbar {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4px;
        gap: 8px;
    }
}

@media (max-width: 380px) {
    .ai-chat-section .tayibat-live-chat--ai .tayibat-lc-neo-btn--speak {
        display: none;
    }
}
