.ps2-chat-container { max-width: 700px; margin: 20px auto; border-radius: 16px; box-shadow: 0 4px 20px rgba(0,0,0,0.12); background: #fff; 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; }
.ps2-chat-header { background: #0088cc; color: white; padding: 14px 20px; display: flex; justify-content: space-between; align-items: center; flex-shrink: 0; }
.ps2-chat-title { font-size: 18px; font-weight: 600; }
.ps2-chat-status { font-size: 13px; background: rgba(255,255,255,0.2); padding: 4px 12px; border-radius: 20px; }
.ps2-chat-messages { flex: 1; padding: 16px 20px; overflow-y: auto; background: #f0f2f5; display: flex; flex-direction: column; gap: 10px; }
.ps2-message { display: flex; align-items: flex-start; max-width: 85%; }
.ps2-message.bot { align-self: flex-start; }
.ps2-message.user { align-self: flex-end; }
.ps2-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; }
.ps2-message.user .ps2-message-bubble { background: #0088cc; color: white; }
.ps2-group-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.ps2-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; }
.ps2-group-btn:hover { background: #d0d4d8; }
.ps2-group-btn:active { transform: scale(0.96); }
.ps2-group-btn.selected { background: #0088cc; color: white; }
.ps2-product-item { margin: 6px 0; padding: 10px 12px; background: #f8f9fa; border-radius: 12px; border-right: 4px solid #0088cc; }
.ps2-product-item.ps2-oos-item { border-right-color: #dc3545; background: #fdf0f0; }
.ps2-message.user .ps2-product-item { background: rgba(255,255,255,0.15); border-right-color: #fff; }
.ps2-product-item strong { display: inline-block; min-width: 100px; font-weight: 600; }
.ps2-product-badge { display: block; width: 100%; box-sizing: border-box; text-align: center; color: #fff; font-weight: 800; font-size: 15px; padding: 9px 14px; border-radius: 10px; margin: 0 0 10px 0; letter-spacing: 0.3px; box-shadow: 0 2px 6px rgba(0,0,0,0.25); text-shadow: 0 1px 2px rgba(0,0,0,0.35); }
.ps2-oos-badge { display: block; width: 100%; box-sizing: border-box; text-align: center; background: #dc3545; color: #fff; font-weight: 800; font-size: 15px; padding: 9px 14px; border-radius: 10px; margin: 0 0 10px 0; letter-spacing: 0.3px; box-shadow: 0 2px 6px rgba(0,0,0,0.25); text-shadow: 0 1px 2px rgba(0,0,0,0.35); }
.ps2-score-badge { display: inline-block; background: #e8f4fd; color: #00699e; border-radius: 12px; padding: 2px 10px; font-size: 11px; font-weight: 700; margin-bottom: 4px; }
.ps2-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; }
.ps2-quick-buy:hover { background: #218838; }
.ps2-quick-buy:disabled { opacity: 0.5; cursor: not-allowed; background: #6c757d; }
.ps2-fuzzy-header { margin: 10px 0 4px; padding: 8px 14px; background: #2a1f0d; color: #fbbf24; border-radius: 10px; text-align: center; font-size: 13px; font-weight: 600; }
.ps2-oos-header { margin: 10px 0 4px; padding: 8px 14px; background: #fdf0f0; color: #dc3545; border: 1px dashed #dc3545; border-radius: 10px; text-align: center; font-size: 13px; font-weight: 700; }
.ps2-product-item.ps2-fuzzy { background: #3a2a12; border-right-color: #f59e0b; color: #fbbf24; }
.ps2-product-item.ps2-fuzzy strong { color: #fde68a; }
.ps2-show-more-btn { display: block; width: 100%; margin: 10px 0 4px; padding: 10px 16px; background: #fff7ed; border: 1px dashed #f59e0b; color: #b45309; border-radius: 12px; font-size: 14px; font-weight: 600; cursor: pointer; transition: background 0.2s; text-align: center; }
.ps2-show-more-btn:hover { background: #ffedd5; }
.ps2-oos-btn { display: block; width: 100%; margin: 10px 0 4px; padding: 10px 16px; background: #fdf0f0; border: 1px dashed #dc3545; color: #dc3545; border-radius: 12px; font-size: 14px; font-weight: 700; cursor: pointer; transition: background 0.2s; text-align: center; }
.ps2-oos-btn:hover { background: #fbe3e4; }
#ps2-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; }
#ps2-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; }
#ps2-modal-box h3 { margin-top: 0; border-bottom: 2px solid #0088cc; padding-bottom: 10px; }
.ps2-delivery-option { margin: 12px 0; padding: 12px; border: 2px solid #e0e0e0; border-radius: 8px; cursor: pointer; transition: border-color 0.2s, background 0.2s; }
.ps2-delivery-option:hover { background: #f0f7ff; }
.ps2-delivery-option.selected { border-color: #0088cc; background: #e8f4fd; }
.ps2-delivery-option label { display: block; font-weight: bold; cursor: pointer; }
.ps2-delivery-option .ps2-desc { font-size: 13px; color: #555; margin-top: 4px; }
.ps2-delivery-option .ps2-extra-fields { margin-top: 10px; padding: 10px; background: #f8f9fa; border-radius: 6px; display: none; }
.ps2-delivery-option .ps2-extra-fields input { width: 100%; padding: 6px 10px; border: 1px solid #ddd; border-radius: 4px; margin: 4px 0; }
.ps2-delivery-option .ps2-extra-fields label { font-weight: normal; font-size: 13px; margin-top: 6px; }
#ps2-modal-box .ps2-extra-notes { margin-top: 16px; }
#ps2-modal-box .ps2-extra-notes textarea { width: 100%; padding: 8px 10px; border: 1px solid #ddd; border-radius: 4px; min-height: 60px; font-family: inherit; resize: vertical; }
#ps2-modal-box .ps2-modal-actions { margin-top: 20px; display: flex; justify-content: center; gap: 12px; }
#ps2-modal-box .ps2-modal-actions button { border: none; padding: 10px 30px; border-radius: 6px; cursor: pointer; font-size: 16px; }
#ps2-modal-confirm { background: #0088cc; color: white; }
#ps2-modal-confirm:hover { background: #006699; }
#ps2-modal-cancel { background: #ccc; color: #333; }
#ps2-modal-cancel:hover { background: #b3b3b3; }
.ps2-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; }
.ps2-order-item .ps2-order-info { flex: 1; }
.ps2-order-item .ps2-order-actions { margin-right: 10px; }
.ps2-order-item strong { display: inline-block; min-width: 30px; }
.ps2-cancel-btn { background: #dc3545; border: none; color: #fff; padding: 4px 12px; border-radius: 12px; font-size: 12px; cursor: pointer; transition: background 0.2s; }
.ps2-cancel-btn:hover { background: #c82333; }
.ps2-cancel-btn:disabled { opacity: 0.5; cursor: not-allowed; background: #6c757d; }
.ps2-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; }
.ps2-return-btn:hover { background: #e0a800; }
.ps2-return-btn:disabled { opacity: 0.5; cursor: not-allowed; background: #e0e0e0; }
.ps2-cancelled-badge { background: #6c757d; color: #fff; padding: 2px 10px; border-radius: 12px; font-size: 11px; }
.ps2-refunded-badge { background: #28a745; color: #fff; padding: 2px 10px; border-radius: 12px; font-size: 11px; }
.ps2-chat-input-area { display: flex; padding: 12px 16px; border-top: 1px solid #e0e0e0; background: white; flex-shrink: 0; }
.ps2-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; }
.ps2-chat-input-area input:focus { border-color: #0088cc; }
.ps2-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; }
.ps2-chat-input-area button:hover { background: #006699; }
@media (max-width: 600px) {
    .ps2-chat-container { height: 85vh; border-radius: 0; margin: 0; border: none; }
    .ps2-chat-header { padding: 12px 16px; }
    .ps2-chat-title { font-size: 16px; }
    .ps2-chat-messages { padding: 12px 14px; }
    .ps2-message { max-width: 92%; }
    .ps2-message-bubble { font-size: 14px; padding: 8px 14px; }
    .ps2-chat-input-area { padding: 8px 12px; }
    .ps2-chat-input-area input { font-size: 14px; padding: 8px 12px; }
    .ps2-chat-input-area button { width: 42px; height: 42px; font-size: 18px; }
    .ps2-group-btn { font-size: 12px; padding: 4px 12px; }
    .ps2-quick-buy { font-size: 12px; padding: 4px 12px; }
    #ps2-modal-box { padding: 20px; }
    .ps2-order-item { flex-direction: column; align-items: stretch; }
    .ps2-order-item .ps2-order-actions { margin-right: 0; margin-top: 6px; }
}
