/* bt5-fix.css — Bootstrap 5 visual compatibility layer.
   Makes BT5 render with BT3-like sizing and spacing so the UI
   matches the original Bootstrap 3 design after the upgrade. */

/* ── Base font size (BT3 = 14px, BT5 = 16px) ────────────────────────── */
html {
	font-size: 14px;
}

/* ── Buttons: tighter padding (BT3 style) ───────────────────────────── */
.btn {
	padding: 5px 10px;
	font-size: 13px;
	line-height: 1.4;
	border-radius: 3px;
}
.btn-sm {
	padding: 3px 8px;
	font-size: 12px;
	line-height: 1.35;
	border-radius: 2px;
}
.btn-lg {
	padding: 8px 14px;
	font-size: 15px;
	line-height: 1.45;
	border-radius: 4px;
}
.btn-xs {
	padding: 1px 5px;
	font-size: 11px;
	line-height: 1.3;
	border-radius: 2px;
}

/* ── Form controls: BT3 height/padding ─────────────────────────────── */
.form-control {
	height: 32px;
	padding: 4px 10px;
	font-size: 13px;
	line-height: 1.4;
	border-radius: 3px;
}
select.form-control {
	height: 32px;
	padding: 4px 8px;
}
textarea.form-control {
	height: auto;
}
.form-select {
	height: 32px;
	padding: 4px 30px 4px 10px;
	font-size: 13px;
	border-radius: 3px;
}
.form-label {
	font-size: 13px;
	margin-bottom: 3px;
	font-weight: 600;
}
.input-group-text {
	font-size: 13px;
	padding: 4px 10px;
}

/* ── Card (was Panel): tighter header/body ──────────────────────────── */
.card-header {
	padding: 8px 12px;
}
.card-body {
	padding: 10px 12px;
}
.card-footer {
	padding: 8px 12px;
}

/* ── Navbar: BT3-style height/padding ───────────────────────────────── */
.navbar {
	min-height: 46px;
	padding-top: 4px;
	padding-bottom: 4px;
}
.navbar-brand {
	font-size: 16px;
	padding: 10px 12px;
	height: auto;
}
.navbar-nav .nav-link {
	padding-top: 10px;
	padding-bottom: 10px;
	font-size: 13px;
}
.navbar-text {
	font-size: 13px;
}

/* ── Tables: BT3 cell padding ───────────────────────────────────────── */
.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
	padding: 6px 8px;
	font-size: 13px;
	line-height: 1.4;
}

/* ── Dropdowns ──────────────────────────────────────────────────────── */
.dropdown-menu {
	font-size: 13px;
	padding: 4px 0;
}
.dropdown-item {
	padding: 4px 16px;
	font-size: 13px;
	line-height: 1.4;
	display: block;
	width: 100%;
	clear: both;
	color: #e6edf3;
	text-decoration: none;
	white-space: nowrap;
	background-color: transparent;
	border: 0;
	cursor: pointer;
}
.dropdown-item:hover,
.dropdown-item:focus {
	color: #fff;
	background-color: rgba(255, 255, 255, 0.12);
	outline: none;
}
.dropdown-item:active {
	background-color: rgba(255, 255, 255, 0.2);
}
/* Dark dropdown menus */
.dropdown-menu-dark {
	background-color: #1a1a2e;
	border-color: rgba(255, 255, 255, 0.1);
}
.dropdown-menu-dark .dropdown-item {
	color: #c9d1d9;
}
.dropdown-menu-dark .dropdown-item:hover,
.dropdown-menu-dark .dropdown-item:focus {
	color: #fff;
	background-color: rgba(255, 255, 255, 0.12);
}
/* Remove BS3 list styling from dropdown items */
.dropdown-menu li {
	list-style: none;
	margin: 0;
	padding: 0;
}

/* ── Badges ─────────────────────────────────────────────────────────── */
.badge {
	font-size: 11px;
	padding: 3px 7px;
	border-radius: 8px;
}

/* ── Alerts ─────────────────────────────────────────────────────────── */
.alert {
	padding: 10px 14px;
	font-size: 13px;
	border-radius: 3px;
}

/* ── List groups ────────────────────────────────────────────────────── */
.list-group-item {
	padding: 8px 12px;
	font-size: 13px;
}

/* ── Modals: BT3 sizing ─────────────────────────────────────────────── */
.modal-header {
	padding: 12px 14px 8px;
}
.modal-body {
	padding: 10px 14px;
	font-size: 13px;
}
.modal-footer {
	padding: 8px 14px 12px;
}
.modal-title {
	font-size: 16px;
}

/* ── Popovers / Tooltips ────────────────────────────────────────────── */
.popover {
	font-size: 13px;
}
.popover-header {
	padding: 6px 12px;
	font-size: 14px;
}
.popover-body {
	padding: 8px 12px;
}

/* ── Progress bars ──────────────────────────────────────────────────── */
.progress {
	height: 18px;
	border-radius: 3px;
}

/* ── General spacing fixes ──────────────────────────────────────────── */
.lead {
	font-size: 18px;
}
small, .small {
	font-size: 84%;
}
h1, .h1 { font-size: 2rem; }
h2, .h2 { font-size: 1.6rem; }
h3, .h3 { font-size: 1.35rem; }
h4, .h4 { font-size: 1.1rem; }
h5, .h5 { font-size: 1rem; }
h6, .h6 { font-size: 0.85rem; }

/* ── Custom Dice toolbar icon spacing ───────────────────────────────── */
.f_header {
	margin: 1px 2px;
}



/* Dropdown menus above ACE editor */
.dropup .dropdown-menu,
.dropdown .dropdown-menu {
	z-index: 10000;
}

/* #langTheme dropup — keep out of flow so #extra_functions doesn't wrap */
.dropup .dropdown-menu.show {
	position: absolute !important;
	top: auto !important;
	bottom: 100% !important;
	left: 0 !important;
}
/* Ensure dropup has positioning context */
.dropup {
	position: relative !important;
}

/* bootstrap-select dark theme override */
.bootstrap-select .btn.dropdown-toggle.btn-light {
	background-color: #1a1a2e;
	color: #c9d1d9;
	border-color: rgba(255, 255, 255, 0.15);
}
.bootstrap-select .btn.dropdown-toggle.btn-light:hover {
	background-color: #21262d;
	color: #e6edf3;
}

/* bootstrap-select dark dropdown menu */
.bootstrap-select .dropdown-menu {
	background-color: #1a1a2e;
	border-color: rgba(255, 255, 255, 0.1);
}
.bootstrap-select .dropdown-menu .dropdown-header {
	color: #8b949e;
	font-size: 11px;
	text-transform: uppercase;
	padding: 4px 16px 2px;
}
.bootstrap-select .dropdown-menu .dropdown-item {
	color: #c9d1d9;
}
.bootstrap-select .dropdown-menu .dropdown-item:hover,
.bootstrap-select .dropdown-menu .dropdown-item:focus,
.bootstrap-select .dropdown-menu .dropdown-item.active,
.bootstrap-select .dropdown-menu .dropdown-item.selected {
	color: #fff;
	background-color: rgba(255, 255, 255, 0.12);
}
.bootstrap-select .dropdown-menu .dropdown-divider {
	border-color: rgba(255, 255, 255, 0.08);
}
.bootstrap-select .dropdown-menu .bs-ok-default::after {
	border-color: #3fb950;
}

/* ── Judge Result Popup (SweetAlert2) ──────────────────────────────── */
.judge-header {
  background-color: #a73bfb66;
  color: #e6edf3;
  font-weight: 600;
  height: 36px;
  line-height: 36px;
  padding-left: 10px;
  margin-left: -10px;
  margin-right: -10px;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.judge-header i.fa {
  cursor: pointer;
  color: #8b949e;
  font-size: 16px;
}
.judge-header i.fa:hover { color: #e6edf3; }

table.judgeresult,
table.judgescore {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0;
  font-size: 13px;
  color: #c9d1d9;
  background: #0d1117;
}
table.judgeresult caption,
table.judgescore caption {
  font-size: 14px;
  font-weight: 600;
  color: #e6edf3;
  padding: 6px;
  background: #161b22;
}
table.judgeresult td,
table.judgescore td {
  padding: 6px 10px;
  border: 1px solid #198754;
  text-align: center;
}
table.judgeresult td[bgcolor],
table.judgescore td[bgcolor] {
  background: rgba(255,255,255,0.04) !important;
  font-weight: 500;
  color: #8b949e;
  width: 20%;
}
.scotitle {
  color: #58a6ff;
}
table.judgescore textarea {
  background: #0d1117;
  color: #c9d1d9;
  font-family: monospace;
  font-size: 12px;
  padding: 8px;
  border-radius: 4px;
  resize: none;
}
font[color="red"] { color: #3fb950 !important; }
.miltime { display: none; }
