.il-library { margin: 0 auto; }

/* Placeholder shown while AJAX content loads */
.il-library-root { min-height: 120px; }

.il-spinner-wrap {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 2.5em 0;
}
.il-spinner {
	display: inline-block;
	width: 28px;
	height: 28px;
	border: 3px solid rgba(0,0,0,.12);
	border-top-color: #0073aa;
	border-radius: 50%;
	flex-shrink: 0;
	animation: il-spin .7s linear infinite;
}
.il-spinner-label {
	color: #888;
	font-size: 1rem;
}
@keyframes il-spin {
	to { transform: rotate(360deg); }
}
.il-section-title { margin-top: 2em; margin-bottom: .75em; }

/* Notices */
.il-notice {
	padding: 12px 16px;
	border-radius: 4px;
	margin: 1em 0;
}
.il-notice--info    { background: #e8f4fd; border-left: 4px solid #2196f3; }
.il-notice--warning { background: #fff8e1; border-left: 4px solid #ffa000; }
.il-notice--success { background: #e8f5e9; border-left: 4px solid #4caf50; }
.il-notice--error   { background: #fdecea; border-left: 4px solid #f44336; }

/* Item grid */
.il-items-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1.5em;
	margin: 1.5em 0;
}

.il-item-card {
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	overflow: hidden;
	display: flex;
	flex-direction: column;
	background: #fff;
	transition: box-shadow .2s;
}
.il-item-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.1); }

.il-item-card--checked-out,
.il-item-card--back-soon { opacity: .7; position: relative; }
.il-item-card--checked-out:hover,
.il-item-card--back-soon:hover { box-shadow: none; cursor: default; }
.il-checked-out-overlay {
	position: absolute;
	inset: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 1;
	pointer-events: none;
}
.il-checked-out-overlay span {
	background: rgba(0,0,0,.55);
	color: #fff;
	font-weight: 700;
	font-size: .9rem;
	letter-spacing: .06em;
	text-transform: uppercase;
	padding: 6px 16px;
	border-radius: 4px;
}
.il-item-card--back-soon .il-checked-out-overlay span {
	background: rgba(46,125,50,.8);
}

.il-item-thumb img { width: 100%; height: 200px; object-fit: cover; display: block; }
.il-item-thumb--placeholder { width: 100%; height: 200px; background: #f5f5f5; }

.il-item-body { padding: 14px; flex: 1; display: flex; flex-direction: column; }
.il-item-title { margin: 0 0 4px; font-size: 1rem; font-weight: 600; }
.il-item-tracking { font-size: .75rem; color: #888; margin-bottom: 8px; display: block; }
.il-item-excerpt { font-size: .875rem; color: #555; margin: 0 0 8px; }
.il-read-more { font-size: .8rem; color: #0073aa; text-decoration: none; margin-bottom: 10px; display: inline-block; }
.il-read-more:hover { text-decoration: underline; }

/* Item description modal */
.il-desc-modal-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0,0,0,.55);
	z-index: 99999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
}
.il-desc-modal-box {
	background: #fff;
	border-radius: 6px;
	padding: 28px 28px 24px;
	width: 580px;
	max-width: 100%;
	max-height: 80vh;
	overflow-y: auto;
	position: relative;
	box-shadow: 0 8px 32px rgba(0,0,0,.2);
}
.il-desc-modal-close {
	position: absolute;
	top: 12px;
	right: 14px;
	background: none;
	border: none;
	font-size: 1.6rem;
	line-height: 1;
	cursor: pointer;
	color: #888;
	padding: 0 4px;
}
.il-desc-modal-close:hover { color: #333; }
.il-desc-modal-content h3 { margin-top: 0; }
.il-desc-modal-content p { margin-bottom: 1em; }

/* Status badges (same as admin but public-facing) */
.il-status {
	display: inline-block;
	padding: 2px 8px;
	border-radius: 3px;
	font-size: .8rem;
	font-weight: 600;
	text-transform: uppercase;
}
.il-status--new_request      { background: #e5f5fa; color: #0073aa; }
.il-status--shipped          { background: #fff8e5; color: #b45309; }
.il-status--with_user        { background: #edfaed; color: #2e7d32; }
.il-status--return_requested { background: #fff3cd; color: #856404; }
.il-status--awaiting_return  { background: #fde8d8; color: #9a3412; }
.il-status--returned         { background: #f3e8ff; color: #6d28d9; }
.il-status--completed        { background: #f0f0f0; color: #555;    }

/* Guest "members only" label */
.il-members-only {
	display: inline-block;
	margin-top: auto;
	padding: 6px 12px;
	background: #f5f5f5;
	color: #888;
	border-radius: 4px;
	font-size: .85rem;
	font-style: italic;
}

/* Request button */
.il-button {
	display: inline-block;
	margin-top: auto;
	padding: 8px 16px;
	background: #0073aa;
	color: #fff;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: .9rem;
	text-align: center;
	transition: background .2s;
}
.il-button:hover { background: #005f8a; color: #fff; }
.il-button:disabled { background: #aaa; cursor: not-allowed; }

/* Mystery button */
.il-mystery-section { margin: 1.5em 0; }
.il-request-mystery { font-size: 1.05rem; padding: 12px 24px; }

/* Return label button */
.il-return-btn {
	background: #e67e22;
	color: #fff;
	border: none;
	border-radius: 4px;
	padding: 6px 14px;
	cursor: pointer;
	font-size: .85rem;
	white-space: nowrap;
	transition: background .2s;
}
.il-return-btn:hover { background: #ca6f1e; color: #fff; }
.il-return-btn:disabled { background: #aaa; cursor: not-allowed; }

/* Feedback message */
.il-request-feedback {
	padding: 12px 16px;
	border-radius: 4px;
	margin: 1em 0;
	font-weight: 500;
}

/* My Account tab table */
.il-account-table .il-co-item { display: flex; align-items: center; gap: 10px; }
.il-co-thumb { width: 48px; height: 48px; object-fit: cover; border-radius: 3px; flex-shrink: 0; }

/* My checkouts history link */
.il-history-link { margin-top: 10px; font-size: .9rem; }

/* My checkouts table */
.il-my-checkouts { margin-top: 3em; }
.il-my-checkouts-table { width: 100%; border-collapse: collapse; }
.il-my-checkouts-table th,
.il-my-checkouts-table td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #e0e0e0; }
.il-my-checkouts-table th { background: #f5f5f5; font-weight: 600; }
.il-checkout-thumb { width: 40px; height: 40px; object-fit: cover; border-radius: 3px; vertical-align: middle; margin-right: 8px; }
.il-checkout-item { display: flex; align-items: center; }
.il-checkout-row--active td { font-weight: 500; }
.il-overdue { color: #c62828; }
