.wpcs-product-actions {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(112px, 1fr);
    gap: 10px;
    padding: 14px 15px;
    border-top: 1px solid #eee;
    background: #fff;
}

.wr-projectprice + .wpcs-product-actions,
.wr-projectprice .wpcs-product-actions,
.wr-projectprice ~ .wpcs-product-actions {
    margin-top: 12px;
    border: 1px solid #eee;
    border-radius: 10px;
}

.wpcs-product-actions--single {
    grid-template-columns: 1fr;
}

.wpcs-product-action {
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 14px;
    border: 1px solid #e3e3e3;
    border-radius: 7px;
    background: #fff;
    color: #0a0f26;
    font: inherit;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
    transition: border-color .2s ease, background-color .2s ease, color .2s ease, transform .2s ease;
}

.wpcs-product-action:hover,
.wpcs-product-action:focus-visible {
    border-color: #ffb800;
    background: #fff9e8;
    color: #0a0f26;
    outline: none;
}

.wpcs-product-action:active {
    transform: translateY(1px);
}

.wpcs-product-action i {
    font-size: 18px;
}

body.wpcs-dialog-open {
    overflow: hidden;
}

.wpcs-dialog[hidden] {
    display: none !important;
}

.wpcs-dialog {
    position: fixed;
    inset: 0;
    z-index: 999999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.wpcs-dialog__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(10, 15, 38, .58);
}

.wpcs-dialog__panel {
    position: relative;
    width: min(560px, 100%);
    max-height: calc(100vh - 40px);
    overflow: auto;
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 20px 60px rgba(10, 15, 38, .24);
}

.wpcs-dialog__panel--share {
    width: min(460px, 100%);
    padding-bottom: 18px;
}

.wpcs-dialog__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 20px 22px;
    border-bottom: 1px solid #eee;
}

.wpcs-dialog__header h3 {
    margin: 0;
    color: #0a0f26;
    font-size: 20px;
    line-height: 1.35;
}

.wpcs-dialog__close {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 50%;
    background: #f5f5f5;
    color: #0a0f26;
    cursor: pointer;
}

.wpcs-message-form {
    padding: 22px;
}

.wpcs-message-form > label {
    display: block;
    margin: 18px 0 8px;
    color: #0a0f26;
    font-weight: 600;
}

.wpcs-message-form textarea {
    width: 100%;
    min-height: 140px;
    resize: vertical;
    padding: 13px 14px;
    border: 1px solid #ddd;
    border-radius: 7px;
    background: #fff;
    color: #0a0f26;
    font: inherit;
    line-height: 1.5;
}

.wpcs-message-form textarea:focus {
    border-color: #ffb800;
    outline: 2px solid rgba(255, 184, 0, .18);
}

.wpcs-product-reference {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    background: #f7f7f7;
}

.wpcs-product-reference__image {
    width: 72px;
    height: 72px;
    flex: 0 0 72px;
    display: block;
    overflow: hidden;
    border-radius: 8px;
}

.wpcs-product-reference__image > img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.wpcs-product-reference__content {
    min-width: 0;
    flex: 1 1 auto;
}

.wpcs-product-reference__content > span {
    display: block;
    margin-bottom: 3px;
    color: #676b7c;
    font-size: 12px;
}

.wpcs-product-reference__title {
    display: block;
    overflow: hidden;
    color: #0a0f26;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.4;
    text-decoration: none;
    text-overflow: ellipsis;
}

.wpcs-product-reference__title:hover,
.wpcs-product-reference__title:focus-visible {
    color: #b37f00;
    text-decoration: none;
    outline: none;
}

.wpcs-product-reference__seller {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    margin-top: 7px;
    color: #676b7c;
    font-size: 12px;
    line-height: 1.3;
}

.wpcs-product-reference__seller img {
    width: 22px;
    height: 22px;
    flex: 0 0 22px;
    border-radius: 50%;
    object-fit: cover;
}

.wpcs-product-reference__seller span,
.wpcs-product-reference__seller strong {
    white-space: nowrap;
}

.wpcs-product-reference__seller strong {
    overflow: hidden;
    color: #0a0f26;
    font-weight: 600;
    text-overflow: ellipsis;
}

.wpcs-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}

.wpcs-secondary-button,
.wpcs-submit-button {
    min-height: 44px;
    padding: 10px 18px;
    border-radius: 7px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.wpcs-secondary-button {
    border: 1px solid #ddd;
    background: #fff;
    color: #0a0f26;
}

.wpcs-submit-button {
    border: 0;
}

.wpcs-submit-button[disabled] {
    cursor: wait;
    opacity: .72;
}

.wpcs-form-status {
    min-height: 20px;
    margin: 10px 0 0;
    color: #168448;
    font-size: 13px;
    line-height: 1.45;
}

.wpcs-form-status.is-error {
    color: #c62f3a;
}

.wpcs-share-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 20px 22px 8px;
}

.wpcs-share-option {
    min-height: 86px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 8px;
    border: 1px solid #e5e5e5;
    border-radius: 9px;
    background: #fff;
    color: #0a0f26;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
}

.wpcs-share-option:hover,
.wpcs-share-option:focus-visible {
    border-color: #ffb800;
    background: #fff9e8;
    outline: none;
}

.wpcs-share-option i {
    font-size: 22px;
}

.wpcs-dialog__panel--share .wpcs-form-status {
    padding: 0 22px;
}

@media (max-width: 575px) {
    .wpcs-product-actions {
        grid-template-columns: 1fr;
    }

    .wpcs-dialog {
        align-items: flex-end;
        padding: 0;
    }

    .wpcs-dialog__panel {
        width: 100%;
        max-height: 90vh;
        border-radius: 14px 14px 0 0;
    }

    .wpcs-dialog__header,
    .wpcs-message-form {
        padding-left: 18px;
        padding-right: 18px;
    }

    .wpcs-share-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        padding-left: 18px;
        padding-right: 18px;
    }
}

/* Persistent product context shown inside WP Guppy product conversations. */
.at-chat_messages > .wpcs-chat-product-card {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    gap: 14px;
    min-width: 0;
    padding: 12px 20px;
    border-bottom: 1px solid #eee;
    background: #fff;
    box-shadow: 0 1px 0 rgba(10, 15, 38, .02);
}

.wpcs-chat-product-card__image {
    width: 74px;
    height: 62px;
    flex: 0 0 74px;
    display: block;
    overflow: hidden;
    border-radius: 8px;
    background: #f4f4f4;
}

.wpcs-chat-product-card__image img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.wpcs-chat-product-card__content {
    min-width: 0;
    flex: 1 1 auto;
}

.wpcs-chat-product-card__eyebrow {
    display: block;
    margin-bottom: 2px;
    color: #676b7c;
    font-size: 11px;
    font-weight: 600;
    line-height: 1.35;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.wpcs-chat-product-card__title {
    display: block;
    overflow: hidden;
    color: #0a0f26;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.35;
    text-decoration: none;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.wpcs-chat-product-card__title:hover,
.wpcs-chat-product-card__title:focus-visible {
    color: #b37f00;
    text-decoration: none;
    outline: none;
}

.wpcs-chat-product-card__price {
    margin-top: 3px;
    color: #0a0f26;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
}

.wpcs-chat-product-card__price del {
    margin-right: 4px;
    color: #858899;
    font-weight: 400;
}

.wpcs-chat-product-card__price ins {
    text-decoration: none;
}

.wpcs-chat-product-card__seller {
    display: flex;
    align-items: center;
    gap: 5px;
    min-width: 0;
    margin-top: 5px;
    color: #676b7c;
    font-size: 11px;
    line-height: 1.3;
}

.wpcs-chat-product-card__seller img {
    width: 20px;
    height: 20px;
    flex: 0 0 20px;
    border-radius: 50%;
    object-fit: cover;
}

.wpcs-chat-product-card__seller span,
.wpcs-chat-product-card__seller strong {
    white-space: nowrap;
}

.wpcs-chat-product-card__seller strong {
    overflow: hidden;
    color: #0a0f26;
    font-weight: 600;
    text-overflow: ellipsis;
}

.wpcs-chat-product-card__link {
    min-height: 38px;
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 13px;
    border: 1px solid #ffb800;
    border-radius: 7px;
    background: #fff9e8;
    color: #0a0f26;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: background-color .2s ease, border-color .2s ease;
}

.wpcs-chat-product-card__link:hover,
.wpcs-chat-product-card__link:focus-visible {
    border-color: #e5a600;
    background: #ffb800;
    color: #0a0f26;
    text-decoration: none;
    outline: none;
}

@media (max-width: 767px) {
    .at-chat_messages > .wpcs-chat-product-card {
        gap: 10px;
        padding: 10px 12px;
    }

    .wpcs-chat-product-card__image {
        width: 58px;
        height: 54px;
        flex-basis: 58px;
    }

    .wpcs-chat-product-card__seller {
        display: none;
    }

    .wpcs-chat-product-card__link {
        min-height: 34px;
        padding: 7px 10px;
        font-size: 11px;
    }
}

@media (max-width: 479px) {
    .wpcs-chat-product-card__image {
        display: none;
    }

    .wpcs-chat-product-card__title {
        max-width: 100%;
        font-size: 13px;
    }

    .wpcs-chat-product-card__link {
        max-width: 92px;
    }
}
