﻿.card-room {
  cursor: pointer;
  transition: .15s;
}

  .card-room:hover {
    box-shadow: 0 0 0 2px rgba(var(--bs-primary-rgb), .2);
  }

.meter {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 6px;
  cursor: pointer;
}

  .meter:hover {
    background: rgba(0,0,0,.05);
  }

.icon-meter {
  font-size: 1.25rem;
}

.meter-text {
  font-size: 0.9rem;
}

.title-wrap {
  font-size: 1.15rem;
}

.title-icon-wrap {
  display: inline-flex;
  aspect-ratio: 1;
  padding: .2rem;
  box-shadow: var(--bs-box-shadow);
  border-radius: 50%;
  margin-right: .15rem;
}

.title-icon {
  font-size: 1.35rem;
}

/* ==== VoiceWave ==== */

#voiceWave {
  border-radius: 8px;
  background: rgba(0,0,0,0.05); /* light theme */
}

[data-bs-theme="dark"] #voiceWave {
  background: rgba(255,255,255,0.05);
}

#btnMic {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden; /* 👈 กันล้น */
}

  #btnMic i {
    position: relative;
    z-index: 2;
  }

  #btnMic canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    padding: 12% 2px;
    pointer-events: none;
    opacity: 0;
    z-index: 1;
    transition: opacity .2s ease;
    /* 👇 โค้งครึ่งล่าง */
    clip-path: ellipse(80% 55% at 50% 100%);
    mask-image: linear-gradient(to bottom, transparent 0%, black 40%);
    transform: translateY(3%);
  }

  #btnMic.text-danger canvas {
    opacity: 1; /* ตอน record ชัดขึ้น */
  }

/* ตอน drag over meter's row in card ให้ highlight ช่อง: */
.meter.drag-over {
  outline: 2px dashed var(--bs-primary);
  background: rgba(var(--bs-primary-rgb), .05);
}

/* === Invoice Dialog === */

.invoice-row {
  display: grid;
  grid-template-columns: 28px 1fr 20px 90px; /* 👈 3 columns + reserve left space for amount */
  gap: 2px;
  align-items: start;
  margin-bottom: 4px;
}

.invoice-no {
  text-align: right;
  padding-right: 4px;
}

.invoice-name {
  word-break: break-word;
}

.invoice-amount {
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.invoice-row:hover .btn-del {
  opacity: 1;
}

.invoice-del {
  text-align: center;
}

  .invoice-del .btn-del {
    opacity: 0;
    border: none;
    background: transparent;
    color: #dc3545;
    font-size: 14px;
    cursor: pointer;
    transform: scale(1.5);
    transform-origin: center;
    transition: all .12s ease;
  }

    .invoice-del .btn-del:hover {
      opacity: 1;
      transform: scale(2);
    }

.invoice-body a[target="rentoShare"] {
  text-decoration: none;
}

.invoice-body a[target="rentoShare"]:hover {
  text-decoration: underline;
}

.invoice-body .billing-unit {
  color: rgba(var(--bs-body-color-rgb), .65);
  font-size: .875rem;
  transform: translateY(-1px);
}

.invoice-qr img {
  width: 90px;
  height: 90px;
  object-fit: contain;
}

.invoice-qr {
  display: inline-block;
}

/* === Customer Block === */

.invoice-block {
  line-height: 1.6; /* ปกติ 1.2–1.3 → อันนี้จะโปร่งขึ้น */
  font-size: 1rem;
}

  .invoice-block .sub1 {
    line-height: 1.5;
    font-weight: 500;
  }

  .invoice-block .sub2 {
    line-height: 1.7;
    font-size: 0.9rem;
    color: #6c757d; /* text-muted */
  }

/* === Export Section === */

/* ❌ ซ่อน X button and Other elements */
.invoice-export-mode button,
.invoice-export-mode .btn,
.invoice-export-mode .btn-close,
.invoice-export-mode .modal-footer,
.invoice-export-mode .extra-actions,
.invoice-export-mode .building-name,
.invoice-export-mode #btnExport,
.invoice-export-mode #btnAddCharge,
.invoice-export-mode #btnAddDiscount {
  display: none !important;
}

.invoice-export-mode {
  box-shadow: none !important;
}

.invoice-export-mode .modal-dialog {
  max-width: 600px;
}

/* === PRIMPTPAY QR-CODE === */

.invoice-footer {
  line-height: 1.5;
}

/*.promptpay-qr img {
  width: 160px;
  height: 160px;
  object-fit: contain;
  display: block;
  margin: 0 auto;
}*/

/*.promptpay-qr {
  background: #fff;
  padding: 10px;
  border-radius: 10px;
  display: inline-block;
}*/

.payment-box {
  padding: 8px 0;
}

.pp-qr {
  width: 120px;
  height: 120px;
  object-fit: contain;
  border-radius: 8px;
}

.invoice-footer {
  line-height: 1.4;
}

/* === General Utility === */

.icon-18 {
  display: inline-flex;
  font-size: 18px;
}

  .icon-18 i {
    transform: translateY(-2px);
  }
