/* Khung hỏi giá: bảng màu và chữ của teefit.vn. Phiếu giá là nét riêng: một chiếc tem áo đục lỗ, con số do code in ra. */
.tfc,
.tfc * { box-sizing: border-box; }
.tfc {
  --ink: #13231d; --soft: #3d4f47; --muted: #5d6c65; --cotton: #f3f5f1; --line: #dde3dc;
  --teal: #0b7d61; --deep: #075c48; --yellow: #ffc933; --red: #b3261e;
  position: fixed; left: 16px; bottom: 16px; z-index: 9990;
  font: 400 15px/1.5 "Be Vietnam Pro", Arial, sans-serif; color: var(--ink); text-align: left;
}
.tfc button, .tfc input, .tfc textarea { font: inherit; color: inherit; margin: 0; min-height: 0; letter-spacing: 0; text-transform: none; }
.tfc p, .tfc form, .tfc label, .tfc h4 { margin: 0; }
.tfc [hidden] { display: none !important; }
.tfc :focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

.tfc-open {
  display: flex; align-items: center; gap: 10px; padding: 12px 18px 12px 14px !important; border: 0; border-radius: 999px;
  background: var(--deep); color: #fff !important; font-weight: 600; line-height: 1.2; cursor: pointer;
  box-shadow: 0 6px 20px rgba(7, 60, 46, .28);
}
.tfc-open:hover { background: var(--teal); }
.tfc-open svg { width: 22px; height: 22px; flex: none; }

.tfc-panel {
  position: fixed; left: 16px; bottom: 16px; width: 376px; height: min(600px, calc(100dvh - 32px));
  display: flex; flex-direction: column; background: #fff; border-radius: 14px; overflow: hidden;
  box-shadow: 0 18px 50px rgba(10, 40, 31, .30);
}
.tfc-head { display: flex; align-items: flex-start; gap: 12px; padding: 14px 8px 14px 18px; background: var(--deep); color: #fff; }
.tfc-head div { flex: 1; }
.tfc-head strong { display: block; font: 700 18px/1.25 "Archivo", "Be Vietnam Pro", Arial, sans-serif; color: #fff; }
.tfc-head span { font-size: 13px; line-height: 1.4; color: #cfe6de; }
.tfc-x { width: 44px; height: 44px; padding: 0 !important; border: 0; background: none; color: #fff !important; font-size: 24px !important; line-height: 1 !important; cursor: pointer; border-radius: 8px; }
.tfc-x:hover { background: rgba(255, 255, 255, .14); }

.tfc-form { flex: 1; overflow: auto; padding: 22px 18px 18px; display: flex; flex-direction: column; gap: 16px; }
.tfc-form label { display: block; font-weight: 600; font-size: 14px; color: var(--ink); margin: 0; }
.tfc .tfc-form input {
  display: block; width: 100%; height: 48px; margin-top: 6px; padding: 0 14px; font-size: 16px; font-weight: 400;
  background: #fff; border: 1.5px solid #b9c4bd; border-radius: 8px; box-shadow: none;
}
.tfc .tfc-form input:focus { border-color: var(--teal); }
.tfc .tfc-form input[aria-invalid="true"] { border-color: var(--red); }
.tfc .tfc-err { color: var(--red); font-size: 13px; font-weight: 400; margin-top: 4px; }
.tfc-small { font-size: 13px; color: var(--muted); }
.tfc-trap { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tfc .tfc-go { height: 50px; padding: 0 18px; border: 0; border-radius: 8px; background: var(--yellow); color: var(--ink); font-weight: 700; cursor: pointer; }
.tfc .tfc-go:hover { background: #ffd45c; }
.tfc .tfc-go:disabled { opacity: .6; cursor: default; }

.tfc-log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 18px; background: var(--cotton); display: flex; flex-direction: column; gap: 10px; }
.tfc-m { max-width: 86%; padding: 10px 14px; border-radius: 12px; white-space: pre-line; overflow-wrap: anywhere; }
.tfc-m.shop { align-self: flex-start; background: #fff; border-bottom-left-radius: 3px; }
.tfc-m.khach { align-self: flex-end; background: var(--deep); color: #fff; border-bottom-right-radius: 3px; }
.tfc-m.loi { align-self: flex-start; background: #fdecea; color: #7d1a14; }
.tfc-dots { display: inline-flex; gap: 5px; padding: 6px 0; }
.tfc-dots i { width: 7px; height: 7px; border-radius: 50%; background: var(--teal); animation: tfc-b 1.1s infinite; }
.tfc-dots i:nth-child(2) { animation-delay: .15s; }
.tfc-dots i:nth-child(3) { animation-delay: .3s; }
@keyframes tfc-b { 0%, 60%, 100% { opacity: .25; } 30% { opacity: 1; } }

/* Tem giá: lỗ xỏ dây ở góc, mép răng cưa dưới đáy */
.tfc-slip { align-self: stretch; position: relative; background: #fff; padding: 14px 18px 22px 46px; border-radius: 10px 10px 0 0;
  -webkit-mask: radial-gradient(circle at 24px 26px, transparent 7px, #000 7.5px) top / 100% calc(100% - 7px) no-repeat,
    conic-gradient(from -45deg at bottom, #000 90deg, transparent 0) bottom left / 14px 7px repeat-x;
  mask: radial-gradient(circle at 24px 26px, transparent 7px, #000 7.5px) top / 100% calc(100% - 7px) no-repeat,
    conic-gradient(from -45deg at bottom, #000 90deg, transparent 0) bottom left / 14px 7px repeat-x; }
.tfc .tfc-slip h4 { margin: 0 0 8px; font: 700 15px/1.35 "Archivo", "Be Vietnam Pro", Arial, sans-serif; color: var(--deep); }
.tfc-row { display: grid; grid-template-columns: 1fr auto; gap: 0 12px; padding: 8px 0; border-top: 1px dashed #c3cdc6; }
.tfc-row b { font-weight: 600; }
.tfc-row span { font-size: 13px; color: var(--muted); }
.tfc-row .n { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tfc-row b.n { font-size: 17px; font-weight: 700; color: var(--deep); }

.tfc-say { display: flex; gap: 8px; padding: 10px; background: #fff; border-top: 1px solid var(--line); }
.tfc .tfc-say textarea { flex: 1; height: 48px; max-height: 120px; padding: 11px 14px; font-size: 16px; line-height: 1.5; resize: none; background: #fff; border: 1.5px solid #b9c4bd; border-radius: 8px; box-shadow: none; }
.tfc .tfc-say textarea:focus { border-color: var(--teal); }
.tfc .tfc-say .tfc-go { height: 48px; padding: 0 16px; }
.tfc-foot { padding: 0 12px 10px; background: #fff; font-size: 12px; line-height: 1.4; color: var(--muted); }
.tfc-foot a { color: var(--deep); text-decoration: underline; }

@media (max-width: 549px) {
  .tfc { left: 12px; bottom: 12px; }
  .tfc-panel { left: 0; right: 0; bottom: 0; width: auto; height: 100dvh; max-height: 100dvh; border-radius: 0; }
  .tfc.mo { z-index: 999999; }
}
@media (prefers-reduced-motion: reduce) { .tfc-dots i { animation: none; opacity: .7; } }
