@import url('https://fonts.googleapis.com/css2?family=Noto+Color+Emoji&display=swap');

#ps-livechat-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    left: auto;
    z-index: 100;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
}

#ps-livechat-container.ps-livechat-position-ready {
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
}

#ps-livechat-toggle {
    border-radius: 50%;
    width: 60px;
    height: 60px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 24px;
    position: relative;
}

#ps-livechat-toggle.ps-livechat-toggle-btn {
    width: 60px;
    min-width: 60px;
    max-width: 60px;
    height: 60px;
    min-height: 60px;
    max-height: 60px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(135deg, #1f7ae0 0%, #0b5ed7 100%);
    color: #fff;
    box-shadow: 0 10px 24px rgba(11, 94, 215, 0.34);
    appearance: none;
    cursor: pointer;
    line-height: 1;
}

#ps-livechat-toggle.ps-livechat-toggle-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 28px rgba(11, 94, 215, 0.4);
}

#ps-livechat-toggle.ps-livechat-toggle-btn:focus-visible {
    outline: 2px solid rgba(11, 94, 215, 0.28);
    outline-offset: 3px;
}

.ps-livechat-toggle-icon {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ps-livechat-toggle-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
}

#ps-livechat-toggle .notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background-color: red;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    font-size: 12px;
    display: flex;
    justify-content: center;
    align-items: center;
}

#ps-livechat-toggle .notification-badge.is-flashing {
    animation: ps-livechat-badge-pulse 1s ease-in-out infinite;
}

@keyframes ps-livechat-badge-pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(255, 0, 0, 0.6);
    }
    50% {
        transform: scale(1.15);
        box-shadow: 0 0 0 6px rgba(255, 0, 0, 0);
    }
}

#ps-livechat-window {
    position: fixed;
    right: 20px;
    bottom: 96px;
    left: auto;
    width: 350px;
    height: 640px;
    max-width: calc(100vw - 16px);
    max-height: calc(100vh - 16px);
    background: white;
    border-radius: 10px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    z-index: 10000;
}

.card-header {
    padding: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: move;
}

#ps-livechat-title-wrap {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 3px;
}

.ps-livechat-title-row {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ps-livechat-service-status {
    display: inline-flex;
    flex-direction: column;
    gap: 2px;
    font-size: 11px;
    line-height: 1.35;
}

.ps-livechat-service-status.is-human {
    color: rgba(255, 255, 255, 0.96);
}

.ps-livechat-service-status.is-ai {
    color: rgba(255, 255, 255, 0.92);
}

.ps-livechat-service-status.is-offline {
    color: rgba(255, 255, 255, 0.82);
}

#ps-livechat-service-status-text {
    font-weight: 600;
}

#ps-livechat-service-status-hint {
    opacity: 0.9;
}

.card-body {
    flex: 1;
    overflow-y: auto;
    padding: 10px;
    background: #f8f9fa;
}

#ps-livechat-loading {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.ps-livechat-loading-icon {
    width: 18px;
    height: 18px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    animation: ps-livechat-spin 0.9s linear infinite;
}

.ps-livechat-loading-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
}

.ps-livechat-loading-label {
    display: inline-block;
}

.card-footer {
    padding: 10px;
    border-top: 1px solid #ddd;
    position: relative;
    background: #f3f3f3;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.ps-livechat-composer {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    flex-wrap: nowrap;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
}

.ps-livechat-composer .form-control {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
    font-size: 16px;
}

.ps-livechat-send-wrap {
    display: flex;
    flex: 0 0 auto;
    align-items: center;
    min-width: 0;
    max-width: 100%;
    box-sizing: border-box;
}

.ps-livechat-send-btn {
    width: 48px;
    min-width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 0;
    border: 0;
    border-radius: 12px;
    background: #0b5ed7;
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(11, 94, 215, 0.24);
    appearance: none;
    cursor: pointer;
    line-height: 1;
}

.ps-livechat-send-btn:hover {
    background: #0a53be;
}

.ps-livechat-send-btn:focus-visible {
    outline: 2px solid rgba(11, 94, 215, 0.28);
    outline-offset: 2px;
}

.ps-livechat-send-icon {
    width: 20px;
    height: 20px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.ps-livechat-send-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
}

.ps-livechat-tools-panel {
    display: none;
    margin-bottom: 8px;
    border: 1px solid #d8d8d8;
    border-radius: 10px;
    background: #efefef;
    padding: 10px;
}

.ps-livechat-tools-panel.is-open {
    display: block;
}

.ps-livechat-tools-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
}

.ps-livechat-tools-row .btn {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 6px;
    min-height: 56px;
    height: 56px;
    padding: 8px 10px;
    white-space: normal;
    text-align: center;
    border: 1px solid #6f7984;
    background: #7c8591;
    color: #ffffff;
    box-sizing: border-box;
    cursor: pointer;
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.ps-livechat-tool-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    min-width: 20px;
    min-height: 20px;
    line-height: 1;
    font-size: 20px;
    flex: 0 0 20px;
}

.ps-livechat-tool-icon .material-icons {
    font-size: 20px;
}

.ps-livechat-tool-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
}

.ps-livechat-tool-label {
    display: block;
    font-size: 12px;
    line-height: 1.2;
    color: inherit;
}

.ps-livechat-tools-toggle {
    position: absolute;
    top: -26px;
    right: 10px;
    width: 50px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    background: #f3f3f3;
    color: #7c8591;
}

.ps-livechat-tools-toggle-left-border {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 72%;
    background: #ddd;
}

.ps-livechat-tools-toggle-top-border {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: #ddd;
}

.ps-livechat-tools-toggle-right-border {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 1px;
    height: 72%;
    background: #ddd;
}

.ps-livechat-tools-toggle:hover,
.ps-livechat-tools-toggle:focus {
    border: 1px solid transparent;
    background: #f3f3f3;
    color: #7c8591;
}

.ps-livechat-tools-row .btn:hover,
.ps-livechat-tools-row .btn:focus,
.ps-livechat-tools-row .btn:focus-visible {
    border-color: #5f6974;
    background: #6f7883;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(53, 62, 73, 0.22);
    transform: translateY(-1px);
}

.ps-livechat-tools-toggle-arrow {
    width: 12px;
    height: 12px;
    border-top: 3px solid currentColor;
    border-right: 3px solid currentColor;
    transform: rotate(-45deg);
    transition: transform 0.18s ease;
    margin-top: 4px;
}

.ps-livechat-tools-toggle[aria-expanded="true"] .ps-livechat-tools-toggle-arrow {
    transform: rotate(-45deg);
}

.ps-livechat-tools-toggle[aria-expanded="false"] .ps-livechat-tools-toggle-arrow {
    transform: rotate(135deg);
    margin-top: -4px;
}

.ps-livechat-notice {
    margin: 0 10px 10px;
    padding: 10px 12px;
    border-radius: 8px;
    font-size: 13px;
    line-height: 1.4;
}

.ps-livechat-notice.is-info {
    background: #eef6ff;
    color: #0f4c81;
    border: 1px solid #c9e0ff;
}

.ps-livechat-notice.is-success {
    background: #ecfdf3;
    color: #166534;
    border: 1px solid #b7efc5;
}

.product-actions__button.consult {
    display: flex;
    width: 100%;
    flex: 1 1 100%;
}

.product-actions__button.consult .btn {
    width: 100%;
    min-height: 48px;
    padding: 0.875rem 1.125rem;
    font-size: inherit;
    line-height: 1.2;
}

.ps-livechat-consult-inline {
    width: 100%;
    margin-top: 8px;
}

.product-actions__button.consult.ps-livechat-consult-stacked,
.ps-livechat-consult-inline.ps-livechat-consult-stacked {
    width: 100%;
    flex: 0 0 100%;
    margin-top: 12px;
}

.ps-livechat-consult-inline .btn {
    width: 100%;
    min-height: 48px;
    padding: 0.875rem 1.125rem;
    font-size: inherit;
    line-height: 1.2;
}

.js-ps-livechat-consult {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    white-space: normal;
    text-align: center;
    box-sizing: border-box;
}

.ps-livechat-inline-button-icon {
    width: 1.125em;
    height: 1.125em;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 1.125em;
}

.ps-livechat-inline-button-icon svg {
    width: 100%;
    height: 100%;
    display: block;
    fill: currentColor;
}

.ps-livechat-inline-button-label {
    display: inline-block;
    line-height: 1.2;
}

@keyframes ps-livechat-spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.card-footer .input-group-append .btn,
.card-footer .ps-livechat-send-wrap .ps-livechat-send-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

#ps-livechat-emoji-panel {
    position: fixed;
    top: 0;
    left: 0;
    background: #fff;
    border: 1px solid #dfe3e8;
    border-radius: 8px;
    padding: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.16);
    z-index: 10002;
    max-width: 250px;
    font-family: 'Noto Color Emoji', 'Fluent Emoji', 'Segoe UI Emoji', 'Apple Color Emoji', sans-serif;
}

#ps-livechat-emoji-panel .ps-livechat-emoji-btn {
    border: 0;
    background: transparent;
    font-size: 18px;
    line-height: 1;
    padding: 4px;
    border-radius: 4px;
    font-family: 'Noto Color Emoji', 'Fluent Emoji', 'Segoe UI Emoji', 'Apple Color Emoji', sans-serif;
}

#ps-livechat-emoji-panel .ps-livechat-emoji-btn:hover {
    background: #f3f5f7;
}

.message {
    margin-bottom: 10px;
    max-width: 88%;
    display: flex;
    gap: 8px;
}

.message.sent {
    margin-left: auto;
    justify-content: flex-end;
}

.message.received {
    margin-right: auto;
    justify-content: flex-start;
}

.message.received .message-content {
    order: 2;
}

.message.received .message-avatar {
    order: 1;
}

.message-content {
    padding: 8px 12px;
    border-radius: 15px;
    max-width: calc(100% - 34px);
    word-break: break-word;
    overflow: hidden;
}

.message-content p:last-child {
    margin-bottom: 0;
}

.ps-livechat-table-wrap {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    margin: 6px 0;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.55);
}

.message-content table {
    width: max-content;
    min-width: 100%;
    max-width: none;
    border-collapse: collapse;
    table-layout: auto;
    font-size: 12px;
    line-height: 1.45;
}

.message-content th,
.message-content td {
    padding: 7px 9px;
    border: 1px solid rgba(148, 163, 184, 0.35);
    vertical-align: top;
    white-space: nowrap;
}

.message-content th {
    white-space: nowrap;
    font-weight: 700;
}

.message-content td {
    min-width: 84px;
    overflow-wrap: normal;
    word-break: normal;
}

.ps-livechat-message-meta {
    margin-top: 4px;
    font-size: 11px;
    opacity: 0.8;
    text-align: right;
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 6px;
    flex-wrap: wrap;
}

.ps-livechat-message-meta.is-failed {
    opacity: 1;
    color: #ffe1e1;
}

.message.received .ps-livechat-message-meta.is-failed {
    color: #b42318;
}

.ps-livechat-message-retry {
    border: 0;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    color: #0d6efd;
    background: rgba(255, 255, 255, 0.88);
}

.message.received .ps-livechat-message-retry {
    background: rgba(13, 110, 253, 0.1);
}

.ps-livechat-time-separator {
    display: table;
    margin: 14px auto 12px;
    padding: 4px 10px;
    border-radius: 999px;
    text-align: center;
    font-size: 11px;
    line-height: 1.4;
    color: #6b7280;
    background: rgba(148, 163, 184, 0.14);
    box-shadow: inset 0 0 0 1px rgba(148, 163, 184, 0.2);
}

.ps-livechat-status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    display: inline-block;
    margin-left: 6px;
    border: 1px solid rgba(255, 255, 255, 0.55);
}

.ps-livechat-status-dot.online {
    background: #00ff33;
}

.ps-livechat-status-dot.ai {
    background: #ffcf4d;
}

.ps-livechat-status-dot.offline {
    background: #9b9b9b;
}

.message.sent .message-content {
    background-color: #007bff;
    color: #ffffff;
    border-bottom-right-radius: 0;
}

.message.received .message-content {
    background-color: #e9ecef;
    color: #000000;
    border-bottom-left-radius: 0;
}

.message.message-ai .message-avatar {
    background-color: #6f42c1;
    font-size: 14px;
    line-height: 28px;
}
.message.message-ai .message-content {
    background-color: #f3f0ff;
}

.message-avatar {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #6c757d;
    color: #ffffff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 700;
    flex: 0 0 26px;
}

.message img {
    max-width: 100%;
    border-radius: 5px;
    cursor: zoom-in;
}

.ps-livechat-order-card {
    border: 1px solid #d9dee3;
    border-radius: 8px;
    background: #ffffff;
    padding: 8px;
    min-width: 210px;
    color: #2e3a46;
}

.ps-livechat-order-card.clickable {
    cursor: pointer;
}

.ps-livechat-order-title {
    font-weight: 700;
    margin-bottom: 4px;
}

.ps-livechat-order-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin: 8px 0;
}

.ps-livechat-order-item img,
.ps-livechat-order-item-image-empty {
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 1px solid #d9dee3;
    object-fit: cover;
    flex: 0 0 40px;
}

.ps-livechat-order-item-image-empty {
    background: #f3f5f7;
}

.ps-livechat-order-item-main {
    min-width: 0;
}

.ps-livechat-order-item-title {
    font-weight: 600;
    line-height: 1.35;
}

.ps-livechat-order-item-meta {
    font-size: 12px;
}

.ps-livechat-order-picker {
    position: absolute;
    inset: 56px 10px 78px;
    z-index: 3;
    background: rgba(255, 255, 255, 0.98);
    border: 1px solid #d9dee3;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.ps-livechat-order-picker-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 12px;
    border-bottom: 1px solid #e5e7eb;
}

.ps-livechat-order-picker-close {
    border: 0;
    background: transparent;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    color: #6b7280;
}

.ps-livechat-order-picker-state {
    flex: 1 1 auto;
    min-height: 0;
    padding: 20px 12px;
    text-align: center;
    color: #6b7280;
    font-size: 13px;
}

.ps-livechat-order-picker-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    padding: 10px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ps-livechat-order-picker-footer {
    flex: 0 0 auto;
    position: sticky;
    bottom: 0;
    padding: 10px 12px 12px;
    border-top: 1px solid #e5e7eb;
    background: #f3f3f3;
    z-index: 1;
}

.ps-livechat-order-picker-close-bottom {
    width: 100%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 9px 14px;
    border: 1px solid #1d6fe8;
    border-radius: 8px;
    background: linear-gradient(180deg, #2a86ff 0%, #0d6efd 100%);
    color: #ffffff;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.01em;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.22);
    transition: background-color 0.18s ease, border-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.ps-livechat-order-picker-close-bottom:hover,
.ps-livechat-order-picker-close-bottom:focus,
.ps-livechat-order-picker-close-bottom:focus-visible {
    background: linear-gradient(180deg, #1978f5 0%, #0b5ed7 100%);
    border-color: #0b5ed7;
    color: #ffffff;
    box-shadow: 0 6px 14px rgba(13, 110, 253, 0.28);
    transform: translateY(-1px);
}

.ps-livechat-order-picker-item {
    width: 100%;
    border: 1px solid #d9dee3;
    background: #ffffff;
    border-radius: 8px;
    padding: 10px;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ps-livechat-order-picker-item:hover {
    border-color: #007bff;
    box-shadow: 0 4px 12px rgba(0, 123, 255, 0.12);
    transform: translateY(-1px);
}

.ps-livechat-order-picker-main,
.ps-livechat-order-picker-meta {
    display: flex;
    justify-content: space-between;
    gap: 8px;
}

.ps-livechat-order-picker-main {
    margin-bottom: 4px;
    color: #1f2937;
}

.ps-livechat-order-picker-meta {
    font-size: 12px;
    color: #6b7280;
}

#ps-livechat-auth-modal {
    position: fixed;
    inset: 0;
    z-index: 100001;
    display: none;
}

.ps-livechat-auth-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
}

.ps-livechat-auth-dialog {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(360px, 90vw);
    background: #fff;
    border-radius: 8px;
    padding: 30px;
    text-align: left;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
}

#ps-livechat-auth-close {
    position: absolute;
    top: 10px;
    right: 15px;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    background: none;
    border: none;
    padding: 0;
}

#ps-livechat-close {
    width: 28px;
    height: 28px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.18);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.2s ease;
}

#ps-livechat-close:hover {
    background: rgba(255, 255, 255, 0.32);
    transform: scale(1.05);
}

#ps-livechat-close:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.4);
}

.ps-livechat-auth-dialog h4 {
    margin-bottom: 5px;
    font-weight: 600;
}

.ps-livechat-auth-dialog .form-group {
    margin-bottom: 15px;
}

.ps-livechat-auth-dialog .form-control {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 16px;
}

.ps-livechat-auth-dialog .btn-block {
    width: 100%;
    padding: 10px;
    margin-top: 10px;
}

.ps-livechat-google-btn {
    display: table;
    margin-top: 0;
    margin-left: auto;
    margin-right: auto;
}

.ps-livechat-auth-divider {
    display: flex;
    align-items: center;
    text-align: center;
    color: #6c757d;
    font-size: 12px;
    margin: 14px 0;
}

.ps-livechat-auth-divider::before,
.ps-livechat-auth-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

.ps-livechat-auth-divider span {
    padding: 0 8px;
}

.ps-livechat-auth-dialog .small {
    font-size: 13px;
    /* color: #6c757d; */
}

.ps-livechat-auth-dialog a {
    color: #007bff;
    text-decoration: none;
}

.ps-livechat-auth-dialog a:hover {
    text-decoration: underline;
}

.ps-livechat-auth-dialog .form-check-inline {
    margin-right: 15px;
}

#ps-livechat-image-viewer {
    position: fixed;
    inset: 0;
    z-index: 100002;
    display: none;
}

.ps-livechat-image-viewer-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

#ps-livechat-image-viewer-img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    max-width: 90vw;
    max-height: 90vh;
    border-radius: 6px;
}

/* Responsive */
@media (min-width: 769px) {
    .product-quantity.flex-container {
        gap: 12px;
    }

    .product-quantity.flex-container > .qty.flex-container #quantity_wanted,
    .product-quantity.flex-container > .qty.flex-container .input-group {
        width: 100%;
        max-width: none;
    }
}

@media (max-width: 768px) {
    #ps-livechat-container {
        right: 12px;
        left: auto;
        bottom: calc(env(safe-area-inset-bottom, 0px) + 12px);
    }

    #ps-livechat-toggle.ps-livechat-toggle-btn {
        width: 60px;
        min-width: 60px;
        max-width: 60px;
        height: 60px;
        min-height: 60px;
        max-height: 60px;
    }

    .product-actions__button.consult.ps-livechat-consult-stacked,
    .ps-livechat-consult-inline.ps-livechat-consult-stacked {
        margin-top: 12px;
    }
}

@media (max-width: 768px) {
    #ps-livechat-window {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        left: 0;
        top: 0;
        bottom: auto;
        right: auto;
        position: fixed;
        border-radius: 0;
    }

    .ps-livechat-tools-row {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .ps-livechat-tools-row .btn {
        min-height: 60px;
        height: 60px;
        padding: 10px 8px;
    }

    .ps-livechat-tool-label {
        font-size: 11px;
    }

    .message {
        max-width: 94%;
    }

    .message-content {
        padding: 8px 10px;
    }

    .message-content table {
        font-size: 11px;
    }

    .message-content th,
    .message-content td {
        padding: 6px 8px;
    }

    .ps-livechat-composer {
        gap: 8px;
    }

    .ps-livechat-send-btn {
        width: 44px;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
    }

    .product-quantity.flex-container {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 12px;
        margin-bottom: 12px;
    }

    .product-quantity.flex-container > .qty.flex-container,
    .product-quantity.flex-container > .add.flex-container.align-items-center {
        width: 100%;
        max-width: none;
    }

    .product-quantity.flex-container > .qty.flex-container {
        display: block;
    }

    .product-quantity.flex-container > .qty.flex-container #quantity_wanted,
    .product-quantity.flex-container > .qty.flex-container .input-group {
        display: block;
        width: 100%;
        min-width: 0;
        min-height: 48px;
        height: 48px;
        margin: 0;
        padding: 0 12px;
        box-sizing: border-box;
        text-align: center;
        line-height: 48px;
    }

    .product-quantity.flex-container > .add.flex-container.align-items-center {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        flex-wrap: nowrap !important;
        gap: 12px;
    }

    .product-quantity.flex-container > .add.flex-container.align-items-center > .add-to-cart,
    .product-quantity.flex-container > .add.flex-container.align-items-center > .ps-livechat-consult-inline,
    .product-quantity.flex-container > .add.flex-container.align-items-center > .ps-livechat-consult-inline.ps-livechat-consult-stacked {
        width: 100%;
        flex: 0 0 auto;
    }

    .product-quantity.flex-container > .add.flex-container.align-items-center > .add-to-cart {
        min-height: 48px;
        height: 48px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0 16px;
        box-sizing: border-box;
    }

    .product-quantity.flex-container > .add.flex-container.align-items-center > .ps-livechat-consult-inline,
    .product-quantity.flex-container > .add.flex-container.align-items-center > .ps-livechat-consult-inline.ps-livechat-consult-stacked {
        margin-top: 0 !important;
    }

    .product-quantity.flex-container > .add.flex-container.align-items-center .js-ps-livechat-consult {
        min-height: 48px;
        height: 48px;
        justify-content: center;
    }

    /* .card-footer {
        padding-top: 64px;
    } */
}
