/**
 * Goodreads-like integration styles
 * sentro-ng-wikang-filipino theme
 */

/* Color Variables */
:root {
	--gr-maroon: #7A1515;
	--gr-maroon-dark: #5A0F0F;
	--gr-maroon-light: #FDF2F2;
	--gr-gold: #FFC107;
	--gr-grey-light: #E9ECEF;
	--gr-grey-muted: #6C757D;
	--gr-transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* Custom Buttons */
.btn-maroon {
	background-color: var(--gr-maroon);
	color: #ffffff !important;
	border: 1px solid var(--gr-maroon);
	transition: var(--gr-transition);
}
.btn-maroon:hover,
.btn-maroon:focus {
	background-color: var(--gr-maroon-dark);
	border-color: var(--gr-maroon-dark);
	box-shadow: 0 4px 12px rgba(122, 21, 21, 0.25);
}

.btn-outline-maroon {
	color: var(--gr-maroon) !important;
	background-color: transparent;
	border: 1px solid var(--gr-maroon);
	transition: var(--gr-transition);
}
.btn-outline-maroon:hover,
.btn-outline-maroon:focus,
.btn-outline-maroon.active {
	background-color: var(--gr-maroon);
	color: #ffffff !important;
	box-shadow: 0 4px 12px rgba(122, 21, 21, 0.25);
}

.bg-maroon-light {
	background-color: var(--gr-maroon-light);
}

.bg-maroon {
	background-color: var(--gr-maroon) !important;
}

.text-maroon {
	color: var(--gr-maroon) !important;
}

.hover-maroon:hover {
	color: var(--gr-maroon) !important;
}

/* Fractional Stars Display (Read Only) */
.stars-outer {
	position: relative;
	display: inline-block;
	font-family: Arial, sans-serif;
	font-size: 18px;
	line-height: 1;
}
.stars-outer::before {
	content: "★★★★★";
	color: var(--gr-grey-light);
	letter-spacing: 2px;
}
.stars-inner {
	position: absolute;
	top: 0;
	left: 0;
	white-space: nowrap;
	overflow: hidden;
	width: 0;
	font-family: Arial, sans-serif;
	font-size: 18px;
	line-height: 1;
}
.stars-inner::before {
	content: "★★★★★";
	color: var(--gr-gold);
	letter-spacing: 2px;
}

/* Star Rating Small for Cards */
.text-star-small {
	font-size: 14px;
	letter-spacing: 1px;
}
.active-star {
	color: var(--gr-gold);
}
.inactive-star {
	color: var(--gr-grey-light);
}

/* Interactive Star Rating Selector */
.rating-selector {
	display: inline-flex;
	flex-direction: row-reverse;
	justify-content: flex-end;
}
.rating-selector input {
	display: none;
}
.rating-selector label {
	font-size: 32px;
	color: var(--gr-grey-light);
	cursor: pointer;
	transition: color 0.15s ease-in-out;
	padding: 0 3px;
}
.rating-selector label:hover,
.rating-selector label:hover ~ label,
.rating-selector input:checked ~ label {
	color: var(--gr-gold);
}

/* Ratings Summary Breakdown */
.rating-summary-box {
	background: #ffffff;
	border-radius: 12px;
	padding: 24px;
	box-shadow: 0 4px 20px rgba(0,0,0,0.05);
	border: 1px solid rgba(0,0,0,0.05);
}
.rating-big-number {
	font-size: 48px;
	font-weight: 800;
	color: var(--gr-maroon);
	line-height: 1;
}
.rating-bar-row {
	display: flex;
	align-items: center;
	margin-bottom: 8px;
	font-size: 14px;
}
.rating-bar-row:last-child {
	margin-bottom: 0;
}
.rating-bar-label {
	width: 60px;
	color: var(--gr-grey-muted);
}
.rating-bar-track {
	flex-grow: 1;
	height: 8px;
	background-color: var(--gr-grey-light);
	border-radius: 4px;
	margin: 0 12px;
	overflow: hidden;
}
.rating-bar-fill {
	height: 100%;
	background-color: var(--gr-maroon);
	border-radius: 4px;
	width: 0;
	transition: width 1s ease-out;
}
.rating-bar-percent {
	width: 45px;
	text-align: right;
	font-weight: 600;
	color: var(--gr-grey-muted);
}

/* Shelf Dropdown Button & Layout */
.shelf-widget-container {
	border-bottom: 1px solid var(--gr-grey-light);
	padding-bottom: 24px;
	margin-bottom: 24px;
}
.btn-shelf-action {
	border-top-right-radius: 0;
	border-bottom-right-radius: 0;
	font-weight: 600;
}
.btn-shelf-toggle {
	border-top-left-radius: 0;
	border-bottom-left-radius: 0;
	border-left: 0 !important;
}
.shelf-dropdown-menu {
	min-width: 200px;
	border-radius: 8px;
	padding: 8px 0;
}
.shelf-dropdown-menu .dropdown-item {
	padding: 8px 16px;
	font-weight: 500;
	transition: var(--gr-transition);
}
.shelf-dropdown-menu .dropdown-item:hover {
	background-color: var(--gr-maroon-light);
	color: var(--gr-maroon);
}
.shelf-dropdown-menu .dropdown-item.active {
	background-color: var(--gr-maroon);
	color: #ffffff;
}

/* Reviews List */
.reviews-section-title {
	border-bottom: 2px solid var(--gr-maroon);
	padding-bottom: 8px;
	margin-bottom: 24px;
	font-weight: 700;
}
.review-item {
	padding: 20px 0;
	border-bottom: 1px solid var(--gr-grey-light);
	transition: var(--gr-transition);
}
.review-item:last-child {
	border-bottom: 0;
}
.review-avatar img {
	border-radius: 50%;
	object-fit: cover;
	border: 2px solid #ffffff;
	box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.review-meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 6px;
}
.review-author {
	font-weight: 600;
	color: #212529;
}
.review-date {
	font-size: 13px;
	color: var(--gr-grey-muted);
}
.review-stars {
	display: inline-flex;
	align-items: center;
}
.review-content {
	color: #495057;
	font-size: 15px;
	line-height: 1.6;
}

/* Review Form and Locks */
.review-form-container {
	background-color: #f8f9fa;
	border-radius: 12px;
	padding: 24px;
	border: 1px solid rgba(0,0,0,0.05);
}
.review-form-container textarea {
	border-radius: 8px;
	border: 1px solid #ced4da;
	transition: var(--gr-transition);
}
.review-form-container textarea:focus {
	border-color: var(--gr-maroon);
	box-shadow: 0 0 0 0.25rem rgba(122, 21, 21, 0.15);
}

.review-lock-alert {
	border: 2px dashed rgba(122, 21, 21, 0.2);
	background-color: rgba(122, 21, 21, 0.02);
	border-radius: 12px;
	padding: 24px;
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
}
.lock-icon-wrapper {
	width: 50px;
	height: 50px;
	border-radius: 50%;
	background-color: var(--gr-maroon-light);
	color: var(--gr-maroon);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 12px;
}

/* Dashboard Shelf Styling */
.goodreads-dashboard {
	min-height: 400px;
}
.goodreads-dashboard .nav-pills .nav-link {
	color: var(--gr-grey-muted);
	transition: var(--gr-transition);
	font-weight: 600;
}
.goodreads-dashboard .nav-pills .nav-link:hover {
	background-color: rgba(122, 21, 21, 0.05);
	color: var(--gr-maroon);
}
.goodreads-dashboard .nav-pills .nav-link.active {
	background-color: var(--gr-maroon);
	color: #ffffff;
}
.goodreads-dashboard .nav-pills .nav-link .badge {
	transition: var(--gr-transition);
}
.goodreads-dashboard .nav-pills .nav-link.active .badge {
	background-color: rgba(255,255,255,0.2) !important;
	color: #ffffff !important;
}

/* Book Cards */
.goodreads-book-card {
	transition: transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), box-shadow 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
	border-radius: 10px;
}
.goodreads-book-card:hover {
	transform: translateY(-6px);
	box-shadow: 0 8px 25px rgba(0,0,0,0.1) !important;
}

.text-truncate-2 {
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Loading animations */
@keyframes grPulse {
	0% { opacity: 0.6; }
	50% { opacity: 1; }
	100% { opacity: 0.6; }
}
.gr-loading {
	position: relative;
	pointer-events: none;
}
.gr-loading::after {
	content: "";
	position: absolute;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(255, 255, 255, 0.7);
	z-index: 10;
	animation: grPulse 1.5s infinite ease-in-out;
}
.spinner-border-sm {
	width: 1rem;
	height: 1rem;
	border-width: 0.15em;
}

/* Border dashed style */
.border-dashed {
	border-style: dashed !important;
}

/* Goodreads book cover container & spine effects */
.book-cover-container {
	position: relative;
	transition: var(--gr-transition);
	background-color: #ffffff;
	overflow: hidden;
}
.book-cover-container:hover {
	transform: translateY(-4px);
	box-shadow: 0 15px 30px rgba(0,0,0,0.15) !important;
}
.book-cover-container img {
	border-left: 4px solid rgba(0, 0, 0, 0.2); /* Creates a realistic book spine look */
	box-shadow: -4px 0 8px rgba(0, 0, 0, 0.1);
}

/* User personal rating card */
.user-personal-rating {
	border: 1px solid rgba(0,0,0,0.05);
	background-color: #f8f9fa !important;
	padding: 10px;
}
.personal-stars .inactive-star {
	transition: color 0.2s ease-in-out;
}
.personal-stars a:hover .inactive-star {
	color: rgba(255, 193, 7, 0.4);
}
.text-nowrap {
	white-space: nowrap;
}
.hover-maroon {
	transition: color 0.2s ease;
}
.hover-maroon:hover {
	color: var(--gr-maroon) !important;
}

