/* ============================================================
   TeacherReserveModule CSS — استخراج‌شده و بازطراحی‌شده از استایل قدیمی
   TeacherReserve.razor (Mockup)، اسکوپ‌شده زیر .teacher-reserve-module، پیشوند tr-.
   ============================================================ */

.teacher-reserve-module {
  --tr-c-bg: #f5f5f3;
  --tr-c-surface: #ffffff;
  --tr-c-border: rgba(0,0,0,0.08);
  --tr-c-text: #1a1a18;
  --tr-c-text-2: #5a5a56;
  font-family: 'Vazirmatn', 'iransansweb', Tahoma, sans-serif;
  color: var(--tr-c-text);
  font-size: 13px;
  position: relative;
  padding: 16px;
}

.tr-selector-row { display: flex; gap: 1rem; margin-bottom: 15px; flex-wrap: wrap; justify-content: center; }
.tr-select { padding: 8px 10px; border-radius: 8px; border: 1px solid var(--tr-c-border); min-width: 140px; font-size: 0.8rem; color: #003b5d; background: white; cursor: pointer; font-family: inherit; }
.tr-select:disabled { background-color: #eee; cursor: not-allowed; }

.tr-hint { text-align: center; font-size: 0.85rem; color: var(--tr-c-text-2); }

.tr-loading { display: flex; justify-content: center; padding: 30px; }
.tr-spinner { width: 26px; height: 26px; border: 3px solid var(--tr-c-border); border-top-color: #2563eb; border-radius: 50%; display: inline-block; animation: trSpin 0.7s linear infinite; }
@keyframes trSpin { to { transform: rotate(360deg); } }

.tr-week-nav { display: flex; align-items: center; justify-content: center; gap: 14px; margin-bottom: 14px; }
.tr-week-btn { border: 1px solid var(--tr-c-border); background: white; border-radius: 8px; padding: 6px 14px; font-size: 0.8rem; color: #2563eb; font-weight: 600; cursor: pointer; font-family: inherit; }
.tr-week-btn:disabled { opacity: 0.4; cursor: not-allowed; }

.tr-schedule-box { background-color: #c0e2f3; border-radius: 10px; padding: 12px; max-width: 700px; margin: 0 auto; }
.tr-schedule-scroll { display: flex; overflow: auto; }
.tr-day-column { border-radius: 12px; padding: 2px; display: flex; flex-direction: column; align-items: center; width: 17%; gap: 3px; }
.tr-day-name { font-size: 0.65rem; height: 23px; padding: 2px; color: #285780; background-color: #dbeef8; border-radius: 4px; width: 100%; text-align: center; }
.tr-day-name-ghost { background: transparent; color: cadetblue; border: 1px solid #e0f0f8; }

.tr-task { background-color: white; border-radius: 5px; text-align: center; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 3px; min-height: 52px; max-height: 52px; width: 100%; cursor: pointer; user-select: none; border: 1px solid transparent; margin: 2px 0; transition: background-color 0.15s ease; }
.tr-task:hover:not(.tr-disabled):not(.tr-reserved-other):not(.tr-selected) { background-color: #b6defb; }
.tr-task-title { font-size: 0.55rem; color: #003b5d; line-height: 1.3; }

.tr-selected { background-color: white; border-radius: 5px; border: 1px solid #79818c; }
.tr-disabled { background-color: #eee; color: #999; cursor: not-allowed; border: 1px solid #ddd; }
.tr-reserved-other { background-color: #ffcccc; cursor: not-allowed; }
.tr-offset { writing-mode: vertical-rl; transform: rotate(180deg); color: brown; background: aliceblue; cursor: default; }

.tr-summary-bar { text-align: center; font-size: 0.85rem; color: #1d4ed8; margin-top: 14px; padding: 10px; background: #f8fafc; border-radius: 8px; }
.tr-pay-btn { margin-right: 10px; font-size: 0.85rem; padding: 6px 16px; cursor: pointer; border: none; border-radius: 8px; background: #2563eb; color: white; font-weight: 600; font-family: inherit; }
.tr-pay-btn:disabled { opacity: 0.6; cursor: not-allowed; }

/* ── صفحه‌ی بازگشت از درگاه ── */
.tr-callback-wrap { display: flex; justify-content: center; padding: 40px 12px; }
.tr-callback-card { max-width: 460px; width: 100%; text-align: center; background: var(--tr-c-surface); border: 1px solid var(--tr-c-border); border-radius: 14px; padding: 32px 24px; }
.tr-callback-icon { width: 68px; height: 68px; margin: 0 auto 16px; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 34px; background: #f0fdf4; color: #16a34a; }
.tr-callback-icon.danger { background: #fef2f2; color: #dc2626; }
.tr-callback-details { display: flex; flex-direction: column; gap: 8px; text-align: right; background: var(--tr-c-bg); border-radius: 10px; padding: 14px 16px; margin: 16px 0; }
.tr-callback-details div { display: flex; justify-content: space-between; font-size: 12px; }
.tr-callback-btn { background: #2563eb; border: none; border-radius: 8px; color: #fff; padding: 10px 20px; font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; }

/* ── Toast ── */
.tr-toast-wrap { position: fixed; bottom: 24px; left: 24px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; }
.tr-toast { background: var(--tr-c-text); color: #fff; padding: 12px 16px; border-radius: 10px; font-size: 13px; font-weight: 500; cursor: pointer; max-width: 320px; }
.tr-toast-success { background: #16a34a; }
.tr-toast-error { background: #dc2626; }
.tr-toast-warning { background: #d97706; }
