/**
 * Frontend styles for WC COA Manager
 */

.wc-coa-manager-frontend-wrapper {
	margin: 2em 0;
	padding: 1.5em;
	background: #f9f9f9;
	border-radius: 8px;
	border: 1px solid #e2e2e2;
}

.wc-coa-section-title {
	margin-top: 0;
	margin-bottom: 1em;
	font-size: 1.25em;
}

/* Latest Card */
.wc-coa-latest-card {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	background: #fff;
	padding: 1em;
	border-radius: 6px;
	box-shadow: 0 1px 3px rgba(0,0,0,0.05);
	margin-bottom: 1em;
	border: 1px solid #eee;
}

.wc-coa-card-details {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	flex: 1 1 auto;
}

.wc-coa-meta-item {
	display: flex;
	flex-direction: column;
	font-size: 0.9em;
}

.wc-coa-meta-item strong {
	color: #666;
	font-size: 0.85em;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.wc-coa-actions {
	margin-top: 10px;
	flex: 0 0 auto;
}

@media (min-width: 600px) {
	.wc-coa-actions {
		margin-top: 0;
	}
}

/* History */
.wc-coa-history-toggle {
	margin-bottom: 10px;
}

.wc-coa-toggle-btn {
	background: none;
	border: none;
	padding: 0;
	color: inherit;
	cursor: pointer;
	font-weight: 600;
	text-decoration: underline;
	display: inline-flex;
	align-items: center;
}

.wc-coa-icon-down {
	margin-left: 5px;
	transition: transform 0.2s ease;
}

.wc-coa-toggle-btn.is-active .wc-coa-icon-down {
	transform: rotate(180deg);
}

.wc-coa-history-list {
	background: #fff;
	border-radius: 6px;
	border: 1px solid #eee;
	overflow: hidden;
}

.wc-coa-history-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 10px 15px;
	border-bottom: 1px solid #eee;
	font-size: 0.9em;
}

.wc-coa-history-item:last-child {
	border-bottom: none;
}

.wc-coa-history-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
}

.wc-coa-date {
	font-weight: bold;
}

.wc-coa-lot, .wc-coa-lab {
	color: #666;
}

.wc-coa-view-mini-btn {
	background: none;
	border: 1px solid #ccc;
	padding: 4px 10px;
	border-radius: 3px;
	cursor: pointer;
	font-size: 0.85em;
	transition: background 0.2s;
}

.wc-coa-view-mini-btn:hover {
	background: #f0f0f0;
}

/* Lightbox Modal */
.wc-coa-lightbox {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 999999;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: opacity 0.3s ease;
}

.wc-coa-lightbox-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0,0,0,0.8);
}

.wc-coa-lightbox-content {
	position: relative;
	max-width: 90%;
	max-height: 90%;
	z-index: 1000000;
	display: flex;
	flex-direction: column;
}

.wc-coa-lightbox-close {
	position: absolute;
	top: -40px;
	right: -10px;
	background: none;
	border: none;
	color: #fff;
	font-size: 35px;
	cursor: pointer;
	line-height: 1;
}

.wc-coa-lightbox-image-container {
	position: relative;
	background: #fff;
	border-radius: 4px;
	overflow: hidden;
	box-shadow: 0 5px 25px rgba(0,0,0,0.3);
}

.wc-coa-lightbox-img {
	display: block;
	max-width: 100%;
	max-height: 80vh;
	object-fit: contain;
}

.wc-coa-lightbox-caption {
	padding: 10px 15px;
	background: #fff;
	color: #333;
	font-size: 0.9em;
	text-align: center;
	border-top: 1px solid #eee;
}

.wc-coa-lightbox-nav {
	position: absolute;
	top: 50%;
	left: -50px;
	right: -50px;
	transform: translateY(-50%);
	display: flex;
	justify-content: space-between;
	pointer-events: none;
}

.wc-coa-nav-btn {
	background: rgba(255,255,255,0.2);
	border: none;
	color: #fff;
	font-size: 40px;
	width: 40px;
	height: 60px;
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	pointer-events: auto;
	transition: background 0.2s;
}

.wc-coa-nav-btn:hover {
	background: rgba(255,255,255,0.5);
}

.wc-coa-prev {
	border-radius: 4px 0 0 4px;
}
.wc-coa-next {
	border-radius: 0 4px 4px 0;
}

@media (max-width: 768px) {
	.wc-coa-lightbox-nav {
		left: 0;
		right: 0;
	}
	.wc-coa-nav-btn {
		background: rgba(0,0,0,0.5);
	}
	.wc-coa-lightbox-close {
		right: 0;
		top: -35px;
	}
}
