/**
 * Acresia Detail View Styles
 * Reusable detail/read-only view design for Joomla 6 frontend single-record views.
 * Load via WebAssetManager: $wa->registerAndUseStyle('tpl.acresia.detail', 'media/templates/site/cassiopeia_acresia_tools/css/acresia-detail.css');
 *
 * @package    cassiopeia_acresia_tools
 * @author     mcnezmo <nezmar@acresia.com>
 * @copyright  2026 ACRESIA Consulting
 */

/* ===================================================================
   Detail view wrapper
   =================================================================== */
.pad-detail {
	max-width: 900px;
}

/* ===================================================================
   Header card (highlighted top card with icon + title)
   =================================================================== */
.pad-header-card {
	background: var(--at-surface, #fff);
	border: 2px solid #6a9f55;
	border-radius: 12px;
	padding: 24px;
	margin-bottom: 24px;
	box-shadow: 0 2px 12px rgba(106, 159, 85, 0.1);
}
.pad-header {
	display: flex;
	align-items: flex-start;
	gap: 16px;
}
.pad-icon {
	flex-shrink: 0;
	width: 64px;
	height: 64px;
}
.pad-icon img {
	width: 64px;
	height: 64px;
	object-fit: contain;
}
.pad-title-block {
	flex: 1;
	min-width: 0;
}
.pad-name {
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--at-text, #212529);
	margin: 0 0 4px 0;
}
.pad-short {
	display: inline-block;
	font-size: 0.9rem;
	background: var(--at-tint-green, #e8f5e2);
	color: var(--at-text-green, #3d7a2a);
	border-radius: 6px;
	padding: 2px 12px;
	font-weight: 600;
}
.pad-type-label {
	font-size: 0.85rem;
	color: var(--at-text-muted, #6c757d);
	margin-top: 6px;
}

/* ===================================================================
   Sections (white cards with green section title)
   =================================================================== */
.pad-section {
	background: var(--at-surface, #fff);
	border: 1px solid var(--at-border, #dee2e6);
	border-radius: 10px;
	padding: 20px 24px;
	margin-bottom: 16px;
}
.pad-section-title {
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	color: #6a9f55;
	font-weight: 700;
	margin: 0 0 14px 0;
	padding-bottom: 8px;
	border-bottom: 1px solid var(--at-border, #e8f5e2);
}

/* ===================================================================
   Info grid (2-column label/value pairs)
   =================================================================== */
.pad-info-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 16px 32px;
}
@media (max-width: 576px) {
	.pad-info-grid {
		grid-template-columns: 1fr;
	}
}
.pad-field {
	display: flex;
	flex-direction: column;
}
.pad-field-label {
	font-size: 0.75rem;
	text-transform: uppercase;
	letter-spacing: 0.03em;
	color: var(--at-text-muted, #6c757d);
	margin-bottom: 2px;
}
.pad-field-value {
	font-size: 0.95rem;
	color: var(--at-text, #212529);
	font-weight: 500;
}
.pad-field-value.pad-empty {
	color: #adb5bd;
	font-weight: 400;
}

/* ===================================================================
   Aspect badges (large colored pills with value + label)
   =================================================================== */
.pad-aspects {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}
.pad-aspect-pill {
	display: flex;
	flex-direction: column;
	align-items: center;
	min-width: 80px;
	padding: 10px 16px;
	border-radius: 10px;
	color: #fff;
	font-weight: 700;
}
.pad-aspect-pill-zero {
	background: var(--at-surface-3, #e9ecef);
	color: var(--at-text-muted, #6c757d);
}
.pad-aspect-value {
	font-size: 1.5rem;
	line-height: 1;
}
.pad-aspect-label {
	font-size: 0.7rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	margin-top: 4px;
	opacity: 0.9;
}

/* ===================================================================
   Text block (specification, notes, descriptions)
   =================================================================== */
.pad-text-block {
	font-size: 0.9rem;
	color: var(--at-text-2, #495057);
	line-height: 1.6;
	white-space: pre-wrap;
}

/* ===================================================================
   List (legislation, references, etc.)
   =================================================================== */
.pad-leg-list {
	list-style: none;
	padding: 0;
	margin: 0;
}
.pad-leg-list li {
	padding: 6px 0;
	border-bottom: 1px solid var(--at-border, #f0f0f0);
	font-size: 0.9rem;
	color: var(--at-text-2, #495057);
}
.pad-leg-list li:last-child {
	border-bottom: none;
}
.pad-leg-number {
	font-weight: 600;
	color: #6a9f55;
	margin-right: 8px;
}

/* ===================================================================
   Related items grid (supporting assets, linked records)
   =================================================================== */
.pad-sa-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 12px;
}
.pad-sa-card {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	padding: 12px;
	border: 1px solid var(--at-border, #dee2e6);
	border-radius: 8px;
	background: var(--at-surface-2, #fafbfc);
	transition: border-color 0.15s;
}
.pad-sa-card:hover {
	border-color: #6a9f55;
}
.pad-sa-icon {
	flex-shrink: 0;
	width: 36px;
	height: 36px;
}
.pad-sa-icon img {
	width: 36px;
	height: 36px;
	object-fit: contain;
}
.pad-sa-info {
	flex: 1;
	min-width: 0;
}
.pad-sa-name {
	font-weight: 600;
	font-size: 0.9rem;
	color: var(--at-text, #212529);
}
.pad-sa-type {
	font-size: 0.78rem;
	color: var(--at-text-muted, #6c757d);
}
.pad-sa-aspects {
	display: flex;
	gap: 3px;
	margin-top: 4px;
}
.pad-sa-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 30px;
	height: 20px;
	border-radius: 10px;
	font-size: 0.7rem;
	font-weight: 600;
	color: #fff;
	padding: 0 5px;
}
.pad-sa-badge-zero {
	background: var(--at-surface-3, #e9ecef);
	color: var(--at-text-muted, #6c757d);
}

/* ===================================================================
   Action button bar (back / edit / export)
   =================================================================== */
.pad-actions {
	display: flex;
	gap: 10px;
	flex-wrap: wrap;
	margin-top: 24px;
	margin-bottom: 60px;
}
.pad-actions .btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
