/* Grid & cards */
.tfk-grid { display:grid; gap:20px; grid-template-columns:1fr; }
@media (min-width: 992px){ .tfk-grid { grid-template-columns:1fr 1fr 1fr; } }

.tfk-card { border-radius:16px; border:1px solid #e6e6e6; padding:20px; background:#fff; box-shadow:0 2px 10px rgba(0,0,0,.04); }
.tfk-title-row { display:flex; align-items:center; gap:12px; }
.tfk-title { font-size:1.25rem; font-weight:700; margin-bottom:2px; }
.tfk-desc  { color:#6c757d; font-size:.95rem; }

.tfk-thumb-sm { width:170px; height:110px; object-fit:cover; border-radius:12px; border:1px solid #e9ecef; }
.tfk-thumb    { width:48px; height:48px; object-fit:cover; border-radius:10px; border:1px solid #e9ecef; }

/* Big radio options */
.tfk-plan { display:flex; flex-direction:column; gap:12px; margin-top:14px; }
.tfk-option { position:relative; border:1px solid #dcdfe3; border-radius:12px; padding:14px 16px; display:flex; align-items:center; justify-content:space-between; cursor:pointer; }
.tfk-option:hover{ border-color:#bfc6ce; }
.tfk-option input[type=radio]{ width:26px; height:26px; accent-color:#0d6efd; margin-right:12px; }
.tfk-option .tfk-option-left{ display:flex; align-items:center; gap:12px; }
.tfk-badges { display:flex; gap:8px; flex-wrap:wrap; font-size:.85rem; }
.tfk-badge { background:#f1f3f5; padding:2px 8px; border-radius:999px; }
.tfk-price { font-weight:700; }

/* Optional subtext for a plan */
.tfk-subtext { margin-top:6px; font-size:.9rem; color:#495057; line-height:1.35; }

/* Modal sizing & internals */
.tfk-modal { z-index: 1080; pointer-events:auto; }
.tfk-modal .modal-dialog { max-width:720px; }
.tfk-modal .modal-body { text-align:center; }
.tfk-qr { width:270px; max-width:80vw; aspect-ratio:1/1; object-fit:contain; display:block; margin:10px auto 14px; }
.tfk-meta { display:flex; gap:12px; justify-content:center; flex-wrap:wrap; margin-bottom:8px; }
.tfk-meta .item { background:#f8f9fa; border:1px solid #e9ecef; padding:6px 10px; border-radius:8px; font-size:.9rem; }
.tfk-small { color:#6c757d; font-size:.9rem; }

/* Robust close button */
.tfk-close { background:transparent; border:none; font-size:28px; line-height:1; padding:0 6px; cursor:pointer; color:#333 !important; }
.tfk-close:hover { color:#1768E5 !important; }

/* Make whole option clickable, keep radio visible */
.tfk-option input{ pointer-events:none; }
.tfk-option:active { transform:scale(.998); }

/* Fallback backdrop (custom class to avoid theme conflicts) */
body.modal-open { overflow: hidden; }
.tfk-backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1070; }

/* Scan message (your custom per-plan line) */
.tfk-scan-msg{
  font-size:1.05rem;
  margin: 2px 0 8px;
  color:#333;
}

/* Mosaic reveal overlay */
.tfk-qr-wrap{
  position:relative;
  display:inline-block;
}
.tfk-qr-wrap .tiles{
  position:absolute;
  inset:0;
  display:grid; /* rows/cols set inline by JS */
  pointer-events:none;
}
.tfk-qr-wrap .tile{
  background:#ffffff; /* cover color; adjust to match modal bg if needed */
  opacity:1;
  animation:tfkTileOff var(--tfk-tile-ms, 350ms) ease forwards;
}
@keyframes tfkTileOff{ to { opacity:0 } }
