/**
 * Custom CSS cho Bảng Giá
 * Styling cho custom post type Bảng Giá với Repeater
 * Hỗ trợ 2 layout: Table và Card
 */

/* ============================================
   COMMON STYLES
   ============================================ */
.halstein-bang-gia-list {
	padding: 20px 0;
	max-width: 1200px;
	margin: 0 auto;
}

.no-pricing {
	text-align: center;
	padding: 40px 20px;
	font-style: italic;
	color: #666;
}

/* ============================================
   PRICING BADGE
   ============================================ */
.pricing-badge {
	position: absolute;
	top: -15px;
	left: 50%;
	transform: translateX(-50%);
	background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
	color: #fff;
	padding: 6px 20px;
	border-radius: 20px;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
	z-index: 10;
}

/* ============================================
   TABLE LAYOUT
   ============================================ */
.layout-table {
	display: flex;
	flex-direction: column;
	gap: 40px;
}

.bang-gia-table-wrap {
	background: #fff;
	border: 2px solid #e5e7eb;
	border-radius: 12px;
	padding: 0;
	position: relative;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	transition: all 0.3s ease;
}

.bang-gia-table-wrap:hover {
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
	transform: translateY(-2px);
}

.bang-gia-table-wrap.highlighted {
	border-color: #ff6b6b;
	border-width: 3px;
	box-shadow: 0 4px 20px rgba(255, 107, 107, 0.2);
}

.bang-gia-header {
	padding: 30px;
	text-align: center;
	background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
	border-bottom: 2px solid #e5e7eb;
	border-radius: 10px 10px 0 0;
}

.bang-gia-table-wrap.highlighted .bang-gia-header {
	background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
}

.bang-gia-title {
	font-size: 28px;
	font-weight: 700;
	color: #1a202c;
	margin: 0 0 10px 0;
	line-height: 1.3;
}

.bang-gia-excerpt {
	font-size: 15px;
	color: #64748b;
	line-height: 1.6;
	margin: 0;
}

.bang-gia-excerpt p {
	margin: 0;
}

/* Table Styles */
.bang-gia-table {
	padding: 0;
}

.bang-gia-table table {
	width: 100%;
	border-collapse: collapse;
	margin: 0;
}

.bang-gia-table thead th {
	background: #f1f5f9;
	padding: 16px 20px;
	text-align: left;
	font-weight: 700;
	font-size: 14px;
	color: #475569;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	border-bottom: 2px solid #e2e8f0;
}

.bang-gia-table thead th.col-price {
	text-align: right;
	width: 200px;
}

.bang-gia-table tbody tr {
	border-bottom: 1px solid #f1f5f9;
	transition: background-color 0.2s ease;
}

.bang-gia-table tbody tr:last-child {
	border-bottom: none;
}

.bang-gia-table tbody tr:hover {
	background-color: #f8fafc;
}

.bang-gia-table tbody td {
	padding: 20px;
}

.service-info {
	padding-left: 20px !important;
}

.service-title {
	font-size: 16px;
	font-weight: 600;
	color: #1e293b;
	margin-bottom: 5px;
}

.service-description {
	font-size: 14px;
	color: #64748b;
	line-height: 1.5;
	margin-top: 5px;
}

.service-price {
	text-align: right;
	font-size: 18px;
	font-weight: 700;
	color: #0ea5e9;
	white-space: nowrap;
	padding-right: 20px !important;
}

.bang-gia-table-wrap.highlighted .service-price {
	color: #ff6b6b;
}

/* Footer */
.bang-gia-footer {
	padding: 25px 30px;
	text-align: center;
	background: #f8fafc;
	border-top: 2px solid #e5e7eb;
	border-radius: 0 0 10px 10px;
}

/* ============================================
   CARD LAYOUT
   ============================================ */
.layout-card {
	padding: 20px 0;
}

.pricing-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
	gap: 30px;
}

.pricing-card {
	background: #fff;
	border: 2px solid #e5e7eb;
	border-radius: 12px;
	padding: 0;
	position: relative;
	transition: all 0.3s ease;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	display: flex;
	flex-direction: column;
}

.pricing-card:hover {
	transform: translateY(-5px);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.pricing-card.highlighted {
	border-color: #ff6b6b;
	border-width: 3px;
	box-shadow: 0 4px 20px rgba(255, 107, 107, 0.2);
}

.card-header {
	padding: 30px 25px;
	text-align: center;
	background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
	border-bottom: 2px solid #e5e7eb;
	border-radius: 10px 10px 0 0;
}

.pricing-card.highlighted .card-header {
	background: linear-gradient(135deg, #fff5f5 0%, #ffffff 100%);
}

.card-header h3 {
	font-size: 24px;
	font-weight: 700;
	color: #1a202c;
	margin: 0 0 10px 0;
}

.card-header p {
	font-size: 14px;
	color: #64748b;
	margin: 0;
	line-height: 1.5;
}

/* Card Items */
.card-items {
	flex: 1;
	padding: 20px;
}

.card-item {
	padding: 20px;
	margin-bottom: 15px;
	background: #f8fafc;
	border-radius: 8px;
	border-left: 4px solid #0ea5e9;
	transition: all 0.2s ease;
}

.card-item:last-child {
	margin-bottom: 0;
}

.card-item:hover {
	background: #f1f5f9;
	transform: translateX(5px);
}

.pricing-card.highlighted .card-item {
	border-left-color: #ff6b6b;
}

.card-item .item-title {
	font-size: 16px;
	font-weight: 600;
	color: #1e293b;
	margin-bottom: 8px;
}

.card-item .item-description {
	font-size: 14px;
	color: #64748b;
	line-height: 1.5;
	margin-bottom: 10px;
}

.card-item .item-price {
	font-size: 18px;
	font-weight: 700;
	color: #0ea5e9;
	margin-top: 10px;
}

.pricing-card.highlighted .card-item .item-price {
	color: #ff6b6b;
}

/* Card Footer */
.card-footer {
	padding: 25px;
	text-align: center;
	background: #f8fafc;
	border-top: 2px solid #e5e7eb;
	border-radius: 0 0 10px 10px;
}

/* ============================================
   PRICING BUTTON (COMMON)
   ============================================ */
.pricing-button {
	display: inline-block;
	padding: 14px 32px;
	background: linear-gradient(135deg, #0ea5e9 0%, #0284c7 100%);
	color: #fff !important;
	text-decoration: none;
	border-radius: 50px;
	font-weight: 600;
	font-size: 15px;
	transition: all 0.3s ease;
	border: none;
	box-shadow: 0 4px 15px rgba(14, 165, 233, 0.3);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.pricing-button:hover {
	background: linear-gradient(135deg, #0284c7 0%, #0369a1 100%);
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(14, 165, 233, 0.4);
}

.highlighted .pricing-button {
	background: linear-gradient(135deg, #ff6b6b 0%, #ee5a6f 100%);
	box-shadow: 0 4px 15px rgba(255, 107, 107, 0.3);
}

.highlighted .pricing-button:hover {
	background: linear-gradient(135deg, #ee5a6f 0%, #dc2f4b 100%);
	box-shadow: 0 6px 20px rgba(255, 107, 107, 0.4);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media screen and (max-width: 992px) {
	.pricing-cards {
		grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
		gap: 20px;
	}
	
	.bang-gia-title {
		font-size: 24px;
	}
	
	.card-header h3 {
		font-size: 20px;
	}
}

@media screen and (max-width: 768px) {
	.halstein-bang-gia-list {
		padding: 15px;
	}
	
	.layout-table {
		gap: 30px;
	}
	
	.pricing-cards {
		grid-template-columns: 1fr;
		gap: 20px;
	}
	
	.bang-gia-header,
	.card-header {
		padding: 25px 20px;
	}
	
	.bang-gia-title {
		font-size: 22px;
	}
	
	.card-header h3 {
		font-size: 20px;
	}
	
	/* Make table responsive */
	.bang-gia-table {
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
	
	.bang-gia-table table {
		min-width: 500px;
	}
	
	.bang-gia-table thead th,
	.bang-gia-table tbody td {
		padding: 15px 12px;
	}
	
	.service-title {
		font-size: 15px;
	}
	
	.service-description {
		font-size: 13px;
	}
	
	.service-price {
		font-size: 16px;
	}
	
	.pricing-button {
		padding: 12px 24px;
		font-size: 14px;
	}
}

@media screen and (max-width: 480px) {
	.bang-gia-header,
	.card-header {
		padding: 20px 15px;
	}
	
	.bang-gia-title,
	.card-header h3 {
		font-size: 18px;
	}
	
	.bang-gia-excerpt,
	.card-header p {
		font-size: 13px;
	}
	
	.card-items {
		padding: 15px;
	}
	
	.card-item {
		padding: 15px;
	}
	
	.card-item .item-title {
		font-size: 15px;
	}
	
	.card-item .item-description {
		font-size: 13px;
	}
	
	.card-item .item-price {
		font-size: 16px;
	}
	
	.pricing-badge {
		font-size: 11px;
		padding: 5px 15px;
	}
	
	.bang-gia-footer,
	.card-footer {
		padding: 20px 15px;
	}
	
	.pricing-button {
		padding: 10px 20px;
		font-size: 13px;
		width: 100%;
	}
}

/* ============================================
   PRINT STYLES
   ============================================ */
@media print {
	.halstein-bang-gia-list {
		page-break-inside: avoid;
	}
	
	.bang-gia-table-wrap,
	.pricing-card {
		border: 1px solid #000;
		box-shadow: none;
		page-break-inside: avoid;
		margin-bottom: 20px;
	}
	
	.pricing-button {
		display: none;
	}
	
	.pricing-badge {
		position: static;
		display: inline-block;
		transform: none;
		background: #000;
		color: #fff;
	}
}

/* ============================================
   LOADING STATE
   ============================================ */
.halstein-bang-gia-list.loading {
	opacity: 0.5;
	pointer-events: none;
}

/* ============================================
   EMPTY STATE
   ============================================ */
.halstein-bang-gia-list:empty::after {
	content: "Đang tải bảng giá...";
	display: block;
	text-align: center;
	padding: 40px;
	color: #64748b;
	font-style: italic;
}

/* ============================================
   ANIMATION
   ============================================ */
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.bang-gia-table-wrap,
.pricing-card {
	animation: fadeInUp 0.5s ease-out;
}

.bang-gia-table-wrap:nth-child(1),
.pricing-card:nth-child(1) {
	animation-delay: 0.1s;
}

.bang-gia-table-wrap:nth-child(2),
.pricing-card:nth-child(2) {
	animation-delay: 0.2s;
}

.bang-gia-table-wrap:nth-child(3),
.pricing-card:nth-child(3) {
	animation-delay: 0.3s;
}
