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