/* DW Professional Multilingual v1.5.0 */

/* Google Translate is used only as the translation engine; its visual UI must never become part of the site. */
#dwpm-google-translate,
.dwpm-google-translate,
.goog-te-banner-frame,
.goog-te-banner-frame.skiptranslate,
iframe.goog-te-banner-frame,
iframe[class*="VIpgJd-ZVi9od-ORHb"],
.VIpgJd-ZVi9od-ORHb-OEVmcd,
#goog-gt-tt,
.goog-te-balloon-frame,
.goog-tooltip,
.goog-tooltip:hover {
    display: none !important;
    visibility: hidden !important;
    width: 0 !important;
    height: 0 !important;
    min-height: 0 !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

html,
body {
    top: 0 !important;
    margin-top: 0 !important;
}

body > .skiptranslate iframe,
body > iframe.skiptranslate {
    display: none !important;
}

html.dwpm-modal-open,
html.dwpm-modal-open body {
    overflow: hidden !important;
}

.dwpm-overlay,
.dwpm-sidebar-tab,
.dwpm-transition {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}

.dwpm-sidebar-tab .screen-reader-text {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.dwpm-overlay *,
.dwpm-sidebar-tab *,
.dwpm-transition * {
    box-sizing: border-box;
}

.dwpm-overlay[hidden],
.dwpm-sidebar-tab[hidden],
.dwpm-transition[hidden] {
    display: none !important;
}

.dwpm-overlay {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: rgba(10, 15, 25, .60);
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
    opacity: 0;
    transition: opacity .22s ease;
}

.dwpm-overlay.is-visible { opacity: 1; }

.dwpm-dialog {
    position: relative;
    width: min(100%, 620px);
    padding: 34px;
    border: 1px solid rgba(17, 24, 39, .09);
    border-radius: 26px;
    background: #fff;
    color: #111827;
    box-shadow: 0 32px 90px rgba(15, 23, 42, .22);
    transform: translateY(12px) scale(.985);
    transition: transform .24s ease;
}

.dwpm-overlay.is-visible .dwpm-dialog { transform: translateY(0) scale(1); }

.dwpm-dialog-close {
    position: absolute;
    top: 18px;
    right: 18px;
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #e7e9ee;
    border-radius: 999px;
    background: #fff;
    color: #667085;
    cursor: pointer;
    box-shadow: 0 3px 10px rgba(15, 23, 42, .05);
    transition: background .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.dwpm-dialog-close[hidden] { display: none !important; }
.dwpm-dialog-close:hover,
.dwpm-dialog-close:focus-visible {
    outline: none;
    color: #111827;
    border-color: #d5d8de;
    background: #f8f9fb;
    transform: scale(1.04);
}

.dwpm-dialog-top {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 28px;
}

.dwpm-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 16px;
    color: var(--dwpm-primary, #111827);
    background: #f5f6f8;
    border: 1px solid #eceef2;
}

.dwpm-brand {
    font-size: 13px;
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #6b7280;
}

.dwpm-dialog h2 {
    margin: 0 0 10px;
    padding: 0;
    font-size: clamp(27px, 4vw, 38px);
    line-height: 1.12;
    font-weight: 760;
    letter-spacing: -.035em;
    color: #111827;
}

.dwpm-dialog > p {
    margin: 0 0 28px;
    max-width: 510px;
    font-size: 16px;
    line-height: 1.7;
    color: #667085;
}

.dwpm-language-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.dwpm-language-card {
    appearance: none;
    width: 100%;
    min-height: 104px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
    padding: 18px;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    background: #fff;
    color: #111827;
    text-align: left;
    cursor: pointer;
    box-shadow: 0 5px 18px rgba(15, 23, 42, .04);
    transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease, background .18s ease;
}

.dwpm-language-card:hover,
.dwpm-language-card:focus-visible {
    outline: none;
    transform: translateY(-2px);
    border-color: var(--dwpm-accent, #B88A44);
    background: #fffdf9;
    box-shadow: 0 15px 32px rgba(15, 23, 42, .10);
}

.dwpm-lang-badge {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: #f4f4f5;
    color: var(--dwpm-primary, #111827);
    font-size: 15px;
    font-weight: 850;
}

.dwpm-lang-copy { min-width: 0; }
.dwpm-lang-copy strong { display: block; font-size: 16px; line-height: 1.25; color: #111827; }
.dwpm-lang-copy small { display: block; margin-top: 5px; font-size: 12.5px; line-height: 1.35; color: #8a93a3; }
.dwpm-card-arrow { font-size: 20px; color: #9ca3af; }

.dwpm-dialog-note {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 22px;
    font-size: 12px;
    color: #8b93a1;
}

/* Minimal persistent language trigger. Only the small dot is visibly exposed.
   The button keeps a larger transparent hit area for reliable mouse/touch use. */
.dwpm-sidebar-tab {
    position: fixed;
    top: 50%;
    right: -10px;
    z-index: 2147482000;
    appearance: none;
    width: 34px;
    height: 46px;
    padding: 0;
    margin: 0;
    border: 0;
    border-radius: 18px 0 0 18px;
    background: transparent;
    color: inherit;
    cursor: pointer;
    box-shadow: none;
    transform: translate(100%, -50%);
    opacity: 0;
    transition: transform .18s ease, opacity .18s ease;
    -webkit-tap-highlight-color: transparent;
}

.dwpm-sidebar-tab.is-visible {
    transform: translate(0, -50%);
    opacity: 1;
}


.dwpm-sidebar-dot {
    position: absolute;
    left: 9px;
    top: 50%;
    width: 8px;
    height: 8px;
    margin-top: -4px;
    border-radius: 999px;
    background: var(--dwpm-accent, #B88A44);
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .9), 0 2px 6px rgba(15, 23, 42, .16);
    z-index: 1;
    transition: transform .18s ease, box-shadow .18s ease;
}


.dwpm-sidebar-tab:hover .dwpm-sidebar-dot,
.dwpm-sidebar-tab:focus-visible .dwpm-sidebar-dot {
    transform: scale(1.16);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, .96), 0 3px 9px rgba(15, 23, 42, .20);
}

.dwpm-sidebar-tab:focus-visible {
    outline: 2px solid var(--dwpm-accent, #B88A44);
    outline-offset: -2px;
}

.dwpm-transition {
    position: fixed;
    inset: 0;
    z-index: 2147483640;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(255,255,255,.72);
    -webkit-backdrop-filter: blur(7px);
    backdrop-filter: blur(7px);
    opacity: 0;
    transition: opacity .16s ease;
}

.dwpm-transition.is-visible { opacity: 1; }
.dwpm-transition-card { display: flex; align-items: center; gap: 12px; padding: 15px 18px; border: 1px solid #e5e7eb; border-radius: 15px; background: #fff; color: #111827; box-shadow: 0 15px 40px rgba(15,23,42,.13); }
.dwpm-transition-card strong { font-size: 14px; }
.dwpm-spinner { width: 18px; height: 18px; border: 2px solid #e5e7eb; border-top-color: var(--dwpm-accent, #B88A44); border-radius: 50%; animation: dwpm-spin .65s linear infinite; }
@keyframes dwpm-spin { to { transform: rotate(360deg); } }

/* RTL is intentionally applied only when the public website is in Arabic. */
html[dir="rtl"] .dwpm-dialog,
html.dwpm-client-ar .dwpm-dialog,
body.dwpm-arabic .dwpm-dialog { direction: rtl; text-align: right; }
html[dir="rtl"] .dwpm-dialog-close,
html.dwpm-client-ar .dwpm-dialog-close,
body.dwpm-arabic .dwpm-dialog-close { right: auto; left: 18px; }

/* The tiny trigger stays on the same physical edge in both LTR and RTL modes. */
html[dir="rtl"] .dwpm-sidebar-tab,
html.dwpm-client-ar .dwpm-sidebar-tab,
body.dwpm-arabic .dwpm-sidebar-tab {
    direction: ltr;
}

@media (max-width: 640px) {
    .dwpm-overlay { padding: 14px; align-items: flex-end; }
    .dwpm-dialog { width: 100%; padding: 24px 18px 20px; border-radius: 24px 24px 18px 18px; }
    .dwpm-dialog-close { top: 14px; right: 14px; width: 34px; height: 34px; }
    html[dir="rtl"] .dwpm-dialog-close, html.dwpm-client-ar .dwpm-dialog-close, body.dwpm-arabic .dwpm-dialog-close { right: auto; left: 14px; }
    .dwpm-dialog-top { margin-bottom: 20px; }
    .dwpm-dialog h2 { font-size: 28px; }
    .dwpm-dialog > p { font-size: 15px; margin-bottom: 20px; }
    .dwpm-language-grid { grid-template-columns: 1fr; gap: 10px; }
    .dwpm-language-card { min-height: 86px; padding: 14px; }
    .dwpm-sidebar-tab {
        right: -11px;
        width: 36px;
        height: 48px;
    }
    .dwpm-sidebar-dot {
        left: 10px;
        width: 8px;
        height: 8px;
        margin-top: -4px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dwpm-overlay,
    .dwpm-dialog,
    .dwpm-language-card,
    .dwpm-sidebar-tab,
    .dwpm-transition,
    .dwpm-spinner { transition: none !important; animation: none !important; }
}
