/* DolicraftBTP - Module CSS
 * Copyright (C) 2026 Dolicraft <contact@dolicraft.com>
 * GPLv3 or later
 */

/* Main menu icon */
div.mainmenu.dolicraftbtp span::before {
	content: "\f807" !important;
	font-family: "Font Awesome 5 Free" !important;
	font-weight: 900 !important;
}

/* ============================================
   SOUS-TRAITANT DOCUMENT EXPIRY ALERTS
   ============================================ */
.btp-alert-expired {
	color: #c0392b !important;
	font-weight: bold;
	background-color: #fde8e8;
	padding: 2px 6px;
	border-radius: 3px;
}
.btp-alert-warning {
	color: #e67e22 !important;
	font-weight: bold;
	background-color: #fef5e7;
	padding: 2px 6px;
	border-radius: 3px;
}
.btp-alert-ok {
	color: #27ae60;
	background-color: #eafaf1;
	padding: 2px 6px;
	border-radius: 3px;
}

/* ============================================
   MATERIAL STATUS BADGES
   ============================================ */
.btp-mat-planned {
	background-color: #eee;
	color: #666;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 0.85em;
}
.btp-mat-ordered {
	background-color: #d4efdf;
	color: #1e8449;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 0.85em;
}
.btp-mat-delivered {
	background-color: #d5f5e3;
	color: #117a65;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 0.85em;
}
.btp-mat-used {
	background-color: #ebf5fb;
	color: #2471a3;
	padding: 2px 8px;
	border-radius: 10px;
	font-size: 0.85em;
}

/* ============================================
   PROGRESS BAR (budget consumption)
   ============================================ */
.btp-progress-bar {
	display: inline-block;
	width: 120px;
	height: 10px;
	background-color: #ecf0f1;
	border-radius: 5px;
	overflow: hidden;
	vertical-align: middle;
	margin-left: 8px;
}
.btp-progress-fill {
	height: 100%;
	border-radius: 5px;
	transition: width 0.3s ease;
}

/* ============================================
   POINTAGE GRID
   ============================================ */
.btp-pointage-grid td {
	vertical-align: middle;
}
.btp-pointage-input {
	width: 55px !important;
	text-align: center !important;
	padding: 4px 2px !important;
	border: 1px solid #ddd !important;
	border-radius: 3px !important;
	transition: border-color 0.2s ease, background-color 0.2s ease;
}
.btp-pointage-input:focus {
	border-color: #3498db !important;
	background-color: #eaf3fb !important;
	outline: none;
}
.btp-pointage-input:hover {
	border-color: #aaa !important;
}

/* Today column highlight */
.btp-today {
	background-color: #eaf6fd !important;
}

/* Weekend column */
.btp-weekend {
	background-color: #f9f9f9 !important;
}
.btp-weekend .btp-pointage-input {
	background-color: #f5f5f5;
}

/* Hours visual feedback */
.btp-hours-filled {
	background-color: #fafff5 !important;
}
.btp-hours-high {
	background-color: #fff5f5 !important;
}

/* Weather selector in pointage header */
.btp-weather-select {
	width: 55px !important;
	font-size: 0.8em !important;
	padding: 2px !important;
}
.btp-weather-row td {
	padding: 3px !important;
}

/* ============================================
   JOURNAL TIMELINE
   ============================================ */
.btp-journal-timeline {
	position: relative;
	padding-left: 5px;
}
.btp-journal-date {
	font-weight: bold;
	font-size: 1.05em;
	color: #2c3e50;
	margin: 15px 0 8px 0;
	padding: 5px 10px;
	background-color: #f7f8fa;
	border-radius: 4px;
	border-left: 4px solid #3498db;
}
.btp-journal-entry {
	margin: 5px 0;
	padding: 8px 12px;
	background-color: #fff;
	border: 1px solid #eee;
	border-radius: 4px;
	transition: box-shadow 0.2s ease;
}
.btp-journal-entry:hover {
	box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}
.btp-journal-header {
	margin-bottom: 4px;
	line-height: 1.6;
}
.btp-journal-content {
	color: #555;
	font-size: 0.92em;
	padding: 5px 0 2px 0;
	border-top: 1px dashed #eee;
	margin-top: 4px;
}

/* ============================================
   GENERAL UTILITIES
   ============================================ */

/* Small inline forms */
.btp-inline-form {
	display: inline-block;
	margin: 0;
	padding: 0;
}

/* Tab content spacing */
.btp-tab-content {
	padding-top: 10px;
}

/* No wrap on action cells */
.btp-actions-cell {
	white-space: nowrap;
	text-align: right;
}

/* Filter bar */
.btp-filter-bar {
	background: #f8f9fa;
	padding: 10px 15px;
	border-radius: 4px;
	margin-bottom: 15px;
	border: 1px solid #e9ecef;
}

/* Summary info box */
.btp-summary-box {
	background: #f0f4f8;
	border: 1px solid #d6e0ea;
	border-radius: 4px;
	padding: 10px 15px;
	margin-top: 10px;
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
	.tabsAction,
	.divsearchfield,
	.button,
	.butAction,
	.butActionDelete,
	.deletefielda,
	form input[type="submit"] {
		display: none !important;
	}
	.btp-pointage-input {
		border: none !important;
		background: transparent !important;
		-webkit-appearance: none;
		-moz-appearance: textfield;
	}
	.btp-journal-entry {
		break-inside: avoid;
		border: 1px solid #ccc !important;
	}
	table {
		font-size: 10pt;
	}
}
