/**
 * NATH AAROGYA CLINIC - TICKET-STYLE TOKEN CARD COMPONENT
 * Flat, clean, professional ticket-style card for OPD booking system.
 * Width: 320px | Radius: 12px | No gradients | No heavy shadows | No emojis
 */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Noto+Sans+Devanagari:wght@400;500;600;700&display=swap');

/* Outer Soft Container Frame */
.token-card-outer-frame {
  display: inline-block;
  padding: 12px;
  background-color: #EBF8F2;
  border: 1px solid #C2EADB;
  border-radius: 16px;
  box-sizing: border-box;
}

/* Main 320px Ticket-Style Card */
.token-ticket-card {
  width: 320px;
  max-width: 100%;
  margin: 0 auto;
  border-radius: 12px;
  overflow: hidden;
  background-color: #ffffff;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif !important;
  box-sizing: border-box;
  text-align: center;
  position: relative;
  /* Flat clean outline, no heavy shadows */
  border: 1px solid #0F6E56;
}

/* 1. HEADER (Solid Green #0F6E56, white text, centered, padding 16px) */
.token-ticket-header {
  background-color: #0F6E56;
  color: #ffffff;
  padding: 18px 14px 16px;
  position: relative;
  box-sizing: border-box;
}

.token-ticket-logo {
  max-height: 28px;
  max-width: 120px;
  object-fit: contain;
  margin: 0 auto 6px;
  display: block;
}

.token-clinic-name {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-size: 18px;
  font-weight: 700;
  line-height: 1.5 !important;
  height: auto !important;
  color: #ffffff;
  margin: 0 0 2px 0;
  letter-spacing: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 2px 4px;
}

.token-card-subtitle {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-size: 12px;
  font-weight: 500;
  color: #9FE1CB;
  margin-top: 2px;
  margin-bottom: 12px;
  letter-spacing: 0.3px;
  text-transform: none;
  line-height: 1.4;
}

/* Big Circular Token Badge (110px circle, white fill, 6px ring #5DCAA5) */
.token-badge-circle {
  width: 110px;
  height: 110px;
  border-radius: 50%;
  background-color: #ffffff;
  border: 6px solid #5DCAA5;
  box-sizing: border-box;
  margin: 0 auto 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  /* Clean flat badge */
  position: relative;
}

.token-badge-number {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-size: 46px;
  font-weight: 700;
  color: #085041;
  line-height: 1;
  letter-spacing: -0.5px;
  font-variant-numeric: tabular-nums;
  margin-top: 0;
}

.token-doctor-name {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  margin: 0;
  line-height: 1.45 !important;
  height: auto !important;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding: 2px 6px;
}

/* 2. TEAR LINE (2px dashed light-green line with semicircular ticket notches) */
.token-ticket-tear {
  position: relative;
  height: 0;
  border-top: 2px dashed #9FE1CB;
  background-color: transparent;
  margin: 0;
}

/* Authentic ticket cutouts on left and right edge */
.token-ticket-notch-left,
.token-ticket-notch-right {
  position: absolute;
  top: -10px;
  width: 18px;
  height: 20px;
  background-color: #EBF8F2; /* Matches outer container frame */
  z-index: 3;
}

.token-ticket-notch-left {
  left: -1px;
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  border: 1px solid #0F6E56;
  border-left: none;
}

.token-ticket-notch-right {
  right: -1px;
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
  border: 1px solid #0F6E56;
  border-right: none;
}

/* On dark background test mode, notches adapt */
.dark-theme .token-ticket-notch-left,
.dark-theme .token-ticket-notch-right {
  background-color: #0F172A;
  border-color: #0F6E56;
}

/* 3. DETAILS SECTION (White background, padding 14px, two columns) */
.token-ticket-details {
  background-color: #ffffff;
  padding: 14px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  box-sizing: border-box;
}

.token-details-left {
  flex: 1;
  min-width: 0;
}

.token-label-patient {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-size: 12px;
  font-weight: 600;
  color: #0F6E56;
  text-transform: none;
  margin-bottom: 2px;
  line-height: 1.4;
}

.token-patient-name {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-size: 16px;
  font-weight: 700;
  color: #04342C;
  line-height: 1.5 !important;
  height: auto !important;
  margin: 0 0 8px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 185px;
  padding: 2px 0;
}

.token-meta-line {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif !important;
  font-size: 13px;
  font-weight: 500;
  color: #085041;
  line-height: 1.45;
  margin: 0 0 4px 0;
}

.token-meta-line:last-child {
  margin-bottom: 0;
}

/* QR Code Container (Right Column, 90x90px with at least 6px quiet zone) */
.token-details-right {
  flex-shrink: 0;
  width: 90px;
  height: 90px;
  background-color: #ffffff;
  padding: 6px;
  border: 1px solid #E2E8F0;
  border-radius: 8px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  justify-content: center;
}

.token-qr-code-img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: contain;
}

.token-qr-code-img svg {
  width: 100%;
  height: 100%;
  display: block;
}

/* 4. FOOTER STRIP (Very light green #E1F5EE, centered, 12px, dark green text #085041) */
.token-ticket-footer {
  background-color: #E1F5EE;
  color: #085041;
  font-size: 12px;
  font-weight: 500;
  text-align: center;
  padding: 10px 14px;
  line-height: 1.3;
  box-sizing: border-box;
  border-top: 1px solid #D1EBE1;
}

/* ==========================================================================
   WHATSAPP CHAT BUBBLE PREVIEW STYLES (Admin Send Preview & Test View)
   ========================================================================== */
.wa-chat-container {
  max-width: 420px;
  margin: 0 auto;
  background: #EFEAE2 url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60" opacity="0.04"><path d="M10 10h10v10H10zM40 40h10v10H40z"/></svg>');
  border-radius: 16px;
  padding: 20px 14px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.wa-chat-bubble {
  background-color: #D9FDD3;
  border-radius: 12px 12px 2px 12px;
  padding: 8px 10px 6px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(11, 20, 26, 0.13);
  position: relative;
  display: inline-block;
  max-width: 340px;
}

.wa-chat-bubble.bubble-card {
  padding: 8px 8px 4px 8px;
}

.wa-chat-bubble.bubble-text {
  background-color: #D9FDD3;
  color: #111B21;
  font-size: 14.2px;
  line-height: 1.45;
  padding: 10px 12px 6px;
  border-radius: 12px 12px 2px 12px;
}

.wa-bubble-footer {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  margin-top: 4px;
  font-size: 11px;
  color: #667781;
}

.wa-double-tick {
  color: #53BDEB; /* WhatsApp Blue Read Receipts */
  font-size: 13px;
  line-height: 1;
  font-weight: 700;
}

