/* ==========================================================================
   PRODUCT PAGE - CONSULTATION BOX AND ITS NUMBERS DIALOG
   --------------------------------------------------------------------------
   Views/Product/_HelpBox.cshtml. The box invites the customer to talk to an expert and shows no
   number; its button opens the dialog, which lists the store's numbers, each one a tel: link.

   The button is tinted, not solid: the solid accent button on this page is "add to cart", right
   above the box on a desktop, and the box must not compete with it.

   Phones: a bottom sheet, like the variant sheet (quickview.css). Desktop: a centred dialog.
   ========================================================================== */

.tc-pdp-help,
.tc-help-modal {
    --tc-help-ink: #0C0C0C;
    --tc-help-text: #3F4064;
    --tc-help-muted: #81858B;
    --tc-help-rule: #EDEDED;
    --tc-help-accent: var(--ryan-primary, #007AD0);
    --tc-help-tint: rgba(var(--ryan-primary-rgb, 0, 122, 208), 0.08);
    --tc-help-tint-strong: rgba(var(--ryan-primary-rgb, 0, 122, 208), 0.14);
    --tc-help-live: #1FA463;
    font-family: yekanbakh, tahoma, sans-serif;
    direction: rtl;
    text-align: right;
}

/* --------------------------------------------------------------------------
   The box
   -------------------------------------------------------------------------- */

.tc-pdp-help--card {
    margin-top: 16px;
    padding: 16px;
    border: 1px solid #E9EAEB;
    border-radius: 16px;
    background: #FFFFFF;
}

.tc-pdp-help__lead {
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.tc-pdp-help__badge {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--tc-help-tint);
    color: var(--tc-help-accent);
}

.tc-pdp-help__badge svg {
    width: 22px;
    height: 22px;
}

.tc-pdp-help__text {
    flex: 1 1 auto;
    min-width: 0;
}

.tc-pdp-help__title {
    font-size: 14px;
    font-weight: var(--tc-fw-label, 600);
    line-height: 22px;
    color: var(--tc-help-ink);
}

.tc-pdp-help__desc {
    margin-top: 2px;
    font-size: 12px;
    line-height: 20px;
    color: var(--tc-help-muted);
}

/* the support hours, with a small "on line" dot */
.tc-pdp-help__hours {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 12px;
    font-weight: 500;
    line-height: 18px;
    color: var(--tc-help-text);
}

.tc-pdp-help__dot {
    position: relative;
    flex: 0 0 auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--tc-help-live);
}

.tc-pdp-help__dot::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--tc-help-live);
    opacity: 0.45;
    animation: tc-help-live 2s ease-out infinite;
}

@keyframes tc-help-live {
    0% {
        transform: scale(1);
        opacity: 0.45;
    }

    80%, 100% {
        transform: scale(2.6);
        opacity: 0;
    }
}

.tc-pdp-help__cta {
    display: flex;
    align-items: center;
    gap: 6px;
    width: 100%;
    height: 44px;
    margin-top: 14px;
    padding: 0 14px;
    border: 1px solid rgba(var(--ryan-primary-rgb, 0, 122, 208), 0.22);
    border-radius: 12px;
    background: var(--tc-help-tint);
    color: var(--tc-help-accent);
    font-family: inherit;
    font-size: 14px;
    font-weight: var(--tc-fw-label, 600);
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.15s ease, border-color 0.15s ease;
}

.tc-pdp-help__cta:hover {
    border-color: rgba(var(--ryan-primary-rgb, 0, 122, 208), 0.4);
    background: var(--tc-help-tint-strong);
}

.tc-pdp-help__cta:active {
    background: var(--tc-help-tint-strong);
}

.tc-pdp-help__cta:focus-visible {
    outline: 2px solid var(--tc-help-accent);
    outline-offset: 2px;
}

.tc-pdp-help__cta-icon {
    flex: 0 0 auto;
    width: 20px;
    height: 20px;
}

.tc-pdp-help__cta-label {
    flex: 1 1 auto;
    min-width: 0;
    overflow: hidden;
    text-align: right;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.tc-pdp-help__cta-arrow {
    flex: 0 0 auto;
    width: 18px;
    height: 18px;
    transition: transform 0.15s ease;
}

.tc-pdp-help__cta:hover .tc-pdp-help__cta-arrow {
    transform: translateX(-3px);
}

/* phones: a section of the page, under the product page's section header */
.tc-pdp-help--mobile .tc-pdp-help__badge {
    width: 44px;
    height: 44px;
}

.tc-pdp-help--mobile .tc-pdp-help__desc {
    margin-top: 0;
    font-size: 13px;
    line-height: 22px;
    color: var(--tc-help-text);
}

.tc-pdp-help--mobile .tc-pdp-help__hours {
    margin-top: 6px;
    color: var(--tc-help-muted);
}

.tc-pdp-help--mobile .tc-pdp-help__cta {
    height: 48px;
    margin-top: 16px;
}

/* --------------------------------------------------------------------------
   The dialog
   -------------------------------------------------------------------------- */

.tc-help-modal {
    position: fixed;
    inset: 0;
    z-index: 10060;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.tc-help-modal[hidden] {
    display: none;
}

.tc-help-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 22, 40, 0.45);
    opacity: 0;
    transition: opacity 0.25s ease;
}

.tc-help-modal__sheet {
    position: relative;
    width: 100%;
    max-height: 88vh;
    max-height: 88dvh;
    overflow-y: auto;
    overscroll-behavior: contain;
    /* the head level with the product page's sheets' (pdp-mobile.css .tc-sheet__head): the
       grip, then the title and the close button centred 38px down */
    padding: 22px 16px calc(20px + env(safe-area-inset-bottom, 0px));
    border-radius: 16px 16px 0 0;
    background: #FFFFFF;
    color: var(--tc-help-ink);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.tc-help-modal__sheet:focus {
    outline: none;
}

.tc-help-modal.is-open .tc-help-modal__backdrop {
    opacity: 1;
}

.tc-help-modal.is-open .tc-help-modal__sheet {
    transform: none;
}

body.tc-help-lock {
    overflow: hidden;
}

/* the product page's sheets' grip */
.tc-help-modal__grip {
    position: absolute;
    top: 8px;
    left: 50%;
    width: 36px;
    height: 4px;
    border-radius: 2px;
    background: #E0E0E2;
    transform: translateX(-50%);
}

.tc-help-modal__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

/* a sheet's title is a section's title (the type ladder, base.less), as on the product page's
   other sheets */
.tc-help-modal__title {
    font-size: var(--tc-fs-section, 17px);
    font-weight: var(--tc-fw-title, 700);
    line-height: 1.6;
    color: var(--tc-help-ink);
}

/* the variant sheet's round grey tool button */
.tc-help-modal__close {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: #F1F3F4;
    color: #202124;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.tc-help-modal__close:hover,
.tc-help-modal__close:active {
    background: #E3E5E8;
}

.tc-help-modal__close:focus-visible {
    outline: 2px solid var(--tc-help-accent);
    outline-offset: 2px;
}

.tc-help-modal__close svg {
    width: 17px;
    height: 17px;
}

.tc-help-modal__intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 16px;
    text-align: center;
}

.tc-pdp-help__badge--lg {
    width: 56px;
    height: 56px;
    border-radius: 18px;
}

.tc-pdp-help__badge--lg svg {
    width: 28px;
    height: 28px;
}

.tc-help-modal__lead {
    max-width: 320px;
    margin-top: 12px;
    font-size: 13px;
    line-height: 22px;
    color: var(--tc-help-text);
}

/* the product's name: its model numbers in Latin digits («مدل 2247», not «۲۲۴۷»), as the page's
   own name and code read - the family's Latin-digit cut, the Persian letters unchanged */
.tc-help-modal__lead b {
    font-family: yekanbakhen, yekanbakh, tahoma, sans-serif;
    font-weight: var(--tc-fw-label, 600);
    color: var(--tc-help-ink);
}

.tc-help-modal__intro .tc-pdp-help__hours {
    margin-top: 10px;
    padding: 4px 10px;
    border-radius: 999px;
    background: #F2FAF6;
    color: #157347;
}

.tc-help-modal__lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 20px 0 0;
    padding: 0;
    list-style: none;
}

.tc-help-modal__line {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 1px solid var(--tc-help-rule);
    border-radius: 14px;
    background: #FFFFFF;
    color: inherit;
    text-decoration: none;
    transition: border-color 0.15s ease, background-color 0.15s ease;
}

.tc-help-modal__line:hover {
    border-color: rgba(var(--ryan-primary-rgb, 0, 122, 208), 0.35);
    background: rgba(var(--ryan-primary-rgb, 0, 122, 208), 0.03);
    color: inherit;
    text-decoration: none;
}

.tc-help-modal__line:active {
    background: var(--tc-help-tint);
}

.tc-help-modal__line:focus-visible {
    outline: 2px solid var(--tc-help-accent);
    outline-offset: 2px;
}

.tc-help-modal__icon {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #F4F5F7;
    color: var(--tc-help-text);
}

.tc-help-modal__icon svg {
    width: 20px;
    height: 20px;
}

.tc-help-modal__number {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    align-items: flex-start;
    gap: 2px;
    min-width: 0;
}

.tc-help-modal__kind {
    font-size: 11px;
    line-height: 16px;
    color: var(--tc-help-muted);
}

.tc-help-modal__digits {
    font-size: 17px;
    font-weight: var(--tc-fw-label, 600);
    line-height: 24px;
    letter-spacing: 0.5px;
    color: var(--tc-help-ink);
    unicode-bidi: isolate;
    white-space: nowrap;
}

.tc-help-modal__call {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    gap: 6px;
    height: 36px;
    padding: 0 14px;
    border-radius: 10px;
    background: var(--tc-help-accent);
    color: #FFFFFF;
    font-size: 13px;
    font-weight: var(--tc-fw-label, 600);
}

.tc-help-modal__call svg {
    width: 16px;
    height: 16px;
}

@media (min-width: 768px) {
    .tc-help-modal {
        align-items: center;
    }

    .tc-help-modal__sheet {
        width: min(420px, calc(100vw - 48px));
        max-height: 86vh;
        padding: 20px;
        border-radius: 16px;
        opacity: 0;
        transform: translateY(16px) scale(0.98);
        transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.2s ease;
    }

    .tc-help-modal.is-open .tc-help-modal__sheet {
        opacity: 1;
        transform: none;
    }

    .tc-help-modal__grip {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .tc-pdp-help__dot::after {
        animation: none;
    }

    .tc-help-modal__backdrop,
    .tc-help-modal__sheet {
        transition: none;
    }
}
