/**
 * Cool Online PDF Reader - My Account Styles
 *
 * @package Manca\CoolOnlinePdfReaderForWoocommerce
 */

/* ==========================================================================
   Empty State
   ========================================================================== */

.copr-empty-books {
	text-align: center;
	padding: 60px 20px;
	background: #f8f9fa;
	border-radius: 8px;
	border: 1px dashed #dee2e6;
}

.copr-empty-icon {
	margin-bottom: 20px;
}

.copr-empty-icon .dashicons {
	font-size: 64px;
	width: 64px;
	height: 64px;
	color: #adb5bd;
}

.copr-empty-books h3 {
	margin: 0 0 10px;
	color: #495057;
	font-size: 24px;
}

.copr-empty-books p {
	margin: 0 0 20px;
	color: #6c757d;
	max-width: 400px;
	margin-left: auto;
	margin-right: auto;
}

/* ==========================================================================
   Books Grid
   ========================================================================== */

.copr-my-books {
	padding: 10px 0;
}

.copr-books-count {
	color: #6c757d;
	margin-bottom: 20px;
}

.copr-books-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 24px;
}

/* ==========================================================================
   Book Card
   ========================================================================== */

.copr-book-card {
	background: #fff;
	border: 1px solid #e9ecef;
	border-radius: 8px;
	overflow: hidden;
	transition: box-shadow 0.2s ease, transform 0.2s ease;
	display: flex;
	flex-direction: column;
}

.copr-book-card:hover {
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
	transform: translateY(-2px);
}

/* ==========================================================================
   Book Cover
   ========================================================================== */

.copr-book-cover {
	position: relative;
	aspect-ratio: 3 / 4;
	background: #f1f3f4;
	overflow: hidden;
}

.copr-book-cover img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.copr-book-placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 100%;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.copr-book-placeholder .dashicons {
	font-size: 64px;
	width: 64px;
	height: 64px;
	color: rgba(255, 255, 255, 0.8);
}

.copr-reading-badge {
	position: absolute;
	top: 10px;
	right: 10px;
	background: #28a745;
	color: #fff;
	padding: 4px 10px;
	border-radius: 4px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
}

/* ==========================================================================
   Book Info
   ========================================================================== */

.copr-book-info {
	padding: 16px;
	flex-grow: 1;
}

.copr-book-title {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 600;
	color: #212529;
	line-height: 1.3;
}

.copr-book-excerpt {
	margin: 0 0 12px;
	color: #6c757d;
	font-size: 14px;
	line-height: 1.5;
}

.copr-purchase-date {
	margin: 8px 0 0;
	color: #adb5bd;
	font-size: 12px;
}

/* ==========================================================================
   Progress Bar
   ========================================================================== */

.copr-book-progress {
	margin-top: 12px;
}

.copr-progress-bar {
	height: 6px;
	background: #e9ecef;
	border-radius: 3px;
	overflow: hidden;
	margin-bottom: 6px;
}

.copr-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #007cba 0%, #00a0d2 100%);
	border-radius: 3px;
	transition: width 0.3s ease;
}

.copr-progress-text {
	font-size: 12px;
	color: #6c757d;
}

/* ==========================================================================
   Book Actions
   ========================================================================== */

.copr-book-actions {
	padding: 0 16px 16px;
}

.copr-read-btn {
	display: block;
	width: 100%;
	text-align: center;
	background: #007cba !important;
	color: #fff !important;
	border: none !important;
	padding: 12px 20px !important;
	border-radius: 6px !important;
	font-weight: 600 !important;
	text-decoration: none !important;
	transition: background 0.2s ease !important;
}

.copr-read-btn:hover {
	background: #005a87 !important;
	color: #fff !important;
}

/* ==========================================================================
   Responsive
   ========================================================================== */

@media (max-width: 576px) {
	.copr-books-grid {
		grid-template-columns: 1fr;
	}

	.copr-book-cover {
		aspect-ratio: 16 / 9;
	}

	.copr-empty-books {
		padding: 40px 15px;
	}

	.copr-empty-icon .dashicons {
		font-size: 48px;
		width: 48px;
		height: 48px;
	}
}

@media (min-width: 577px) and (max-width: 768px) {
	.copr-books-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* ==========================================================================
   WooCommerce Integration
   ========================================================================== */

.woocommerce-account .copr-my-books {
	margin-top: 0;
}

.woocommerce-account .copr-book-card {
	background: #fff;
}
