/* Penci — chọn / sửa thiết kế trong giỏ hàng (31/10/2026). CSS của lõi penci-cart-pick.js — tự đủ, mang sang site khác được.
   Màu lấy biến của site nếu có (--pcp-green…), không có thì dùng màu mặc định. Doc: homev3-penci-thiet-ke-truc-tuyen.md mục 65. */
:root { --pcp-green: var(--hv3-button-green, #207F5D); --pcp-muted: var(--hv3-muted, #667085); }

/* Nút [Chọn thiết kế] trên dòng giỏ — cùng khổ nút "Sửa thiết kế" của dòng đã có thiết kế */
.pcp-line { display: flex; justify-content: center; width: 100%; }
.pcp-pick {
    display: inline-flex; align-items: center; justify-content: center; min-height: 30px; padding: 5px 10px; box-sizing: border-box;
    border: 1px solid #D5E8DF; border-radius: 6px; background: #F5FAF7; color: var(--pcp-green);
    font: inherit; font-size: 12px; font-weight: 500; line-height: 18px; white-space: nowrap; cursor: pointer; box-shadow: none;
}
.pcp-pick:hover, .pcp-pick:focus-visible { background: #E7F3EC; border-color: #A5CDB8; outline: none; }
.pcp-pick:focus { outline: none; }

/* Hộp xem thiết kế (chế độ sửa): không cho quay về danh sách mẫu — chỉ sửa đúng thiết kế của dòng */
html.pcp-viewing .hv3-penci-gdetail__back { display: none; }

/* Đang tự gắn thiết kế (về từ Penci): mờ dòng, chặn bấm tới khi tải lại */
.pcp-attaching { opacity: .55; pointer-events: none; transition: opacity .2s ease; }

/* Dòng vừa gắn thiết kế: viền sáng 2,6 giây */
.pcp-flash { animation: pcp-flash 2.6s ease-out; border-radius: 10px; }
@keyframes pcp-flash {
    0%, 60% { box-shadow: 0 0 0 2px var(--pcp-green), 0 0 0 6px rgba(32, 127, 93, .18); }
    100% { box-shadow: 0 0 0 2px transparent, 0 0 0 6px transparent; }
}
@media (prefers-reduced-motion: reduce) { .pcp-flash { animation: none; box-shadow: 0 0 0 2px var(--pcp-green); } }

/* Hộp "Gắn thiết kế vào sản phẩm?" */
html.pcp-lock, html.pcp-lock body { overflow: hidden; }
.pcp-confirm[hidden] { display: none !important; }
.pcp-confirm {
    position: fixed; inset: 0; z-index: 1080; display: flex; align-items: center; justify-content: center;
    padding: 16px; box-sizing: border-box; background: rgba(16, 24, 40, .45);
}
.pcp-confirm__box {
    position: relative; width: 100%; max-width: 540px; max-height: calc(100vh - 32px); overflow-y: auto; box-sizing: border-box; padding: 24px;
    border-radius: 16px; background: #fff; box-shadow: 0 20px 50px -20px rgba(16, 24, 40, .45);
}
.pcp-confirm__x {
    position: absolute; top: 10px; right: 10px; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%;
    background: #F2F4F7; color: #475467; font-size: 20px; line-height: 1; cursor: pointer;
}
.pcp-confirm__title { margin: 0 32px 14px 0; font-size: 18px; line-height: 1.35; color: #101828; }
.pcp-confirm__design { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 12px; background: #F7F9FA; }
.pcp-confirm__design img { flex: 0 0 160px; width: 160px; height: 120px; max-width: none; object-fit: contain; border-radius: 8px; background: #fff; }
.pcp-confirm__design div { min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pcp-confirm__design b { color: #101828; overflow-wrap: anywhere; }
.pcp-confirm__design span { font-size: 13px; color: var(--pcp-muted); }
.pcp-confirm__note { margin: 12px 0 0; font-size: 13px; line-height: 1.55; color: var(--pcp-muted); }
.pcp-confirm__err { margin: 12px 0 0; padding: 8px 10px; border-radius: 8px; background: #FEF3F2; color: #B42318; font-size: 13px; }
.pcp-confirm__actions { display: flex; gap: 12px; margin-top: 20px; }
.pcp-confirm__actions button { flex: 1 1 0; min-width: 0; min-height: 44px; border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14px; line-height: 1.35; cursor: pointer; }
.pcp-confirm__no { border: 1px solid #D0D5DD; background: #fff; color: #344054; }
.pcp-confirm__yes { border: 0; background: var(--pcp-green); color: #fff; font-weight: 600; }
.pcp-confirm__actions button:disabled { opacity: .7; cursor: progress; }
.pcp-confirm button:focus, .pcp-confirm button:focus-visible { outline: none; }

@media (max-width: 767px) {
    .pcp-confirm__box { padding: 20px 16px; }
    .pcp-confirm__design img { flex-basis: 112px; width: 112px; height: 100px; }
}
