/**
 * AuthorKit Archive Book Template Styles
 *
 * Grid and list view styles for book archives.
 *
 * @package AuthorKit
 * @version 1.0.0
 */

/* ============================================
   ARCHIVE LAYOUT
   ============================================ */

.authorkit-books-archive {
	max-width: 1200px;
	margin: 0 auto;
	padding: 20px;
}

/* ============================================
   ARCHIVE HEADER
   ============================================ */

.authorkit-archive-header {
	margin-bottom: 30px;
	text-align: center;
	padding: 30px 20px;
	background: #f8f8f8;
	border-radius: 8px;
}

.authorkit-archive-header .page-title {
	margin: 0 0 15px 0;
	font-size: 36px;
	font-weight: 700;
	color: #1a1a1a;
}

.authorkit-archive-header .archive-description {
	font-size: 16px;
	line-height: 1.6;
	color: #666;
	max-width: 700px;
	margin: 0 auto;
}

/* ============================================
   ARCHIVE CONTROLS
   ============================================ */

.authorkit-archive-controls {
	margin-bottom: 30px;
	padding: 15px 20px;
	background: #ffffff;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
}

.authorkit-controls-wrapper {
	display: flex;
	justify-content: space-between;
	align-items: center;
	flex-wrap: wrap;
	gap: 15px;
}

.view-toggle {
	display: flex;
	gap: 5px;
	border: 1px solid #ddd;
	border-radius: 4px;
	overflow: hidden;
}

.view-btn {
	padding: 8px 12px;
	background: #ffffff;
	border: none;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
}

.view-btn .dashicons {
	width: 20px;
	height: 20px;
	font-size: 20px;
}

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

.view-btn.active {
	background: #0073aa;
	color: #ffffff;
}

.results-count {
	font-size: 15px;
	color: #666;
}

.results-count strong {
	color: #1a1a1a;
}

/* ============================================
   BOOKS GRID - GRID VIEW
   ============================================ */

.authorkit-books-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 30px;
	margin-bottom: 40px;
}

/* ============================================
   BOOK ITEM - GRID VIEW
   ============================================ */

.authorkit-book-item {
	background: #ffffff;
	border: 1px solid #e0e0e0;
	border-radius: 8px;
	overflow: hidden;
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
}

.authorkit-book-item:hover {
	transform: translateY(-5px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
	border-color: #0073aa;
}

/* Thumbnail */
.book-thumbnail {
	position: relative;
	width: 100%;
	padding-top: 140%; /* 7:10 aspect ratio for book covers */
	overflow: hidden;
	background: #f5f5f5;
}

.book-thumbnail .book-cover {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.book-thumbnail .placeholder {
	object-fit: contain;
	padding: 20px;
}

.coming-soon-badge {
	position: absolute;
	top: 10px;
	left: 10px;
	z-index: 10;
	padding: 5px 12px;
	background: #28a745;
	color: #ffffff;
	font-size: 12px;
	font-weight: 600;
	border-radius: 12px;
}

.book-link {
	display: block;
	width: 100%;
	height: 100%;
}

/* Book Info */
.book-info {
	padding: 20px;
	flex: 1;
	display: flex;
	flex-direction: column;
}

.book-title {
	margin: 0 0 10px 0;
	font-size: 18px;
	font-weight: 700;
	line-height: 1.3;
}

.book-title a {
	color: #1a1a1a;
	text-decoration: none;
}

.book-title a:hover {
	color: #0073aa;
}

.book-author {
	margin: 0 0 10px 0;
	font-size: 14px;
	color: #666;
}

.book-author a {
	color: #0073aa;
	text-decoration: none;
}

.book-author a:hover {
	text-decoration: underline;
}

.book-rating {
	display: flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 10px 0;
	font-size: 13px;
}

.book-rating .stars {
	color: #ffa500;
	font-size: 14px;
	letter-spacing: 1px;
}

.book-rating .rating-value {
	font-weight: 600;
	color: #333;
}

.book-rating .review-count {
	color: #666;
}

.book-excerpt {
	margin: 10px 0;
	font-size: 14px;
	line-height: 1.5;
	color: #555;
	display: none; /* Hidden in grid view */
}

.book-price {
	margin: 15px 0;
	font-size: 20px;
	font-weight: 700;
	color: #B12704;
}

.price-separator {
	color: #888;
	font-weight: 400;
	font-size: 14px;
	margin: 0 6px;
}

.book-actions {
	display: flex;
	flex-direction: column;
	gap: 8px;
	margin-top: auto;
	padding-top: 15px;
}

.authorkit-btn-view,
.authorkit-btn-buy {
	display: inline-block;
	padding: 10px 16px;
	font-size: 14px;
	font-weight: 600;
	text-align: center;
	text-decoration: none;
	border-radius: 4px;
	transition: all 0.3s ease;
	cursor: pointer;
}

.authorkit-btn-view {
	background: #0073aa;
	color: #ffffff;
	border: none;
}

.authorkit-btn-view:hover {
	background: #005177;
	color: #ffffff;
}

.authorkit-btn-buy {
	background: #ffa500;
	color: #ffffff;
	border: none;
}

.authorkit-btn-buy:hover {
	background: #ff8c00;
	color: #ffffff;
}

/* ============================================
   LIST VIEW
   ============================================ */

.authorkit-books-grid[data-view="list"] {
	grid-template-columns: 1fr;
	gap: 20px;
}

.authorkit-books-grid[data-view="list"] .authorkit-book-item {
	flex-direction: row;
	align-items: flex-start;
}

.authorkit-books-grid[data-view="list"] .book-thumbnail {
	flex: 0 0 180px;
	padding-top: 0;
	height: 250px;
	position: relative;
}

.authorkit-books-grid[data-view="list"] .book-info {
	flex: 1;
	padding: 20px 25px;
}

.authorkit-books-grid[data-view="list"] .book-title {
	font-size: 22px;
	margin-bottom: 8px;
}

.authorkit-books-grid[data-view="list"] .book-excerpt {
	display: block; /* Show in list view */
}

.authorkit-books-grid[data-view="list"] .book-actions {
	flex-direction: row;
	gap: 12px;
	margin-top: 15px;
}

.authorkit-books-grid[data-view="list"] .authorkit-btn-view,
.authorkit-books-grid[data-view="list"] .authorkit-btn-buy {
	min-width: 140px;
}

/* ============================================
   PAGINATION
   ============================================ */

.authorkit-pagination {
	margin-top: 40px;
	text-align: center;
}

.authorkit-pagination .nav-links {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.authorkit-pagination .page-numbers {
	display: inline-block;
	padding: 10px 16px;
	background: #ffffff;
	color: #0073aa;
	text-decoration: none;
	border: 1px solid #e0e0e0;
	border-radius: 4px;
	transition: all 0.3s ease;
}

.authorkit-pagination .page-numbers:hover {
	background: #f0f0f0;
	border-color: #0073aa;
}

.authorkit-pagination .page-numbers.current {
	background: #0073aa;
	color: #ffffff;
	border-color: #0073aa;
	font-weight: 600;
}

.authorkit-pagination .page-numbers.dots {
	border: none;
	background: transparent;
}

.authorkit-pagination .page-numbers.dots:hover {
	background: transparent;
	border: none;
}

/* ============================================
   NO BOOKS FOUND
   ============================================ */

.authorkit-no-books {
	text-align: center;
	padding: 60px 20px;
	background: #f8f8f8;
	border-radius: 8px;
}

.authorkit-no-books h2 {
	margin: 0 0 15px 0;
	font-size: 28px;
	color: #1a1a1a;
}

.authorkit-no-books p {
	margin: 0 0 25px 0;
	font-size: 16px;
	color: #666;
}

.authorkit-no-books .authorkit-btn-primary {
	display: inline-block;
	padding: 12px 30px;
	background: #0073aa;
	color: #ffffff;
	text-decoration: none;
	border-radius: 4px;
	font-weight: 600;
	transition: all 0.3s ease;
}

.authorkit-no-books .authorkit-btn-primary:hover {
	background: #005177;
	color: #ffffff;
	transform: translateY(-2px);
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media screen and (max-width: 768px) {
	.authorkit-books-grid {
		grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
		gap: 20px;
	}

	.authorkit-archive-header .page-title {
		font-size: 28px;
	}

	.authorkit-controls-wrapper {
		flex-direction: column;
		align-items: flex-start;
	}

	.authorkit-books-grid[data-view="list"] .authorkit-book-item {
		flex-direction: column;
	}

	.authorkit-books-grid[data-view="list"] .book-thumbnail {
		flex: 0 0 auto;
		width: 100%;
		padding-top: 140%;
		height: auto;
	}

	.authorkit-books-grid[data-view="list"] .book-thumbnail .book-cover {
		position: absolute;
		top: 0;
		left: 0;
	}
}

@media screen and (max-width: 480px) {
	.authorkit-books-grid {
		grid-template-columns: 1fr;
	}

	.book-info {
		padding: 15px;
	}

	.book-title {
		font-size: 16px;
	}

	.book-actions {
		flex-direction: column;
	}

	.authorkit-btn-view,
	.authorkit-btn-buy {
		width: 100%;
	}
}

/* ============================================
   CUSTOM OVERRIDES
   Add your custom styles below this line
   ============================================ */
