/* assets/css/style.css */
.ps-chat-container { max-width: 700px; margin: 20px auto; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.12); background: #ffffff; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; overflow: hidden; display: flex; flex-direction: column; height: 600px; border: 1px solid #e0e0e0; }
.ps-chat-header { background: #0088cc; color: white; padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.ps-chat-title { font-size: 18px; font-weight: 600; }
.ps-chat-status { font-size: 13px; background: rgba(255,255,255,0.2); padding: 4px 12px; border-radius: 20px; }
.ps-chat-messages { flex: 1; padding: 16px 20px; overflow-y: auto; background: #f0f2f5; display: flex; flex-direction: column; gap: 10px; }
.ps-message { display: flex; align-items: flex-start; max-width: 85%; }
.ps-message.bot { align-self: flex-start; }
.ps-message.user { align-self: flex-end; }
.ps-message-bubble { background: white; padding: 10px 16px; border-radius: 18px; box-shadow: 0 1px 3px rgba(0,0,0,0.08); word-wrap: break-word; line-height: 1.6; font-size: 15px; color: #1c1c1c; }
.ps-message.user .ps-message-bubble { background: #0088cc; color: white; }
.ps-group-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.ps-group-btn { background: #e9ecef; border: none; padding: 6px 16px; border-radius: 20px; font-size: 13px; cursor: pointer; transition: background 0.2s, transform 0.1s; color: #1c1c1c; }
.ps-group-btn:hover { background: #d0d4d8; }
.ps-group-btn:active { transform: scale(0.96); }
.ps-group-btn.selected { background: #0088cc; color: white; }
.ps-product-item { margin: 6px 0; padding: 10px 12px; background: #f8f9fa; border-radius: 12px; border-right: 4px solid #0088cc; }
.ps-message.user .ps-product-item { background: rgba(255,255,255,0.15); border-right-color: #ffffff; }
.ps-product-item strong { display: inline-block; min-width: 100px; font-weight: 600; }
.ps-quick-buy { background: #28a745; border: none; color: #fff; padding: 6px 16px; border-radius: 20px; font-size: 13px; cursor: pointer; margin-top: 6px; transition: background 0.2s; display: inline-block; }
.ps-quick-buy:hover { background: #218838; }
.ps-quick-buy:disabled { opacity: 0.6; cursor: not-allowed; }
#ps-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 9999; display: flex; align-items: center; justify-content: center; overflow-y: auto; padding: 20px; }
#ps-modal-box { background: white; padding: 30px; border-radius: 12px; max-width: 500px; width: 100%; max-height: 90vh; overflow-y: auto; direction: rtl; text-align: right; }
#ps-modal-box h3 { margin-top: 0; border-bottom: 2px solid #0088cc; padding-bottom: 10px; }
.ps-delivery-option { margin: 12px 0; padding: 12px; border: 2px solid #e0e0e0; border-radius: 8px; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.ps-delivery-option:hover { background: #f0f7ff; }
.ps-delivery-option.selected { border-color: #0088cc; background: #e8f4fd; }
.ps-delivery-option label { display: block; font-weight: bold; cursor: pointer; }
.ps-delivery-option .ps-desc { font-size: 13px; color: #555; margin-top: 4px; }
.ps-delivery-option .ps-extra-fields { margin-top: 10px; padding: 10px; background: #f8f9fa; border-radius: 6px; display: none; }
.ps-delivery-option .ps-extra-fields input { width: 100%; padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; margin: 4px 0; }
.ps-delivery-option .ps-extra-fields label { font-weight: normal; font-size: 13px; margin-top: 6px; }
#ps-modal-box .ps-extra-notes { margin-top: 16px; }
#ps-modal-box .ps-extra-notes textarea { width: 100%; padding: 8px 10px; border: 1px solid #ddd; border-radius: 4px; min-height: 60px; font-family: inherit; resize: vertical; }
#ps-modal-box .ps-modal-actions { margin-top: 20px; display: flex; justify-content: center; gap: 12px; }
#ps-modal-box .ps-modal-actions button { border: none; padding: 10px 30px; border-radius: 6px; cursor: pointer; font-size: 16px; }
#ps-modal-confirm { background: #0088cc; color: white; }
#ps-modal-confirm:hover { background: #006699; }
#ps-modal-cancel { background: #ccc; color: #333; }
#ps-modal-cancel:hover { background: #b3b3b3; }
.ps-order-item { padding: 8px 12px; margin: 4px 0; background: #f8f9fa; border-radius: 8px; border-right: 3px solid #0088cc; font-size: 13px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.ps-order-item .ps-order-info { flex: 1; }
.ps-order-item .ps-order-actions { margin-right: 10px; }
.ps-order-item strong { display: inline-block; min-width: 30px; }
.ps-cancel-btn { background: #dc3545; border: none; color: #fff; padding: 4px 12px; border-radius: 12px; font-size: 12px; cursor: pointer; transition: background 0.2s; }
.ps-cancel-btn:hover { background: #c82333; }
.ps-cancel-btn:disabled { opacity: 0.5; cursor: not-allowed; background: #6c757d; }
.ps-return-btn { background: #ffc107; border: none; color: #212529; padding: 4px 12px; border-radius: 12px; font-size: 12px; cursor: pointer; transition: background 0.2s; margin-left: 5px; }
.ps-return-btn:hover { background: #e0a800; }
.ps-return-btn:disabled { opacity: 0.5; cursor: not-allowed; background: #e0e0e0; }
.ps-cancelled-badge { background: #6c757d; color: #fff; padding: 2px 10px; border-radius: 12px; font-size: 11px; }
.ps-return-approved { background: #28a745; color: #fff; padding: 2px 10px; border-radius: 12px; font-size: 11px; }
.ps-return-rejected { background: #dc3545; color: #fff; padding: 2px 10px; border-radius: 12px; font-size: 11px; }
.ps-return-pending { background: #ffc107; color: #212529; padding: 2px 10px; border-radius: 12px; font-size: 11px; }
.ps-chat-input-area { display: flex; padding: 12px 16px; border-top: 1px solid #e0e0e0; background: white; flex-shrink: 0; }
.ps-chat-input-area input { flex: 1; padding: 10px 14px; border: 1px solid #d0d0d0; border-radius: 24px; font-size: 15px; outline: none; transition: border 0.2s; }
.ps-chat-input-area input:focus { border-color: #0088cc; }
.ps-chat-input-area button { background: #0088cc; border: none; color: white; width: 46px; height: 46px; border-radius: 50%; font-size: 20px; margin-left: 10px; cursor: pointer; transition: background 0.2s; display: flex; align-items: center; justify-content: center; }
.ps-chat-input-area button:hover { background: #006699; }
@media (max-width: 600px) {
    .ps-chat-container { height: 85vh; border-radius: 0; margin: 0; border: none; }
    .ps-chat-header { padding: 12px 16px; }
    .ps-chat-title { font-size: 16px; }
    .ps-chat-messages { padding: 12px 14px; }
    .ps-message { max-width: 92%; }
    .ps-message-bubble { font-size: 14px; padding: 8px 14px; }
    .ps-chat-input-area { padding: 8px 12px; }
    .ps-chat-input-area input { font-size: 14px; padding: 8px 12px; }
    .ps-chat-input-area button { width: 42px; height: 42px; font-size: 18px; }
    .ps-group-btn { font-size: 12px; padding: 4px 12px; }
    .ps-quick-buy { font-size: 12px; padding: 4px 12px; }
    #ps-modal-box { padding: 20px; }
    .ps-order-item { flex-direction: column; align-items: stretch; }
    .ps-order-item .ps-order-actions { margin-right: 0; margin-top: 6px; }
}
