/* ─── Tutor Live Classes ──────────────────────────────────────────────────── */

/* ── Dashboard Layout ── */
.tlc-dashboard { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; max-width: 900px; }

.tlc-section { background: #fff; border: 1px solid #e8ecf0; border-radius: 12px; padding: 28px; margin-bottom: 24px; }

.tlc-section-title {
    display: flex; align-items: center; gap: 12px;
    font-size: 17px; font-weight: 700; color: #1e293b; margin-bottom: 6px;
}
.tlc-step-num {
    display: inline-flex; align-items: center; justify-content: center;
    width: 28px; height: 28px; background: #6366f1; color: #fff;
    border-radius: 50%; font-size: 13px; font-weight: 800; flex-shrink: 0;
}
.tlc-section-desc { color: #64748b; font-size: 14px; margin: 0 0 20px; }

/* ── Connect Cards ── */
.tlc-connect-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }

.tlc-connect-card {
    display: flex; align-items: center; gap: 16px;
    border: 2px solid #e2e8f0; border-radius: 10px; padding: 18px 20px;
    position: relative; transition: border-color .2s, box-shadow .2s;
    background: #fafafa;
}
.tlc-connect-card.tlc-connected { border-color: #22c55e; background: #f0fdf4; }
.tlc-connect-card.tlc-card-disabled { opacity: .5; pointer-events: none; }
.tlc-connect-card:not(.tlc-card-disabled):hover { box-shadow: 0 2px 12px rgba(0,0,0,.08); }

.tlc-platform-logo {
    width: 52px; height: 52px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.tlc-zoom-logo   { background: linear-gradient(135deg, #2d8cff, #0e71eb); }
.tlc-google-logo { background: linear-gradient(135deg, #4285f4, #34a853); }

.tlc-connect-info { flex: 1; min-width: 0; }
.tlc-connect-info h3 { margin: 0 0 4px; font-size: 15px; color: #1e293b; }
.tlc-connect-info p  { margin: 0 0 10px; font-size: 13px; color: #64748b; }
.tlc-acct-email { color: #15803d !important; font-weight: 600 !important; }
.tlc-not-configured { color: #94a3b8 !important; font-style: italic; }

.tlc-status-dot {
    position: absolute; top: 14px; right: 14px;
    width: 10px; height: 10px; border-radius: 50%;
}
.tlc-dot-green { background: #22c55e; box-shadow: 0 0 0 3px #dcfce7; }
.tlc-dot-grey  { background: #cbd5e1; }

/* ── Buttons ── */
.tlc-btn {
    display: inline-flex; align-items: center;
    padding: 9px 18px; border-radius: 7px; font-size: 13px; font-weight: 600;
    cursor: pointer; border: none; text-decoration: none;
    transition: filter .15s, transform .1s; line-height: 1;
}
.tlc-btn:hover:not(:disabled) { filter: brightness(1.08); transform: translateY(-1px); }
.tlc-btn:active  { transform: translateY(0); }
.tlc-btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.tlc-btn-sm      { padding: 6px 13px; font-size: 12px; }

.tlc-btn-zoom          { background: #2d8cff; color: #fff; }
.tlc-btn-google        { background: #4285f4; color: #fff; }
.tlc-btn-primary       { background: #6366f1; color: #fff; }
.tlc-btn-ghost         { background: transparent; color: #6366f1; border: 1.5px solid #c7d2fe; }
.tlc-btn-ghost:hover   { background: #eef2ff; }
.tlc-btn-danger-ghost  { background: transparent; color: #dc2626; border: 1.5px solid #fecaca; }
.tlc-btn-danger-ghost:hover { background: #fef2f2; }

/* ── Lesson Cards ── */
.tlc-lessons-grid { display: flex; flex-direction: column; gap: 12px; }

.tlc-lesson-card {
    border: 1.5px solid #e2e8f0; border-radius: 10px; padding: 18px 20px;
    background: #fff; transition: border-color .2s;
}
.tlc-lesson-card.tlc-has-meeting { border-color: #a5b4fc; background: #fafafe; }
.tlc-lesson-card:hover { border-color: #6366f1; }

.tlc-lesson-card-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 12px; }
.tlc-lesson-meta { flex: 1; }
.tlc-course-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: #94a3b8; font-weight: 600; display: block; margin-bottom: 3px; }
.tlc-lesson-title { font-size: 15px; font-weight: 700; color: #1e293b; margin: 0; }

.tlc-meeting-badge {
    padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 700;
    white-space: nowrap; margin-left: 12px;
}
.tlc-badge-zoom   { background: #dbeafe; color: #1d4ed8; }
.tlc-badge-google { background: #dcfce7; color: #15803d; }

.tlc-meeting-info { margin-bottom: 12px; }
.tlc-meeting-time { font-size: 13px; color: #475569; margin-bottom: 4px; }
.tlc-link-preview {
    font-size: 12px; color: #6366f1; word-break: break-all;
    text-decoration: none; display: block;
}
.tlc-link-preview:hover { text-decoration: underline; }

.tlc-lesson-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* ── Inline Create Form ── */
.tlc-create-form { display: flex; flex-direction: column; gap: 10px; }

.tlc-form-row {
    display: grid;
    grid-template-columns: 1fr 1.6fr 1fr;
    gap: 8px;
}

.tlc-select, .tlc-input {
    width: 100%; padding: 8px 10px;
    border: 1.5px solid #e2e8f0; border-radius: 6px;
    font-size: 13px; color: #334155; background: #f8fafc;
    box-sizing: border-box; transition: border-color .15s;
}
.tlc-select:focus, .tlc-input:focus { outline: none; border-color: #6366f1; background: #fff; }

.tlc-btn-create { align-self: flex-start; }

.tlc-create-status { font-size: 12px; color: #64748b; }
.tlc-create-status.ok  { color: #15803d; }
.tlc-create-status.err { color: #dc2626; }

.tlc-meeting-result {
    background: #f0fdf4; border: 1px solid #bbf7d0;
    border-radius: 6px; padding: 10px 12px;
    font-size: 12px; color: #14532d; line-height: 1.6; word-break: break-all;
}
.tlc-meeting-result a { color: #15803d; font-weight: 600; }

.tlc-save-btn {
    width: 100%; padding: 11px;
    background: #6366f1; color: #fff;
    border: none; border-radius: 7px;
    font-size: 14px; font-weight: 700; cursor: pointer;
    transition: background .15s;
}
.tlc-save-btn:hover:not(:disabled)  { background: #4f46e5; }
.tlc-save-btn:disabled { opacity: .6; cursor: not-allowed; }
.tlc-save-status { font-size: 12px; min-height: 16px; text-align: center; margin-top: 6px; }
.tlc-status-success { color: #15803d; }
.tlc-status-error   { color: #dc2626; }
.tlc-status-warn    { color: #92400e; }

/* ── Empty state ── */
.tlc-empty-lessons {
    text-align: center; padding: 40px;
    background: #f8fafc; border-radius: 10px; color: #94a3b8;
}

/* ── Edit Modal ── */
.tlc-modal-box {
    position: relative; z-index: 1;
    background: #fff; border-radius: 14px;
    width: 420px; max-width: 95vw;
    box-shadow: 0 20px 60px rgba(0,0,0,.2);
}
.tlc-modal-header {
    display: flex; justify-content: space-between; align-items: center;
    padding: 16px 20px; border-bottom: 1px solid #f1f5f9;
    font-size: 15px; font-weight: 700; color: #1e293b;
}
.tlc-modal-header button {
    background: none; border: none; font-size: 18px;
    color: #94a3b8; cursor: pointer; padding: 2px 6px; border-radius: 4px;
}
.tlc-modal-header button:hover { color: #ef4444; background: #fee2e2; }
.tlc-modal-body { padding: 20px; display: flex; flex-direction: column; gap: 14px; }

.tlc-field { display: flex; flex-direction: column; gap: 5px; }
.tlc-field label { font-size: 12px; font-weight: 600; color: #64748b; }
.tlc-field small  { font-weight: 400; color: #94a3b8; }

/* ── Toast ── */
.tlc-toast {
    position: fixed; bottom: 28px; right: 28px;
    padding: 14px 22px; border-radius: 10px; font-size: 14px; font-weight: 600;
    color: #fff; box-shadow: 0 4px 20px rgba(0,0,0,.18);
    z-index: 999999; transition: opacity .4s; max-width: 360px;
}
.tlc-toast-success { background: #22c55e; }
.tlc-toast-error   { background: #ef4444; }
.tlc-toast-info    { background: #0ea5e9; }

/* ── Panel dot animation ── */
.tlc-panel-dot {
    display: inline-block; width: 9px; height: 9px;
    background: #ef4444; border-radius: 50%;
    animation: tlcPulse 1.4s ease-in-out infinite;
}
@keyframes tlcPulse { 0%,100%{opacity:1;transform:scale(1)} 50%{opacity:.5;transform:scale(1.3)} }

/* ── Admin settings page ── */
.tlc-admin-wrap { max-width: 1100px; }
.tlc-settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 24px 0; }
.tlc-settings-card { background: #fff; border: 1px solid #ddd; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.08); }
.tlc-card-header { padding: 16px 24px; display: flex; align-items: center; gap: 12px; }
.tlc-google-header { background: linear-gradient(135deg,#4285f4,#34a853); color:#fff; }
.tlc-zoom-header   { background: linear-gradient(135deg,#2d8cff,#0e71eb); color:#fff; }
.tlc-card-header h2 { color:#fff; margin:0; font-size:16px; }
.tlc-platform-icon { font-size:24px; }
.tlc-card-body { padding:24px; }
.tlc-setup-steps { background:#f9f9f9; border-left:4px solid #ddd; padding:16px; margin-bottom:20px; border-radius:0 4px 4px 0; }
.tlc-setup-steps h3 { margin:0 0 10px; font-size:13px; text-transform:uppercase; color:#666; }
.tlc-setup-steps ol { margin:0; padding-left:18px; }
.tlc-setup-steps li { margin-bottom:6px; font-size:13px; line-height:1.5; }
.tlc-copy-field { display:block; margin-top:4px; padding:4px 8px; background:#fff; border:1px solid #ccc; border-radius:4px; font-size:12px; word-break:break-all; cursor:pointer; }
.tlc-copy-field:hover { background:#f0f0f0; }
.tlc-status-ok   { display:inline-block; padding:6px 12px; border-radius:4px; font-size:13px; font-weight:600; background:#d4edda; color:#155724; margin-top:8px; }
.tlc-status-warn { display:inline-block; padding:6px 12px; border-radius:4px; font-size:13px; font-weight:600; background:#fff3cd; color:#856404; margin-top:8px; }
@media(max-width:900px){ .tlc-settings-grid,.tlc-connect-grid{ grid-template-columns:1fr; } .tlc-form-row{ grid-template-columns:1fr; } }

/* ── Lesson front-end meeting banner ── */
.tlc-meeting-banner { border-radius:12px; padding:20px 24px; margin-bottom:24px; border:2px solid transparent; }
.tlc-banner-google { background:linear-gradient(135deg,#e8f0fe,#e6f4ea); border-color:#4285f4; }
.tlc-banner-zoom   { background:linear-gradient(135deg,#e0eaff,#ddf); border-color:#2d8cff; }
.tlc-banner-inner  { display:flex; align-items:center; justify-content:space-between; gap:16px; flex-wrap:wrap; }
.tlc-banner-left   { display:flex; align-items:center; gap:14px; }
.tlc-banner-icon   { font-size:32px; line-height:1; }
.tlc-banner-info   { display:flex; flex-direction:column; gap:4px; }
.tlc-banner-title  { font-size:16px; color:#1e293b; font-weight:700; }
.tlc-banner-time, .tlc-banner-password { font-size:13px; color:#475569; }
.tlc-banner-password code { background:rgba(0,0,0,.06); padding:1px 6px; border-radius:4px; }
.tlc-join-btn { display:inline-flex; align-items:center; padding:12px 24px; border-radius:8px; font-weight:700; font-size:15px; text-decoration:none; color:#fff; transition:filter .15s; white-space:nowrap; }
.tlc-join-btn:hover { filter:brightness(1.1); }
.tlc-join-google { background:#4285f4; }
.tlc-join-zoom   { background:#2d8cff; }

/* ── Test result log ── */
.tlc-test-result { margin-top: 10px; font-size: 12px; border-radius: 6px; overflow: hidden; }
.tlc-log-line { padding: 5px 10px; background: #f8fafc; border-bottom: 1px solid #e8ecf0; font-family: monospace; word-break: break-all; }
.tlc-log-line.ok  { background: #f0fdf4; color: #15803d; }
.tlc-log-line.err { background: #fef2f2; color: #dc2626; }
.tlc-log-line.fix { background: #fffbeb; color: #92400e; font-weight: 600; }
