/* =============================================================================
   HIA-FBG Custom Styles
   Domain-specific styles that supplement Bootstrap 5.
   ============================================================================= */

/* Override Bootstrap defaults to match app design */
html body {
	color: #252525;
	font-family: 'Helvetica', 'Arial', sans-serif;
	font-size: 18px;
	line-height: 1.25em;
}

a {
	color: #1F8FD8;
	text-decoration: none;
}

/* =============================================================================
   Inspection Headers (blue section banners)
   ============================================================================= */
div.inspection-header {
	background: #176BA2;
	color: #fff;
	padding: 1em;
}

div.inspection-header a {
	color: #D2E9F7;
}

div.inspection-header h3, div.inspection-header-summary h3 {
	font-size: 7em;
}

div.inspection-header h4, div.inspection-header-summary h4 {
	font-size: 1.5em;
}

div.inspection-header-summary h3 span, div.inspection-header-summary h4 span {
	color: #7F7F7F;
}

h3 span, h4 span, h5 span {
	color: #D2E9F7;
	display: block;
	font-size: 18px;
	font-weight: normal;
	line-height: 14px;
}

h3 span {
	margin-bottom: -10px;
}

#inspection-score,
#mobile-compliance {
	color: inherit;
	display: inline;
	font-size: inherit;
	font-weight: inherit;
	line-height: inherit;
}

/* =============================================================================
   Grade Colors (A/B/C/D scoring)
   ============================================================================= */
.grade {
	font-size: 2em;
	font-weight: bold;
	padding: .5em;
	text-align: center;
	vertical-align: middle;
}

.grade span {
	font-size: .5em;
}

.grade-A {
	background: var(--bs-success) !important;
	color: #fff !important;
}

.grade-B {
	background: var(--bs-info) !important;
	color: #fff !important;
}

.grade-C {
	background: var(--bs-warning) !important;
	color: #fff !important;
}

.grade-D {
	background: var(--bs-danger) !important;
	color: #fff !important;
}

/* =============================================================================
   Toggle Buttons (InspectionPoint compliance AJAX)
   ============================================================================= */
.status-buttons {
	min-width: 280px;
}

.toggle-btn-group {
	display: flex;
	gap: 6px;
	flex-wrap: nowrap;
}

.toggle-ip-btn {
	background: #e0e0e0;
	border: 1px solid #ccc;
	border-radius: 4px;
	color: #666;
	cursor: pointer;
	font-size: 1em;
	font-weight: bold;
	min-width: 44px;
	min-height: 44px;
	padding: 8px 12px;
	transition: all 0.15s ease;
}

.toggle-ip-btn:hover {
	background: #d0d0d0;
	border-color: #999;
}

/* IN button active state - green */
.toggle-ip-btn.active {
	background: #71B900;
	border-color: #71B900;
	color: #fff;
}

/* OUT button active state - orange/red */
.toggle-ip-btn.btn-out.active {
	background: #ED9205;
	border-color: #ED9205;
	color: #fff;
}

/* NA, NO, COS buttons active state - blue */
.toggle-ip-btn.btn-other.active {
	background: #1F8FD8;
	border-color: #1F8FD8;
	color: #fff;
}

/* Loading state for toggle buttons */
.toggle-btn-group.loading {
	opacity: 0.6;
	pointer-events: none;
	position: relative;
}

.toggle-btn-group.loading::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: -6px;
	width: 0;
	height: 3px;
	background: #1F8FD8;
	animation: progress-grow 1.5s ease-out forwards;
}

@keyframes progress-grow {
	0% { width: 0; }
	20% { width: 30%; }
	50% { width: 60%; }
	80% { width: 85%; }
	100% { width: 95%; }
}

/* =============================================================================
   Compliance Status
   ============================================================================= */
td.out, tr.odd td.out, li.out a, li.out {
	color: #C70B0A;
}

tr.subheader th {
	background: #f2f2f2;
}

/* =============================================================================
   Inspection Lists
   ============================================================================= */
ul.inspection-list h5 {
	font-size: 5em;
}

ul.inspection-list li {
	border-bottom: 1px solid #f2f2f2;
}

ul.establishment-list a, ul.inspection-list li a {
	display: block;
}

ul.inspection-list h5 span {
	color: #7F7F7F;
}

/* =============================================================================
   Temperatures
   ============================================================================= */
ul.temps li {
	background: #f2f2f2;
	display: inline;
	line-height: 2.5em;
	padding: .5em;
}

/* =============================================================================
   Comments and Actions
   ============================================================================= */
p.comment {
	color: #ADADAD;
	font-size: .9em;
	font-style: italic;
}

span.action {
	display: block;
	font-style: italic;
	font-weight: bold;
}

div.corrective-actions ul li {
	list-style: disc;
	margin-left: 2em;
}

/* =============================================================================
   Action Buttons
   ============================================================================= */
div.action-buttons p {
	clear: both;
	padding: 2em 0 0 0;
}

/* =============================================================================
   Alphabet Navigation (home page)
   ============================================================================= */
table.letters {
	font-size: 3em;
	font-weight: bold;
	line-height: 1.5em;
	width: 100%;
}

table.letters tr td {
	border: 1px solid #fff;
	color: #e0e0e0;
	padding: 0;
	text-align: center;
	width: 25%;
}

table.letters tr td a {
	background: #1F8FD8;
	color: #fff;
	display: block;
}

/* =============================================================================
   Dashboard
   ============================================================================= */
.warning-score {
	color: #d73a49;
	font-weight: bold;
}

.weekly-counts td, .weekly-counts th {
	padding: 2px 6px;
	font-size: 0.9em;
}

/* =============================================================================
   Misc
   ============================================================================= */
.highlight {
	background: #71B900;
	color: #fff;
}

tr.highlight td a {
	color: #fff;
}

.inactive {
	text-decoration: line-through;
}

span.loading {
	display: none;
}

#signature {
	border: 1px solid #000;
}

canvas {
	margin: 2em 0 8em 0;
}
