/* ==========================================================================
   Client Assets Portal – Frontend Styles
   ========================================================================== */

/* ==========================================================================
   Page wrapper
   ========================================================================== */

.cap-downloads-page {
	width: 100%;
}

.cap-section-title {
	font-size: 1.3em;
	margin: 0 0 16px;
	padding-bottom: 10px;
	border-bottom: 2px solid var(--bs-border-color, #dee2e6);
}

.cap-section--user {
	margin-top: 40px;
}

/* ==========================================================================
   Assets table
   – Use !important to override Bootstrap's table>:not(caption)>*>* resets
   ========================================================================== */

.cap-table {
	width: 100%;
	table-layout: fixed;
	border-collapse: collapse !important;
	font-size: 0.9em;
	border: 1px solid var(--bs-border-color, #dee2e6) !important;
	margin-bottom: 0 !important;
}

.cap-table thead th {
	text-align: left;
	padding: 10px 12px !important;
	background: #f8f9fa;
	border: 1px solid var(--bs-border-color, #dee2e6) !important;
	border-width: 1px !important;
	font-weight: 600;
	color: #333;
	overflow: hidden;
	white-space: nowrap;
}

.cap-table tbody tr {
	transition: background 0.15s;
}

.cap-table tbody tr:hover {
	background: rgba(0, 0, 0, 0.02);
}

.cap-table td {
	padding: 10px 12px !important;
	vertical-align: middle !important;
	border: 1px solid var(--bs-border-color, #dee2e6) !important;
	border-width: 1px !important;
	overflow: hidden;
}

/* Column widths */
.cap-table__col-icon   { width: 56px; }
.cap-table__col-label  { width: auto; }
.cap-table__col-type   { width: 80px; white-space: nowrap; }
.cap-table__col-size   { width: 90px; white-space: nowrap; color: #6c757d; font-size: 0.875em; }
.cap-table__col-action { width: 140px; text-align: right; }

/* ==========================================================================
   Thumbnails / placeholders
   ========================================================================== */

.cap-table__thumb {
	width: 36px !important;
	height: 36px !important;
	object-fit: contain;
	border-radius: 3px;
	display: block !important;
	flex-shrink: 0;
}

.cap-table__thumb--placeholder {
	object-fit: contain !important;
	padding: 4px;
	background: #f0f0f0;
	border-radius: 3px;
	width: 36px !important;
	height: 36px !important;
	min-width: 36px;
	min-height: 36px;
	box-sizing: border-box;
}

/* ==========================================================================
   File type badge
   ========================================================================== */

.cap-badge {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	background: #e9e9e9;
	color: #555;
}

.cap-badge--pdf             { background: #fde8e8; color: #c0392b; }
.cap-badge--jpg,
.cap-badge--png,
.cap-badge--gif,
.cap-badge--webp            { background: #e3f0fb; color: #1a6dad; }
.cap-badge--xls,
.cap-badge--xlsx            { background: #e3f8e3; color: #1a7a1a; }

/* ==========================================================================
   Messages
   ========================================================================== */

.cap-message {
	padding: 14px 18px;
	border-radius: 4px;
	background: #f5f5f5;
	border: 1px solid var(--bs-border-color, #dee2e6);
	color: #555;
}

.cap-message--login {
	background: #fff8e5;
	border-color: #f0c040;
	color: #7a6000;
}

.cap-message p {
	margin: 0;
}

.cap-message a {
	color: inherit;
	font-weight: 600;
	text-decoration: underline;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 600px) {
	.cap-table__col-size {
		display: none;
	}

	.cap-table__col-action {
		width: auto;
	}
}
