/* TN Auth v5.6 */
.tnauth-overlay {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.6);
    z-index: 99999;
    display: flex; align-items: center; justify-content: center;
}
.tnauth-modal {
    background: #fff; border-radius: 14px; padding: 36px 32px;
    width: 100%; max-width: 420px;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
    font-family: sans-serif; box-sizing: border-box;
    max-height: 90vh; overflow-y: auto;
    animation: tnauth-modal-in .25s cubic-bezier(.16,1,.3,1);
}
@keyframes tnauth-modal-in {
    from { opacity:0; transform: translateY(24px) scale(.97); }
    to   { opacity:1; transform: translateY(0) scale(1); }
}
.tnauth-modal h2 { margin: 0 0 6px; font-size: 1.4rem; color: #111; }
.tnauth-sub { color: #666; font-size: .9rem; margin: 0 0 20px; }
.tnauth-modal input[type=email],
.tnauth-modal input[type=text],
.tnauth-modal input[type=number],
.tnauth-modal input[type=tel],
.tnauth-modal select {
    width: 100%; padding: 11px 14px; border: 1.5px solid #ddd;
    border-radius: 8px; font-size: .95rem; margin-bottom: 12px;
    box-sizing: border-box; outline: none; transition: border-color .2s;
}
.tnauth-modal input:focus, .tnauth-modal select:focus { border-color: #111; }
.tnauth-btn {
    width: 100%; padding: 12px; background: #111; color: #fff;
    border: none; border-radius: 8px; font-size: 1rem;
    cursor: pointer; margin-top: 4px; transition: opacity .2s, transform .15s;
}
.tnauth-btn:hover { opacity: .88; }
.tnauth-btn:active { transform: scale(.98); }
.tnauth-btn:disabled { opacity: .6; cursor: not-allowed; }
.tnauth-error { color: #c00; font-size: .85rem; min-height: 18px; margin: 6px 0 0; }
.tnauth-otp-inputs { display: flex; gap: 8px; margin-bottom: 16px; }
.tnauth-otp-digit {
    flex: 1; text-align: center !important; font-size: 1.4rem !important;
    padding: 10px 0 !important; border: 1.5px solid #ddd !important;
    border-radius: 8px !important; margin-bottom: 0 !important;
    transition: border-color .15s, transform .1s !important;
}
.tnauth-otp-digit:focus { border-color: #111 !important; }
.tnauth-otp-digit.filled { border-color: #111 !important; transform: scale(1.05); }
.tnauth-resend { font-size: .85rem; color: #666; margin-top: 10px; }
.tnauth-resend a { color: #111; font-weight: 600; text-decoration: none; }
.tnauth-row { display: flex; gap: 10px; }
.tnauth-row input { flex: 1; }
.tnauth-phone-wrap { display: flex; gap: 8px; }
.tnauth-phone-wrap #tnauth-phone-prefix { width: 72px; flex: none; }
.tnauth-phone-wrap #tnauth-phone-number { flex: 1; }
.tnauth-field-label { font-size: .85rem; font-weight: 600; color: #444; margin-bottom: 8px; }
.tnauth-multi-hint { font-weight: 400; color: #888; }
.tnauth-checkboxes { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tnauth-checkboxes label {
    border: 1.5px solid #ddd; border-radius: 20px; padding: 6px 14px;
    cursor: pointer; font-size: .85rem; user-select: none; transition: all .15s;
}
.tnauth-checkboxes label.selected { background: #111; color: #fff; border-color: #111; }
.tnauth-checkboxes input { display: none; }

/* ── Payment Selection ── */
#tnauth-payment-section { margin: 0 0 20px; }
.tnauth-payment-title { font-size: 1rem; font-weight: 700; color: #111; margin: 0 0 12px; }
.tnauth-payment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 10px; margin-bottom: 10px;
}
.tnauth-payment-card {
    display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 5px; padding: 14px 8px;
    border: 2px solid #e5e5e5; border-radius: 10px;
    cursor: pointer; background: #fff;
    transition: border-color .15s, box-shadow .15s, transform .15s;
    user-select: none;
}
.tnauth-payment-card:hover {
    border-color: #aaa;
    box-shadow: 0 4px 12px rgba(0,0,0,.08);
    transform: translateY(-2px);
}
.tnauth-payment-card.selected {
    border-color: #111; background: #111; color: #fff;
    box-shadow: 0 6px 20px rgba(0,0,0,.15);
    transform: translateY(-3px);
}
.tnauth-payment-icon  { font-size: 1.5rem; line-height: 1; }
.tnauth-payment-label { font-size: .78rem; font-weight: 600; text-align: center; }
.tnauth-payment-fee   { font-size: .68rem; color: #888; }
.tnauth-payment-card.selected .tnauth-payment-fee { color: #ccc; }

/* ── TTC Preview ── */
#tnauth-ttc-preview {
    display: flex; align-items: center; justify-content: space-between;
    background: #f5f5f5; border-radius: 8px; padding: 10px 14px;
    margin-bottom: 8px; animation: tnauth-fadein .2s ease;
}
@keyframes tnauth-fadein { from { opacity:0; transform:translateY(4px); } to { opacity:1; transform:none; } }
.tnauth-ttc-label  { font-size: .85rem; color: #666; }
.tnauth-ttc-amount { font-size: 1.1rem; font-weight: 700; color: #111; }

/* ── Place Order pulse ── */
@keyframes tnauth-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(0,0,0,.3); }
    70%  { box-shadow: 0 0 0 10px rgba(0,0,0,0); }
    100% { box-shadow: 0 0 0 0 rgba(0,0,0,0); }
}
.tnauth-btn-pulse { animation: tnauth-pulse .6s ease; }

/* ── Thank You ── */
.tnauth-thankyou {
    background: #f9f9f9; border: 1px solid #e5e5e5; border-radius: 12px;
    padding: 28px 24px; margin-bottom: 24px; text-align: center;
}
.tnauth-ty-icon  { font-size: 2.5rem; margin-bottom: 8px; }
.tnauth-thankyou h2 { margin: 0 0 12px; font-size: 1.4rem; color: #111; }
.tnauth-ty-inv   { font-size: 1rem; color: #333; margin-bottom: 6px; }
.tnauth-ty-note  { font-size: .85rem; color: #666; margin-top: 12px; }

@media (max-width: 480px) {
    .tnauth-modal { padding: 28px 20px; margin: 16px; }
    .tnauth-row { flex-direction: column; gap: 0; }
    .tnauth-payment-grid { grid-template-columns: repeat(3, 1fr); }
}
