@font-face {
    font-family: 'IranSansWeb';
    src: local('IRANSansWeb'),
         local('IranSansWeb'),
         url('../fonts/IRANSansWeb.woff2') format('woff2'),
         url('../fonts/IRANSansWeb.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

.raya-webphone-wrap,
.raya-webphone-wrap button,
.raya-webphone-wrap input,
.raya-webphone-wrap textarea,
.raya-webphone-wrap select,
#call-tip,
.webphone_button {
    font-family: IranSansWeb, IRANSansWeb, IRANSans, Tahoma, Arial, sans-serif !important;
}

.raya-webphone-wrap {
    direction: rtl;
    font-family: var(--raya-webphone-font-family, IranSansWeb, IRANSansWeb, IRANSans, Tahoma, sans-serif);
}

.webphone_button.raya-webphone-button {
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: var(--raya-webphone-primary, #ff8300) !important;
    border-color: var(--raya-webphone-secondary, #04c1f3) !important;
    z-index: var(--raya-webphone-z, 999999) !important;
    bottom: var(--raya-webphone-button-bottom, 20px) !important;
    right: var(--raya-webphone-button-right, 20px) !important;
    cursor: pointer;
    box-sizing: border-box;
    line-height: 1;
}

.webphone_button.raya-webphone-button:hover,
.webphone_button.raya-webphone-button:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, .20);
    outline: none;
}

.raya-webphone-button-icon {
    font-family: var(--raya-webphone-font-family, IranSansWeb, IRANSansWeb, IRANSans, Tahoma, sans-serif);
    display: flex !important;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    color: #fff;
}

#call-tip.raya-webphone-tip {
    background: var(--raya-webphone-secondary, #04c1f3) !important;
    z-index: calc(var(--raya-webphone-z, 999999) + 1) !important;
    bottom: var(--raya-webphone-tip-bottom, 83px) !important;
    right: var(--raya-webphone-tip-right, 20px) !important;
    align-items: center;
    font-family: var(--raya-webphone-font-family, IranSansWeb, IRANSansWeb, IRANSans, Tahoma, sans-serif);
}

#call-tip.raya-webphone-tip:before {
    border-left-color: var(--raya-webphone-secondary, #04c1f3) !important;
}

#call-tip-close.raya-webphone-tip-close {
    appearance: none;
    border: 0;
    border-radius: 6px;
    color: #222;
    line-height: 20px;
    padding: 0;
}

#__webphone_iframe__ {
    z-index: calc(var(--raya-webphone-z, 999999) + 2) !important;
    width: var(--raya-webphone-iframe-width, 380px) !important;
    height: var(--raya-webphone-iframe-height, 620px) !important;
    bottom: var(--raya-webphone-iframe-bottom, 75px) !important;
    right: var(--raya-webphone-iframe-right, 0px) !important;
    max-width: calc(100vw - 10px) !important;
    max-height: calc(100vh - 10px) !important;
    background: transparent;
}

@media (max-width: 768px) {
    .webphone_button.raya-webphone-button {
        bottom: var(--raya-webphone-mobile-button-bottom, 70px) !important;
        right: var(--raya-webphone-mobile-button-right, 20px) !important;
    }

    #call-tip.raya-webphone-tip {
        bottom: var(--raya-webphone-mobile-tip-bottom, 80px) !important;
        right: var(--raya-webphone-mobile-tip-right, 83px) !important;
    }

    #__webphone_iframe__ {
        width: var(--raya-webphone-mobile-iframe-width, 282px) !important;
        height: var(--raya-webphone-mobile-iframe-height, 450px) !important;
        bottom: var(--raya-webphone-mobile-iframe-bottom, 115px) !important;
        right: var(--raya-webphone-mobile-iframe-right, 5px) !important;
    }

    body.single-product .webphone_button.raya-webphone-button {
        bottom: var(--raya-webphone-product-button-bottom, 180px) !important;
        right: var(--raya-webphone-product-button-right, 30px) !important;
    }

    body.single-product #call-tip.raya-webphone-tip {
        bottom: var(--raya-webphone-product-tip-bottom, 185px) !important;
        right: var(--raya-webphone-product-tip-right, 95px) !important;
    }

    body.single-product #__webphone_iframe__ {
        bottom: var(--raya-webphone-product-iframe-bottom, 220px) !important;
        right: var(--raya-webphone-product-iframe-right, 15px) !important;
    }
}


/* === 1.3.4 placement and 450px height fix === */
#__webphone_iframe__ {
    height: var(--raya-webphone-iframe-height, 620px) !important;
    max-height: calc(100vh - 10px) !important;
}


/* Force all visible text weight */
body, body *, button, input, textarea, select, option, label, a, p, span, div, h1, h2, h3, h4, h5, h6, small, strong, b, em {
    font-weight: 500 !important;
}


/* === 1.5.1: Force IranSansWeb on frontend and mobile widget text === */
.raya-webphone-wrap,
.raya-webphone-wrap *,
#call-tip.raya-webphone-tip,
#call-tip.raya-webphone-tip *,
.webphone_button.raya-webphone-button,
.webphone_button.raya-webphone-button * {
    font-family: var(--raya-webphone-font-family, IranSansWeb, IRANSansWeb, IRANSans, Tahoma, Arial, sans-serif) !important;
    font-weight: 500 !important;
}

@media (max-width: 768px) {
    .raya-webphone-wrap,
    .raya-webphone-wrap *,
    #call-tip.raya-webphone-tip,
    #call-tip.raya-webphone-tip *,
    .webphone_button.raya-webphone-button,
    .webphone_button.raya-webphone-button * {
        font-family: var(--raya-webphone-font-family, IranSansWeb, IRANSansWeb, IRANSans, Tahoma, Arial, sans-serif) !important;
        font-weight: 500 !important;
    }
}


/* Independent feedback modal: created only after a qualified call ends. */
body.raya-feedback-open {
    overscroll-behavior: none;
}

.raya-webphone-feedback-modal,
.raya-webphone-feedback-modal * {
    box-sizing: border-box;
    font-family: var(--raya-feedback-font-family, var(--raya-webphone-font-family, IranSansWeb, IRANSansWeb, IRANSans, Tahoma, Arial, sans-serif)) !important;
}

.raya-webphone-feedback-content input,
.raya-webphone-feedback-content textarea,
.raya-webphone-feedback-content select,
.raya-webphone-feedback-content button {
    font-family: var(--raya-feedback-font-family, var(--raya-webphone-font-family, IranSansWeb, IRANSansWeb, IRANSans, Tahoma, Arial, sans-serif)) !important;
}

.raya-webphone-feedback-modal {
    position: fixed;
    inset: 0;
    z-index: calc(var(--raya-webphone-z, 999999) + 50);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    opacity: 0;
    visibility: hidden;
    transition: opacity .18s ease, visibility .18s ease;
}

.raya-webphone-feedback-modal.is-visible {
    opacity: 1;
    visibility: visible;
}

.raya-webphone-feedback-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .62);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
}

.raya-webphone-feedback-dialog {
    position: relative;
    z-index: 1;
    width: min(620px, calc(100vw - 32px));
    max-height: min(760px, calc(100vh - 32px));
    overflow: auto;
    direction: rtl;
    padding: 26px 24px 22px;
    border: 1px solid rgba(255, 255, 255, .68);
    border-radius: 18px;
    background: rgba(255, 255, 255, .97);
    box-shadow: 0 24px 80px rgba(15, 23, 42, .32);
    transform: translateY(14px) scale(.985);
    transition: transform .18s ease;
}

.raya-webphone-feedback-modal.is-visible .raya-webphone-feedback-dialog {
    transform: translateY(0) scale(1);
}

.raya-webphone-feedback-heading {
    margin: 0 0 18px;
    color: #0f172a;
    font-size: 19px;
    font-weight: 700;
}

.raya-webphone-feedback-loading {
    display: flex;
    min-height: 130px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #475569;
}

.raya-webphone-feedback-loading span {
    width: 30px;
    height: 30px;
    border: 3px solid #dbeafe;
    border-top-color: var(--raya-webphone-secondary, #04c1f3);
    border-radius: 50%;
    animation: raya-feedback-spin .75s linear infinite;
}

.raya-webphone-feedback-loading p,
.raya-webphone-feedback-error {
    margin: 0;
    text-align: center;
}

.raya-webphone-feedback-error {
    padding: 18px;
    border: 1px solid #fecaca;
    border-radius: 12px;
    background: #fff1f2;
    color: #9f1239;
}



.raya-webphone-independent-feedback-form {
    display: grid;
    gap: 12px;
    margin: 0;
}

.raya-webphone-independent-feedback-form input,
.raya-webphone-independent-feedback-form select,
.raya-webphone-independent-feedback-form textarea {
    width: 100%;
    min-height: 46px;
    margin: 0;
    padding: 11px 13px;
    border: 1px solid #cbd5e1;
    border-radius: 11px;
    background: #fff;
    color: #0f172a;
    font-size: 14px;
    line-height: 1.7;
    outline: none;
    box-shadow: none;
    transition: border-color .16s ease, box-shadow .16s ease;
}

.raya-webphone-independent-feedback-form textarea {
    min-height: 118px;
    resize: vertical;
}

.raya-webphone-independent-feedback-form input::placeholder,
.raya-webphone-independent-feedback-form textarea::placeholder {
    color: #64748b;
    opacity: 1;
}

.raya-webphone-independent-feedback-form input:focus,
.raya-webphone-independent-feedback-form select:focus,
.raya-webphone-independent-feedback-form textarea:focus {
    border-color: var(--raya-webphone-secondary, #04c1f3);
    box-shadow: 0 0 0 3px rgba(4, 193, 243, .14);
}

.raya-webphone-feedback-submit {
    min-height: 46px;
    border: 0;
    border-radius: 11px;
    background: var(--raya-webphone-secondary, #04c1f3);
    color: #fff;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(4, 193, 243, .24);
}

.raya-webphone-feedback-submit:hover,
.raya-webphone-feedback-submit:focus-visible {
    filter: brightness(.94);
    outline: none;
}

.raya-webphone-feedback-submit:disabled {
    cursor: wait;
    opacity: .65;
}

.raya-webphone-feedback-field-hint {
    margin-top: -7px;
    padding: 0 4px;
    color: #64748b;
    font-size: 12px;
    line-height: 1.6;
    text-align: right;
    transition: color .16s ease;
}

.raya-webphone-feedback-field-hint.is-error {
    color: #b91c1c;
}

.raya-webphone-feedback-field-hint.is-valid {
    color: #15803d;
}

.raya-webphone-feedback-form-status {
    min-height: 0;
    margin: -8px 0 14px;
    color: #475569;
    font-size: 13px;
    line-height: 1.8;
    text-align: right;
}

.raya-webphone-feedback-form-status:empty {
    display: none;
}

.raya-webphone-feedback-form-status.is-error {
    padding: 9px 10px;
    border: 1px solid #fecaca;
    border-radius: 9px;
    background: #fff1f2;
    color: #9f1239;
}

.raya-webphone-feedback-honeypot {
    position: absolute !important;
    inset-inline-start: -9999px !important;
    width: 1px !important;
    height: 1px !important;
    min-height: 1px !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

.raya-webphone-feedback-success {
    display: flex;
    min-height: 170px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    color: #166534;
    text-align: center;
}

.raya-webphone-feedback-success span {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 50%;
    background: #dcfce7;
    font-size: 30px;
    font-weight: 700;
}

.raya-webphone-feedback-success p {
    margin: 0;
    font-size: 15px;
    font-weight: 600;
}

@keyframes raya-feedback-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
    .raya-webphone-feedback-modal {
        align-items: flex-end;
        padding: 10px;
    }

    .raya-webphone-feedback-dialog {
        width: 100%;
        max-height: calc(100vh - 20px);
        padding: 24px 16px 18px;
        border-radius: 18px 18px 12px 12px;
    }
}

/* Searchable, intelligent feedback subject field. */
.raya-webphone-feedback-subject-search {
    position: relative;
    z-index: 4;
}

.raya-webphone-feedback-subject-search > input[type="text"] {
    padding-inline-end: 38px;
}

.raya-webphone-feedback-subject-search::after {
    content: "⌕";
    position: absolute;
    inset-inline-end: 13px;
    top: 10px;
    color: #64748b;
    font-size: 20px;
    line-height: 1;
    pointer-events: none;
}

.raya-webphone-feedback-subject-results {
    position: absolute;
    z-index: 40;
    top: calc(100% + 6px);
    right: 0;
    left: 0;
    max-height: 230px;
    overflow-y: auto;
    padding: 6px;
    border: 1px solid #cbd5e1;
    border-radius: 11px;
    background: #fff;
    box-shadow: 0 16px 38px rgba(15, 23, 42, .18);
}

.raya-webphone-feedback-subject-results[hidden] {
    display: none !important;
}

.raya-webphone-feedback-subject-option {
    display: flex;
    width: 100%;
    min-height: 42px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 8px 10px;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #0f172a;
    text-align: right;
    cursor: pointer;
}

.raya-webphone-feedback-subject-option:hover,
.raya-webphone-feedback-subject-option:focus-visible,
.raya-webphone-feedback-subject-option.is-active {
    background: #e8f8fd;
    color: #036984;
    outline: none;
}

.raya-webphone-feedback-subject-option span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.raya-webphone-feedback-subject-option small {
    flex: 0 0 auto;
    padding: 2px 7px;
    border-radius: 999px;
    background: #f1f5f9;
    color: #64748b;
    font-size: 11px;
}

.raya-webphone-feedback-subject-empty {
    padding: 10px;
    color: #64748b;
    font-size: 12px;
    text-align: center;
}

.raya-webphone-independent-feedback-form input[aria-invalid="true"],
.raya-webphone-independent-feedback-form textarea[aria-invalid="true"] {
    border-color: #dc2626;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, .12);
}
