/**
 * Auction Card Styles
 * تصميم كارت بيانات المزاد - نفس أسلوب auction-statistics
 * 
 * @package MEC_AR_Shortcodes
 * @version 2.8.4
 */

/* ============================================
   Base Styles - Foundation
   ============================================ */

.auction-card {
	background: #fff;
	border: 1px solid #ccd0d4;
	border-radius: 8px;
	box-shadow: 0 1px 1px rgba(0,0,0,.04);
	padding: 0;
	overflow: hidden;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.6;
	color: #23282d;
	margin: 0;
	transition: box-shadow 0.2s ease, border-color 0.2s ease;
}

.auction-card:hover {
	box-shadow: 0 1px 3px rgba(0,0,0,.08);
	border-color: #b4b9be;
}

/* RTL Support */
.auction-card.rtl {
	direction: rtl;
	text-align: right;
}

/* ============================================
   Typography & Spacing
   ============================================ */

.auction-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 14px 18px;
	border-bottom: 1px solid #f0f0f0;
	transition: background-color 0.15s ease;
	min-height: 48px;
}

.auction-row:last-child {
	border-bottom: none;
}

.auction-row:hover {
	background-color: #f9f9f9;
}

/* Special styling for duration row */
.auction-row.auction-duration {
	background-color: #f9f9f9;
	border-top: 1px solid #e5e7eb;
	padding-top: 16px;
	padding-bottom: 16px;
}

/* ============================================
   Labels - Same style as auction-statistics
   ============================================ */

.auction-label {
	font-size: 14px;
	font-weight: 600;
	color: #666;
	letter-spacing: 0;
	flex-shrink: 0;
	margin-left: 15px;
	min-width: 150px;
	line-height: 1.5;
	text-transform: none;
}

/* ============================================
   Values - Same style as auction-statistics
   ============================================ */

.auction-value {
	font-size: 15px;
	font-weight: 700;
	color: #23282d;
	text-align: left;
	flex: 1;
	word-break: break-word;
	line-height: 1.5;
}

/* Empty value placeholder */
.auction-value:empty::before {
	content: "—";
	color: #999;
	font-style: normal;
	font-weight: 400;
}

/* ============================================
   Status Badges - Same style as auction-statistics
   ============================================ */

.auction-status {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 6px 14px;
	border-radius: 6px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0;
	text-transform: none;
	line-height: 1.4;
	white-space: nowrap;
	border: none;
	box-shadow: none;
}

/* Running Status - Green (same as sold status in auction-statistics) */
.auction-status-running,
.auction-status.auction-status-running {
	background: #d4edda;
	color: #155724;
	border: 1px solid #c3e6cb;
}

/* Upcoming Status - Blue (same as primary color) */
.auction-status-upcoming,
.auction-status.auction-status-upcoming {
	background: #dbeafe;
	color: #1e40af;
}

/* Ended Status - Gray (same as not-sold status) */
.auction-status-ended,
.auction-status.auction-status-ended {
	background: #f3f4f6;
	color: #4b5563;
	border: 1px solid #e5e7eb;
}

/* ============================================
   Duration Row - Enhanced Styling
   ============================================ */

.auction-row.auction-duration .auction-label {
	color: #666;
	font-weight: 600;
	font-size: 14px;
}

.auction-row.auction-duration .auction-value {
	color: #23282d;
	font-weight: 700;
	font-size: 16px;
}

/* ============================================
   Responsive Design - Mobile First
   ============================================ */

@media (max-width: 768px) {
	.auction-card {
		border-radius: 8px;
		margin: 0;
	}

	.auction-row {
		flex-direction: column;
		align-items: flex-start;
		padding: 12px 16px;
		gap: 8px;
		min-height: auto;
	}

	.auction-label {
		margin-left: 0;
		margin-bottom: 4px;
		min-width: auto;
		font-size: 13px;
		color: #666;
		font-weight: 600;
		width: 100%;
	}

	.auction-value {
		text-align: right;
		width: 100%;
		font-size: 14px;
		font-weight: 700;
	}

	.auction-status {
		align-self: flex-start;
		font-size: 11px;
		padding: 5px 12px;
		margin-top: 2px;
	}

	.auction-row.auction-duration {
		flex-direction: row;
		justify-content: space-between;
		align-items: center;
		padding: 14px 16px;
		gap: 0;
	}

	.auction-row.auction-duration .auction-label {
		margin-bottom: 0;
		width: auto;
	}

	.auction-row.auction-duration .auction-value {
		width: auto;
	}
}

@media (max-width: 480px) {
	.auction-card {
		border-radius: 6px;
	}

	.auction-row {
		padding: 10px 14px;
		gap: 6px;
	}

	.auction-label {
		font-size: 12px;
		margin-bottom: 3px;
	}

	.auction-value {
		font-size: 13px;
	}

	.auction-status {
		font-size: 10px;
		padding: 4px 10px;
	}

	.auction-row.auction-duration {
		padding: 12px 14px;
	}

	.auction-row.auction-duration .auction-label {
		font-size: 12px;
	}

	.auction-row.auction-duration .auction-value {
		font-size: 14px;
	}
}

/* ============================================
   Print Styles
   ============================================ */

@media print {
	.auction-card {
		box-shadow: none;
		border: 1px solid #000;
		page-break-inside: avoid;
	}

	.auction-row {
		border-bottom: 1px solid #000;
		padding: 8px 12px;
	}

	.auction-row:hover {
		background-color: transparent;
	}

	.auction-status {
		border: 1px solid #000;
		background: transparent !important;
		color: #000 !important;
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}
}

/* ============================================
   Accessibility & Focus States
   ============================================ */

.auction-card:focus-within {
	outline: 2px solid #0073aa;
	outline-offset: 2px;
	border-radius: 8px;
}

.auction-row:focus-within {
	background-color: #f0f7ff;
}

/* ============================================
   RTL Support - Same as auction-statistics
   ============================================ */

body[dir="rtl"] .auction-card,
[dir="rtl"] .auction-card {
	direction: rtl;
	text-align: right;
}

body[dir="rtl"] .auction-row,
[dir="rtl"] .auction-row {
	direction: rtl;
}

body[dir="rtl"] .auction-label,
[dir="rtl"] .auction-label {
	text-align: right;
	direction: rtl;
	margin-left: 15px;
	margin-right: 0;
}

body[dir="rtl"] .auction-value,
[dir="rtl"] .auction-value {
	text-align: left;
	direction: ltr;
	unicode-bidi: embed;
}

/* Numbers should be LTR even in RTL context */
body[dir="rtl"] .auction-value:contains(number),
[dir="rtl"] .auction-value:contains(number) {
	direction: ltr !important;
	text-align: left !important;
	unicode-bidi: embed;
}
