/*
 * 10-Codes reference modal — shared component (editable in the Radio
 * Scenarios authoring tools, read-only on RadioCallPracticeNG and the sign-in
 * kiosks). z-index 40000 clears everything on the pages it appears on — most
 * importantly the global #pony mascot (20000/20001, body_open.css) which was
 * drawing in front of it, plus tooltips (30030) and the sign-in profile-hover
 * (32000). The shared confirm modal is lifted to 41000 (confirm-modal.css) so a
 * delete confirmation still draws on top of this modal on the authoring pages.
 *
 * Copyright (c) 2010-2026 Sierra NSP.
 */

.tc-modal {
	position: fixed;
	inset: 0;
	display: none;
	align-items: center;
	justify-content: center;
	z-index: 40000;
	padding: 16px;
}

.tc-modal.is-open { display: flex; }

.tc-modal-backdrop {
	position: absolute;
	inset: 0;
	background: rgba(15, 23, 42, 0.55);
	backdrop-filter: blur(2px);
}

.tc-modal-content {
	position: relative;
	font-family: var(--tix-font);
	color: var(--tix-text);
	background: var(--tix-card-bg);
	border: 1px solid var(--tix-card-border);
	border-radius: var(--radius-xl);
	box-shadow: var(--shadow-lg);
	width: min(760px, 96vw);
	max-height: 85vh;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.tc-modal-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 18px 20px;
	border-bottom: 1px solid var(--tix-card-border);
	flex-shrink: 0;
}
.tc-modal-head h2 { margin: 0; font-size: 18px; font-weight: 700; }
.tc-modal-close {
	appearance: none; border: none; background: transparent; color: var(--tix-muted);
	cursor: pointer; padding: 6px; border-radius: var(--radius-full); display: inline-flex;
}
.tc-modal-close:hover { color: var(--tix-text); }

.tc-modal-body { padding: 18px 20px 22px; overflow-y: auto; display: grid; gap: 18px; }

.tc-empty, .tc-muted { color: var(--tix-muted); }

.tc-table-scroll-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tc-table { width: 100%; border-collapse: collapse; min-width: 620px; font-size: 13.5px; }
.tc-table th, .tc-table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--tix-card-border); vertical-align: top; }
.tc-table th { font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--tix-muted); }
.tc-code-cell { font-weight: 700; white-space: nowrap; }
.tc-actions-head, .tc-actions-cell { width: 1%; white-space: nowrap; }
.tc-badge {
	display: inline-block; padding: 1px 8px; border-radius: var(--radius-full);
	font-size: 11px; font-weight: 700; background: var(--tix-pill-bg); color: var(--tix-pill-text, inherit);
}
.tc-row-actions { display: flex; gap: 6px; flex-wrap: nowrap; align-items: center; }
.tc-inline-form { display: inline-flex; margin: 0; }

.tc-btn {
	appearance: none; border: 1px solid transparent; border-radius: var(--radius-full);
	padding: 8px 16px; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: none;
	display: inline-flex; align-items: center; gap: 6px; font-family: inherit;
	transition: transform 0.12s ease, box-shadow 0.12s ease, opacity 0.2s ease;
}
.tc-btn-primary {
	background: var(--tix-button-bg, linear-gradient(130deg, #0a84ff, #00c6ff));
	color: var(--tix-button-text, #fff);
	box-shadow: var(--shadow-primary-md, 0 12px 28px rgba(10, 132, 255, 0.28));
}
.tc-btn-secondary { background: var(--tix-pill-bg); color: var(--tix-text); }
.tc-btn-ghost { background: transparent; border-color: var(--tix-card-border); color: var(--tix-text); }
.tc-btn-danger { background: var(--tix-danger); color: var(--tix-danger-fg); }
.tc-mini { padding: 5px 12px; font-size: 12px; }
.tc-btn-primary:hover, .tc-btn-primary:focus-visible {
	transform: translateY(-1px); box-shadow: var(--shadow-primary-lg); outline: none;
}
.tc-btn-secondary:hover, .tc-btn-secondary:focus-visible,
.tc-btn-danger:hover, .tc-btn-danger:focus-visible {
	transform: translateY(-1px); box-shadow: var(--shadow-md); filter: brightness(1.06); outline: none;
}
.tc-btn-ghost:hover, .tc-btn-ghost:focus-visible {
	transform: translateY(-1px); background: var(--tix-pill-bg); border-color: var(--tix-button-bg); outline: none;
}
.tc-btn:disabled { transform: none; box-shadow: none; filter: none; }

.tc-trigger-btn {
	appearance: none; border: 1px solid var(--tix-card-border); border-radius: var(--radius-full);
	background: var(--tix-pill-bg); color: var(--tix-text);
	padding: 9px 18px; font-size: 14px; font-weight: 600; cursor: pointer;
	display: inline-flex; align-items: center; gap: 6px; font-family: var(--tix-font);
}
.tc-trigger-btn:hover { opacity: 0.85; }

.tc-form { display: grid; gap: 12px; border-top: 1px solid var(--tix-card-border); padding-top: 16px; }
.tc-form h3 { margin: 0; font-size: 14px; font-weight: 700; }
.tc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 10px; align-items: end; }
.tc-form label { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; }
.tc-form label.tc-check { display: flex; flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.tc-form input[type=text], .tc-form input[type=number], .tc-form textarea {
	width: 100%; padding: 7px 9px; border-radius: var(--radius-md);
	border: 1px solid var(--tix-card-border); background: var(--tix-card-bg); color: inherit;
	font: inherit; font-size: 16px;
}
.tc-full { grid-column: 1 / -1; }
.tc-form-actions { display: flex; gap: 10px; }

@media (max-width: 640px) {
	.tc-modal { padding: 0; }
	.tc-modal-content { width: 100%; max-height: 100%; height: 100%; border-radius: 0; }
	.tc-table-scroll-wrap { margin-right: calc(-1 * (env(safe-area-inset-right, 0px) + 20px)); }
	.tc-form-actions { flex-direction: column; align-items: stretch; }
	.tc-form-actions .tc-btn { justify-content: center; min-height: 44px; }
}
