/**
 * Copyright © Elegento All rights reserved.
 * See COPYING.txt for license details.
 */

.elegento-chat-widget {
    position: fixed;
    bottom: 20px;
    z-index: 9999;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.elegento-chat-widget--left {
    left: 20px;
}

.elegento-chat-widget--right {
    right: 20px;
}

/* Toggle Button */
.elegento-chat-widget .elegento-chat-widget__toggle {
    width: 56px;
    height: 56px;
    background: var(--chat-widget-bg-color, #a1a1a1);
    border-radius: 35%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: rgba(0, 0, 0, 0.17) 0px -12px 13px 0px inset,
    rgba(0, 0, 0, 0.15) 0px -19px 15px 0px inset,
    rgba(0, 0, 0, 0.1) 0px -41px 20px 0px inset,
    rgba(0, 0, 0, 0.06) 0px 2px 1px,
    rgba(0, 0, 0, 0.09) 0px 3px 2px,
    rgba(0, 0, 0, 0.09) 0px 7px 3px,
    rgba(0, 0, 0, 0.09) 0px 14px 7px,
    rgba(0, 0, 0, 0.09) 0px 20px 10px;
    transition: all 0.3s ease;
    animation: chatWidgetBounce 2s infinite;
    border: none;
    text-decoration: none;
}

.elegento-chat-widget .elegento-chat-widget__toggle:hover {
    animation: none;
    border-radius: 50%;
    text-decoration: none;
}

.elegento-chat-widget .elegento-chat-widget__toggle:active {
    animation: none;
    border-radius: 50%;
    box-shadow: rgba(17, 17, 26, 0.1) 0px 4px 16px,
    rgba(17, 17, 26, 0.05) 0px 8px 32px;
}

.elegento-chat-widget.elegento-chat-widget--open .elegento-chat-widget__toggle {
    border-radius: 50%;
    animation: none;
    box-shadow: none;
}

/* Toggle Icon */
.elegento-chat-widget .elegento-chat-widget__toggle .elegento-chat-widget__icon {
    width: 24px;
    height: 24px;
    min-width: 24px;
    min-height: 24px;
    max-width: 24px;
    max-height: 24px;
    color: var(--chat-widget-icon-color, #ffffff);
    transition: transform 0.3s ease;
    flex-shrink: 0;
    display: block;
    filter: brightness(0) invert(1);
}

.elegento-chat-widget .elegento-chat-widget__toggle .elegento-chat-widget__icon svg {
    width: 100%;
    height: 100%;
    display: block;
}

.elegento-chat-widget.elegento-chat-widget--open .elegento-chat-widget__toggle .elegento-chat-widget__icon {
    transform: rotate(180deg);
}

/* Chat Panel */
.elegento-chat-widget .elegento-chat-widget__panel {
    position: absolute;
    bottom: 76px;
    right: 0;
    width: 380px;
    max-width: calc(100vw - 40px);
    background-color: #f7f7f7;
    border-radius: 25px;
    border: none;
    box-shadow: rgba(17, 17, 26, 0.1) 0px 4px 16px,
    rgba(17, 17, 26, 0.05) 0px 8px 32px;
    overflow: hidden;
    display: none;
}

.elegento-chat-widget.elegento-chat-widget--left .elegento-chat-widget__panel {
    right: auto;
    left: 0;
}

/* Panel Header */
.elegento-chat-widget .elegento-chat-widget__panel .elegento-chat-widget__header {
    background: var(--chat-widget-primary-color, #a1a1a1);
    color: var(--chat-widget-icon-color, #ffffff);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.elegento-chat-widget .elegento-chat-widget__header .elegento-chat-widget__title {
    font-size: 16px;
    font-weight: 600;
    margin: 0;
}

/* Close Button */
.elegento-chat-widget .elegento-chat-widget__header .elegento-chat-widget__close {
    background: none;
    border: none;
    color: var(--chat-widget-icon-color, #ffffff);
    cursor: pointer;
    padding: 0;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    box-sizing: border-box;
    text-decoration: none;
}

.elegento-chat-widget .elegento-chat-widget__header .elegento-chat-widget__close svg,
.elegento-chat-widget .elegento-chat-widget__header .elegento-chat-widget__close img {
    width: 20px;
    height: 20px;
    display: block;
    transition: transform 0.6s ease;
    transform-origin: 50% 50%;
    transform: translateZ(0);
    will-change: transform;
    filter: brightness(0) invert(1);
    flex-shrink: 0;
}

.elegento-chat-widget .elegento-chat-widget__header .elegento-chat-widget__close:hover svg,
.elegento-chat-widget .elegento-chat-widget__header .elegento-chat-widget__close:hover img {
    transform: translateZ(0) rotate(90deg);
}

/* Panel Options */
.elegento-chat-widget .elegento-chat-widget__panel .elegento-chat-widget__options {
    padding: 12px 0;
}

.elegento-chat-widget .elegento-chat-widget__options .elegento-chat-widget__option {
    display: flex;
    align-items: center;
    padding: 12px;
    text-decoration: none;
    color: #1c1c1c;
    border-radius: 14px;
    background-color: transparent;
    cursor: pointer;
    font-size: 14px;
    margin: 0 12px;
    width: 356px;
    max-width: calc(100% - 24px);
    border: none;
    box-sizing: border-box;
}

.elegento-chat-widget .elegento-chat-widget__options .elegento-chat-widget__option:hover {
    text-decoration: none;
    color: #1c1c1c;
}

.elegento-chat-widget .elegento-chat-widget__options .elegento-chat-widget__option:focus {
    outline: none;
}

.elegento-chat-widget .elegento-chat-widget__options .elegento-chat-widget__option .elegento-chat-widget__option-icon {
    width: 26px;
    height: 26px;
    margin-right: 8px;
    color: var(--chat-widget-primary-color, #a1a1a1);
    padding: 5px;
    border-radius: 8px;
    background-color: color-mix(
        in srgb,
        var(--chat-widget-primary-color, #a1a1a1) 20%,
        transparent
    );
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    flex-shrink: 0;
}

.elegento-chat-widget .elegento-chat-widget__option .elegento-chat-widget__option-icon img,
.elegento-chat-widget .elegento-chat-widget__option .elegento-chat-widget__option-icon svg {
    width: 26px;
    height: 26px;
    display: block;
    flex-shrink: 0;
}

.elegento-chat-widget .elegento-chat-widget__option .elegento-chat-widget__option-label {
    font-weight: 500;
    transition: all 0.3s ease;
}

.elegento-chat-widget .elegento-chat-widget__option:hover .elegento-chat-widget__option-label {
    color: var(--chat-widget-primary-color, #a1a1a1);
}

@keyframes chatWidgetBounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* ===== ORDER SEARCH COMPONENTS ===== */

.elegento-chat-widget__content {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.elegento-chat-widget__section {
    width: 100%;
}

.elegento-chat-widget__section-divider {
    display: flex;
    align-items: center;
    margin: 0 26px 0 16px;
    position: relative;
}

.elegento-chat-widget__divider-text {
    background-color: #f7f7f7;
    color: #666;
    font-size: 12px;
    padding: 0 8px;
    position: relative;
    z-index: 1;
    font-weight: 500;
}

.elegento-chat-widget__section-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #e0e0e0;
    z-index: 0;
}

/* Order Search Form */
.elegento-chat-widget__search-form {
    padding: 12px 12px 0 12px;
    margin: 0 12px;
}

.elegento-chat-widget__search-header {
    margin-bottom: 16px;
    position: relative;
}

.elegento-chat-widget__search-title {
    display: inline-block;
    position: relative;
    background-color: #f7f7f7;
    color: #666;
    font-size: 12px;
    padding: 0 8px 0 0;
    font-weight: 500;
    z-index: 1;
}

.elegento-chat-widget__search-header::before {
    content: '';
    position: absolute;
    top: 15px;
    left: 0;
    right: 0;
    height: 1px;
    background-color: #e0e0e0;
    z-index: 0;
}

.elegento-chat-widget__search-description {
    font-size: 13px;
    color: #666;
    margin: 8px 0 0 0;
    line-height: 1.4;
}

.elegento-chat-widget__input-button-row {
    display: flex;
    gap: 8px;
    align-items: stretch;
    margin-bottom: 8px;
    height: 42px;
}

.elegento-chat-widget__form-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: #333;
    margin-bottom: 6px;
}

.elegento-chat-widget__input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    flex: 1;
    min-width: 0;
}

.elegento-chat-widget .elegento-chat-widget__input-wrapper .elegento-chat-widget__input,
.elegento-chat-widget .elegento-chat-widget__input-wrapper .elegento-chat-widget__input.elegento-chat-widget__input--tel {
    width: 100%;
    padding: 0.65rem 2.6rem 0.65rem 0.65rem;
    border: 2px solid color-mix(in srgb, #4b665b 20%, transparent);
    border-radius: 14px;
    font-size: 14px;
    font-family: inherit;
    font-weight: 500;
    background-color: color-mix(in srgb, #4b665b 20%, transparent);
    transition: all 0.3s ease;
    box-sizing: border-box;
    height: 100%;
}

.elegento-chat-widget .elegento-chat-widget__input-wrapper .elegento-chat-widget__input:focus,
.elegento-chat-widget .elegento-chat-widget__input-wrapper .elegento-chat-widget__input.elegento-chat-widget__input--tel:focus {
    outline: none;
    border-color: var(--chat-widget-primary-color, #a1a1a1);
    background-color: color-mix(in srgb, #4b665b 20%, transparent);
    box-shadow: none;
}

.elegento-chat-widget .elegento-chat-widget__input-wrapper .elegento-chat-widget__input:-webkit-autofill,
.elegento-chat-widget .elegento-chat-widget__input-wrapper .elegento-chat-widget__input.elegento-chat-widget__input--tel:-webkit-autofill,
.elegento-chat-widget .elegento-chat-widget__input-wrapper .elegento-chat-widget__input:-webkit-autofill:hover,
.elegento-chat-widget .elegento-chat-widget__input-wrapper .elegento-chat-widget__input.elegento-chat-widget__input--tel:-webkit-autofill:hover,
.elegento-chat-widget .elegento-chat-widget__input-wrapper .elegento-chat-widget__input:-webkit-autofill:focus,
.elegento-chat-widget .elegento-chat-widget__input-wrapper .elegento-chat-widget__input.elegento-chat-widget__input--tel:-webkit-autofill:focus,
.elegento-chat-widget .elegento-chat-widget__input-wrapper .elegento-chat-widget__input:-webkit-autofill:active,
.elegento-chat-widget .elegento-chat-widget__input-wrapper .elegento-chat-widget__input.elegento-chat-widget__input--tel:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 1000px color-mix(in srgb, #4b665b 20%, transparent) inset;
    box-shadow: 0 0 0 1000px color-mix(in srgb, #4b665b 20%, transparent) inset;
    -webkit-text-fill-color: inherit;
    background-color: color-mix(in srgb, #4b665b 20%, transparent);
    transition: background-color 5000s ease-in-out 0s;
}

.elegento-chat-widget .elegento-chat-widget__input-wrapper .elegento-chat-widget__input[data-user-interacted="true"]:invalid,
.elegento-chat-widget .elegento-chat-widget__input-wrapper .elegento-chat-widget__input.elegento-chat-widget__input--tel[data-user-interacted="true"]:invalid {
    border-color: #dc3545;
}

.elegento-chat-widget__input-icon {
    position: absolute;
    right: 8px;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    pointer-events: auto;
    transition: background-color 0.3s ease;
    background-color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: help;
    flex-shrink: 0;
}

.elegento-chat-widget__input-icon .elegento-chat-widget__input-icon-image {
    display: block;
    width: 17px;
    height: 17px;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
    background-color: #000;
    -webkit-mask-image: url('../svg/icons/info-icon.svg');
    mask-image: url('../svg/icons/info-icon.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
}

.elegento-chat-widget__input-icon:hover .elegento-chat-widget__input-icon-image {
    background-color: var(--chat-widget-primary-color);
}

.elegento-chat-widget__input-tooltip {
    position: absolute;
    top: calc(100% + 12px);
    min-width: 300px;
    max-width: 300px;
    margin-right: 4px;
    color: #fff;
    padding: 14px;
    opacity: 0;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 14px;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border: 1px solid rgba(0, 0, 0, 0.1);
    visibility: hidden;
    transform: translateY(6px);
    transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
    z-index: 2;
}

.elegento-chat-widget__input-tooltip .elegento-chat-widget__search-description {
    margin: 0;
    color: inherit;
}

.elegento-chat-widget__input-icon:hover .elegento-chat-widget__input-tooltip,
.elegento-chat-widget__input-icon:focus-within .elegento-chat-widget__input-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.elegento-chat-widget__input:focus + .elegento-chat-widget__input-icon .elegento-chat-widget__input-icon-image {
    background-color: var(--chat-widget-primary-color, #a1a1a1);
}

.elegento-chat-widget__form-error {
    font-size: 12px;
    color: #dc3545;
    margin-top: 4px;
    display: flex;
    align-items: center;
    gap: 4px;
}

.elegento-chat-widget__form-actions {
    display: flex;
    justify-content: center;
    flex-shrink: 0;
}

.elegento-chat-widget__input-button-row .elegento-chat-widget__form-actions {
    align-items: stretch;
}

.elegento-chat-widget__input-button-row .elegento-chat-widget__button {
    height: 100%;
}

/* ===== BUTTON ===== */

.elegento-chat-widget {
    --elegento-btn-transition: 0.3s ease;
}

.elegento-chat-widget .elegento-chat-widget__button {
    line-height: 1;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.65rem 0.5rem 0.65rem;
    border: none;
    border-radius: 14px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
    position: relative;
    transition:
        background-color var(--elegento-btn-transition),
        color var(--elegento-btn-transition),
        transform var(--elegento-btn-transition),
        opacity var(--elegento-btn-transition),
        box-shadow var(--elegento-btn-transition);
}

/* Primary Button */
.elegento-chat-widget .elegento-chat-widget__button--primary {
    background-color: color-mix(in srgb, var(--chat-widget-primary-color, #a1a1a1) 20%, transparent);
    color: #000;
}

/* Button Text */
.elegento-chat-widget .elegento-chat-widget__button .elegento-chat-widget__button-text {
    color: currentColor;
    margin-right: 0.2rem;
    transition: color var(--elegento-btn-transition);
}

/* Button Icon Container */
.elegento-chat-widget .elegento-chat-widget__button .elegento-chat-widget__button-icon {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    position: relative;
    background-color: #fff;
    border-radius: 8px;
    display: grid;
    place-items: center;
    overflow: hidden;
    pointer-events: none;
    transition:
        background-color var(--elegento-btn-transition),
        color var(--elegento-btn-transition);
}

.elegento-chat-widget .elegento-chat-widget__button .elegento-chat-widget__button-icon .elegento-chat-widget__button-icon-image {
    display: block;
    width: 12px;
    height: 12px;
    background-color: currentColor;
    -webkit-mask-image: url('../svg/icons/arrow-up-right.svg');
    mask-image: url('../svg/icons/arrow-up-right.svg');
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    transition:
        background-color var(--elegento-btn-transition),
        transform var(--elegento-btn-transition);
    flex-shrink: 0;
}

/* Button Spinner */
.elegento-chat-widget .elegento-chat-widget__button--animated .elegento-chat-widget__button-spinner[data-button-spinner] {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 25px;
    height: 25px;
    flex-shrink: 0;
    background-color: #fff;
    border-radius: 50%;
    position: absolute;
    left: 20px;
    pointer-events: none;
    transition:
        opacity var(--elegento-btn-transition),
        transform var(--elegento-btn-transition);
}

.elegento-chat-widget .elegento-chat-widget__button--animated .elegento-chat-widget__button-spinner[data-button-spinner] img {
    display: block;
    filter: brightness(0) saturate(100%) invert(37%) sepia(97%) saturate(1771%) hue-rotate(195deg) brightness(101%) contrast(101%);
    flex-shrink: 0;
}

.elegento-chat-widget .elegento-chat-widget__button--primary:hover {
    background-color: color-mix(in srgb, var(--chat-widget-primary-color, #a1a1a1) 30%, transparent);
    color: var(--chat-widget-primary-color, #a1a1a1);
    text-decoration: none;
}

.elegento-chat-widget .elegento-chat-widget__button--primary:hover .elegento-chat-widget__button-icon .elegento-chat-widget__button-icon-image {
    background-color: var(--chat-widget-primary-color, #a1a1a1);
}

.elegento-chat-widget .elegento-chat-widget__button--primary:active {
    color: var(--chat-widget-primary-color, #a1a1a1);
}

.elegento-chat-widget .elegento-chat-widget__button .elegento-chat-widget__button-icon .elegento-chat-widget__button-icon-copy.elegento-chat-widget__button-icon-image {
    position: absolute;
    transform: translate(-150%, 150%);
}

.elegento-chat-widget .elegento-chat-widget__button--animated:hover .elegento-chat-widget__button-icon span[data-button-icon] .elegento-chat-widget__button-icon-image:first-child {
    transform: translate(150%, -150%);
    transition: transform var(--elegento-btn-transition);
}

.elegento-chat-widget .elegento-chat-widget__button--animated:hover .elegento-chat-widget__button-icon span.elegento-chat-widget__button-icon-copy.elegento-chat-widget__button-icon-image {
    transform: translate(0);
    transition: transform var(--elegento-btn-transition);
}

/* Disabled Button */
.elegento-chat-widget .elegento-chat-widget__button:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* Secondary Button */
.elegento-chat-widget .elegento-chat-widget__button--secondary {
    background-color: #dddddd;
    margin-top: 1rem;
    color: black;
    border: none;
    padding: 14px 22px;
    transition:
        background-color var(--elegento-btn-transition),
        color var(--elegento-btn-transition);
}

.elegento-chat-widget .elegento-chat-widget__button--secondary:hover {
    background-color: var(--chat-widget-primary-color);
    color: white;
}

/* Loading State */
.elegento-chat-widget__loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.elegento-chat-widget__loading-spinner {
    color: var(--chat-widget-primary-color, #a1a1a1);
    flex-shrink: 0;
}

.elegento-chat-widget__loading-spinner img,
.elegento-chat-widget__loading-spinner svg {
    display: block;
    filter: brightness(0) saturate(100%) invert(37%) sepia(97%) saturate(1771%) hue-rotate(195deg) brightness(101%) contrast(101%);
    flex-shrink: 0;
}

.elegento-chat-widget__loading-text {
    display: none;
    font-size: 14px;
    color: #666;
    margin: 0;
}

/* Error State */
.elegento-chat-widget__error {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    text-align: center;
}

.elegento-chat-widget__error-icon {
    margin-bottom: 16px;
    flex-shrink: 0;
}

.elegento-chat-widget__error-icon .elegento-chat-widget__error-icon-image {
    display: block;
    width: 32px;
    height: 32px;
    background-color: #dc3545;
    -webkit-mask-image: url('../svg/icons/not-found.svg');
    mask-image: url('../svg/icons/not-found.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    flex-shrink: 0;
}

.elegento-chat-widget__error-message {
    font-size: 14px;
    color: #333;
    margin: 0 0 16px 0;
    line-height: 1.4;
}

/* Search Results */
.elegento-chat-widget__search-results {
    padding: 12px 12px 0 12px;
}

.elegento-chat-widget__results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.elegento-chat-widget__results-title-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.elegento-chat-widget__results-title {
    display: inline-block;
    position: relative;
    background-color: #f7f7f7;
    color: #666;
    font-size: 12px;
    padding: 0 8px;
    font-weight: 500;
    z-index: 1;
    margin: 0;
}

.elegento-chat-widget__title-divider {
    flex: 1;
    height: 1px;
    background-color: #e0e0e0;
    margin-left: 0;
}

.elegento-chat-widget__back-button {
    margin-left: 8px;
    background-color:
        color-mix(in srgb, var(--chat-widget-primary-color, #a1a1a1) 10%, transparent);
    border: none;
    color: black;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    outline: none;
}

.elegento-chat-widget__back-button .elegento-chat-widget__back-button-icon {
    display: block;
    width: 24px;
    height: 24px;
    background-color: color-mix(in srgb, var(--chat-widget-primary-color, #a1a1a1) 70%, transparent);
    -webkit-mask-image: url('../svg/icons/angle-small-left.svg');
    mask-image: url('../svg/icons/angle-small-left.svg');
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    transition: background-color 0.3s ease;
    flex-shrink: 0;
}

.elegento-chat-widget__back-button:hover {
    text-decoration: none;
    color: var(--chat-widget-primary-color, #a1a1a1);
    border: none;
}

.elegento-chat-widget__back-button:hover .elegento-chat-widget__back-button-icon {
    background-color: var(--chat-widget-primary-color, #a1a1a1);
}

.elegento-chat-widget__visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.elegento-chat-widget__results-list {
    display: flex;
    flex-direction: column;
    gap: 0;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 4px;
}

/* Custom scrollbar styling for order results */
.elegento-chat-widget__results-list::-webkit-scrollbar {
    width: 6px;
}

.elegento-chat-widget__results-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.elegento-chat-widget__results-list::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
    transition: background 0.3s ease;
}

.elegento-chat-widget__results-list::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Firefox scrollbar styling */
.elegento-chat-widget__results-list {
    scrollbar-width: thin;
    scrollbar-color: #c1c1c1 #f1f1f1;
}

.elegento-chat-widget__order-result {
    background-color: transparent;
    border: none;
    padding: 8px;
    transition: border-color 0.3s ease;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.elegento-chat-widget__order-result:hover {
    border-color: transparent;
}

.elegento-chat-widget__order-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}

.elegento-chat-widget__order-number {
    font-size: 14px;
    font-weight: 500;
    color: black;
}

.elegento-chat-widget__order-status {
    display: flex;
    padding: 4px 0;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 500;
    color: #333;
    max-width: 120px;
    justify-content: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex-shrink: 0;
}

/* Order Details */
.elegento-chat-widget__order-details {
    padding: 16px;
}

.elegento-chat-widget__details-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.elegento-chat-widget__details-title-wrapper {
    flex: 1;
    position: relative;
    display: flex;
    align-items: center;
}

.elegento-chat-widget__details-title {
    display: inline-block;
    position: relative;
    background-color: #f7f7f7;
    color: #666;
    font-size: 12px;
    padding: 0 8px;
    font-weight: 500;
    z-index: 1;
    margin: 0;
}

.elegento-chat-widget__details-title-divider {
    flex: 1;
    height: 1px;
    background-color: #e0e0e0;
    margin-left: 0;
}

.elegento-chat-widget__details-content {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.elegento-chat-widget__order-summary {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 0 0 0 8px;
}

.elegento-chat-widget__summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 4px 0;
}

.elegento-chat-widget__summary-row:not(:last-child) {
    border-bottom: 1px solid #e9ecef;
}

.elegento-chat-widget__summary-label {
    font-size: 13px;
    color: #666;
    font-weight: 500;
}

.elegento-chat-widget__summary-value {
    font-size: 13px;
    color: #333;
    font-weight: 600;
    padding-block: 2px;
    text-align: end;
}

.elegento-chat-widget__status-message {
    background-color: color-mix(in srgb, var(--chat-widget-primary-color, #a1a1a1) 10%, transparent);
    padding: 12px;
    border-radius: 8px;
    font-size: 13px;
    color: #333;
    line-height: 1.4;
}

.elegento-chat-widget__status-message--pickup {
    background-color: #e8f5e8;
    border-left-color: #2e7d32;
    color: #1b5e20;
}

.elegento-chat-widget__status-message--canceled {
    background-color: #f8d7da;
    color: #721c24;
}

.elegento-chat-widget__status-message--processing {
    background-color: #cce5ff;
    color: #004085;
}

.elegento-chat-widget__status-message--pending {
    background-color: #fff3cd;
    color: #856404;
}

.elegento-chat-widget__status-message--complete {
    background-color: #e8f5e8;
    color: #1b5e20;
}

.elegento-chat-widget__section-title-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.elegento-chat-widget__section-title {
    display: inline-block;
    position: relative;
    background-color: #f7f7f7;
    color: #666;
    font-size: 12px;
    padding: 0 8px 0 0;
    font-weight: 500;
    z-index: 1;
    margin: 0;
}

.elegento-chat-widget__section-title-divider {
    flex: 1;
    height: 1px;
    background-color: #e0e0e0;
    margin-left: 0;
}

.elegento-chat-widget__tracking-info {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 0 12px;
}

.elegento-chat-widget__tracking-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.elegento-chat-widget__tracking-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.elegento-chat-widget__tracking-info-wrapper {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 14px;
    color: black;
}

.elegento-chat-widget__tracking-carrier {
}

.elegento-chat-widget__tracking-carrier::after {
    content: ':';
}

.elegento-chat-widget__tracking-number {
    font-weight: 600;
}

.elegento-chat-widget .elegento-chat-widget__panel .elegento-chat-widget__content .elegento-chat-widget__tracking-info .elegento-chat-widget__tracking-list .elegento-chat-widget__tracking-item a.elegento-chat-widget__tracking-link.elegento-chat-widget__tracking-link--animated[data-tracking-link][data-button-type="tracking"] {
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    color: black;
    font-weight: 500;
    font-size: 14px;
    cursor: pointer;
    transition: color 0.3s ease, text-decoration 0.3s ease;
}

.elegento-chat-widget .elegento-chat-widget__panel .elegento-chat-widget__content .elegento-chat-widget__tracking-item a.elegento-chat-widget__tracking-link.elegento-chat-widget__tracking-link--animated[data-tracking-link] span.elegento-chat-widget__tracking-link-icon.elegento-chat-widget__tracking-link-icon--left[data-tracking-icon] {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.elegento-chat-widget .elegento-chat-widget__panel .elegento-chat-widget__content .elegento-chat-widget__tracking-link-icon .elegento-chat-widget__tracking-link-icon-image {
    display: block;
    width: 20px;
    height: 20px;
    background-color: black;
    -webkit-mask-image: url('../svg/icons/arrow-small-right.svg');
    mask-image: url('../svg/icons/arrow-small-right.svg');
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
    flex-shrink: 0;
    margin-top: 2px;
    rotate: -45deg;
    transition: background-color 0.3s ease;
}

.elegento-chat-widget .elegento-chat-widget__panel .elegento-chat-widget__content .elegento-chat-widget__tracking-item a.elegento-chat-widget__tracking-link:hover {
    color: var(--chat-widget-primary-color, #a1a1a1);
}

.elegento-chat-widget .elegento-chat-widget__panel .elegento-chat-widget__content .elegento-chat-widget__tracking-item a.elegento-chat-widget__tracking-link:hover .elegento-chat-widget__tracking-link-icon .elegento-chat-widget__tracking-link-icon-image {
    background-color: var(--chat-widget-primary-color, #a1a1a1);
}

.elegento-chat-widget .elegento-chat-widget__panel .elegento-chat-widget__content .elegento-chat-widget__tracking-link-icon-copy {
    display: none;
}

.elegento-chat-widget__order-items-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
}

.elegento-chat-widget__items-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.elegento-chat-widget__item {
    display: flex;
    gap: 12px;
    padding: 8px;
    background-color: #fff;
    border-radius: 6px;
    border: 1px solid #e0e0e0;
}

.elegento-chat-widget__item-image {
    width: 40px;
    height: 40px;
    border-radius: 4px;
    object-fit: cover;
    background-color: #f8f9fa;
    flex-shrink: 0;
}

.elegento-chat-widget__item-details {
    flex: 1;
    min-width: 0;
}

.elegento-chat-widget__item-name {
    font-size: 12px;
    font-weight: 500;
    color: #333;
    margin: 0 0 4px 0;
    line-height: 1.3;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.elegento-chat-widget__item-meta {
    font-size: 11px;
    color: #666;
    margin: 0;
}

.elegento-chat-widget__item-price {
    text-align: right;
    font-size: 12px;
    font-weight: 600;
    color: #333;
}

.elegento-chat-widget__addresses {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.elegento-chat-widget__address-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
}

.elegento-chat-widget__address-content {
    font-size: 12px;
    color: #333;
    line-height: 1.4;
}

.elegento-chat-widget__payment-shipping {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

.elegento-chat-widget__method-section {
    background-color: #f8f9fa;
    border-radius: 8px;
    padding: 12px;
}

.elegento-chat-widget__method-content {
    font-size: 12px;
    color: #333;
    line-height: 1.4;
}

/* No Results State */
.elegento-chat-widget__no-results {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 32px 16px;
    text-align: center;
}

.elegento-chat-widget__no-results-icon {
    color: #666;
    margin-bottom: 16px;
    opacity: 0.5;
    flex-shrink: 0;
}

.elegento-chat-widget__no-results-icon img,
.elegento-chat-widget__no-results-icon svg {
    display: block;
    filter: brightness(0) saturate(100%) invert(44%) sepia(0%) saturate(0%) hue-rotate(158deg) brightness(98%) contrast(87%);
    opacity: 0.5;
    flex-shrink: 0;
}

.elegento-chat-widget__no-results-message {
    font-size: 14px;
    color: #666;
    margin: 0 0 16px 0;
    line-height: 1.4;
}

/* Status Color Variations */
.elegento-chat-widget__order-status--pending {
    background-color: #fff3cd;
    color: #856404;
    border-radius: 6px;
    padding-inline: 8px;
}

.elegento-chat-widget__order-status--processing {
    background-color: #cce5ff;
    color: #004085;
    border-radius: 6px;
    padding-inline: 8px;
}

.elegento-chat-widget__order-status--shipped {
    background-color: #d4edda;
    color: #155724;
    border-radius: 6px;
    padding-inline: 8px;
}

.elegento-chat-widget__order-status--complete {
    background-color: #e8f5e8;
    color: #1b5e20;
    border-radius: 6px;
    padding-inline: 8px;
}

.elegento-chat-widget__order-status--canceled {
    background-color: #f8d7da;
    color: #721c24;
    border-radius: 6px;
    padding-inline: 8px;
}

.elegento-chat-widget__order-status--hold {
    background-color: #e2e3e5;
    color: #383d41;
    border-radius: 6px;
    padding-inline: 8px;
}

.elegento-chat-widget__order-status--payment_review {
    background-color: #fff3cd;
    color: #856404;
    border-radius: 6px;
    padding-inline: 8px;
}

/* Accessibility Enhancements */
.elegento-chat-widget__button:focus,
.elegento-chat-widget__input:focus,
.elegento-chat-widget__back-button:focus,
.elegento-chat-widget__view-order-button:focus {
    outline: 2px solid var(--chat-widget-primary-color, #a1a1a1);
    outline-offset: 2px;
}

.elegento-chat-widget__button:disabled:focus {
    outline: none;
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .elegento-chat-widget__input {
        border-width: 2px;
    }

    .elegento-chat-widget__order-result {
        border-width: 2px;
    }

    .elegento-chat-widget__button {
        border: 2px solid currentColor;
    }
}

/* Reduced Motion Support */
@media (prefers-reduced-motion: reduce) {
    .elegento-chat-widget__button,
    .elegento-chat-widget__input,
    .elegento-chat-widget__order-result,
    .elegento-chat-widget__back-button {
        transition: none;
    }

    .elegento-chat-widget__button:hover,
    .elegento-chat-widget__order-result:hover {
        transform: none;
    }
}
