/* Shopee-style My Account Orders
   Place at: yourchildtheme/woocommerce/myaccount/shopee-orders.css
   Loaded automatically by the functions.php snippet on the account page.
*/

.shopee-orders-wrap {
	--shopee-orange: #1f7a3e;
	--shopee-orange-dark: #175f30;
	--shopee-orange-light: #eaf7ee;
	--shopee-gray: #757575;
	--shopee-border: #e8e8e8;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Tabs */
.shopee-order-tabs {
	display: flex;
	border-bottom: 1px solid var(--shopee-border);
	margin-bottom: 20px;
	overflow-x: auto;
}

.shopee-tab {
	padding: 14px 20px;
	white-space: nowrap;
	text-decoration: none;
	color: var(--shopee-gray);
	font-weight: 500;
	font-size: 14px;
	border-bottom: 2px solid transparent;
	transition: color 0.15s ease, border-color 0.15s ease;
}

.shopee-tab:hover {
	color: var(--shopee-orange);
}

.shopee-tab.is-active {
	color: var(--shopee-orange);
	border-bottom-color: var(--shopee-orange);
	font-weight: 600;
}

/* Empty state */
.shopee-empty-state {
	text-align: center;
	padding: 60px 20px;
	color: var(--shopee-gray);
}

.shopee-empty-state .button {
	display: inline-block;
	margin-top: 12px;
	background: var(--shopee-orange);
	color: #fff;
	padding: 10px 24px;
	border-radius: 3px;
	text-decoration: none;
}

/* Order list */
.shopee-order-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.shopee-order-card {
	border: 1px solid var(--shopee-border);
	border-radius: 4px;
	background: #fff;
	overflow: hidden;
	transition: box-shadow 0.15s ease;
}

.shopee-order-card:hover {
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.shopee-order-card__header {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 10px 16px;
	background: #fafafa;
	border-bottom: 1px solid var(--shopee-border);
	font-size: 13px;
}

.shopee-order-number {
	font-weight: 600;
	color: #222;
}

.shopee-order-date {
	color: var(--shopee-gray);
}

.shopee-status-badge {
	margin-left: auto;
	padding: 3px 10px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.3px;
	background: #f0f0f0;
	color: #555;
}

.shopee-status-processing,
.shopee-status-wc-shipped {
	background: #e7f3ff;
	color: #1e88e5;
}

.shopee-status-completed {
	background: #e6f9ec;
	color: #2fa84f;
}

.shopee-status-pending,
.shopee-status-on-hold {
	background: var(--shopee-orange-light);
	color: var(--shopee-orange);
}

.shopee-status-cancelled,
.shopee-status-refunded,
.shopee-status-failed {
	background: #f3f3f3;
	color: #999;
}

.shopee-order-card__body {
	display: flex;
	align-items: center;
	gap: 16px;
	padding: 16px;
}

.shopee-order-thumb img {
	width: 60px;
	height: 60px;
	object-fit: cover;
	border-radius: 4px;
	border: 1px solid var(--shopee-border);
}

.shopee-order-summary {
	flex: 1;
	min-width: 0;
}

.shopee-item-name {
	margin: 0;
	font-size: 14px;
	color: #222;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.shopee-item-more {
	margin: 4px 0 0;
	font-size: 12px;
	color: var(--shopee-gray);
}

.shopee-order-total {
	text-align: right;
	white-space: nowrap;
}

.shopee-total-label {
	display: block;
	font-size: 12px;
	color: var(--shopee-gray);
}

.shopee-total-amount {
	font-size: 16px;
	font-weight: 600;
	color: var(--shopee-orange);
}

.shopee-order-card__footer {
	display: flex;
	justify-content: flex-end;
	gap: 8px;
	padding: 12px 16px;
	border-top: 1px solid var(--shopee-border);
}

.shopee-btn {
	padding: 8px 18px;
	border-radius: 3px;
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
	display: inline-block;
	border: 1px solid var(--shopee-border);
}

.shopee-btn-outline {
	background: #fff;
	color: #555;
}

.shopee-btn-outline:hover {
	border-color: var(--shopee-orange);
	color: var(--shopee-orange);
}

.shopee-btn-primary {
	background: var(--shopee-orange);
	border-color: var(--shopee-orange);
	color: #fff;
}

.shopee-btn-primary:hover {
	background: var(--shopee-orange-dark);
}

/* Pagination */
.shopee-pagination {
	display: flex;
	justify-content: center;
	gap: 10px;
	margin-top: 20px;
}

/* Mobile */
@media (max-width: 600px) {
	.shopee-order-card__body {
		flex-wrap: wrap;
	}
	.shopee-order-total {
		width: 100%;
		text-align: left;
		margin-top: 8px;
	}
}

/* =========================================
   Single Order (View Order) page
   ========================================= */

.shopee-order-detail {
	--shopee-orange: #1f7a3e;
	--shopee-gray: #757575;
	--shopee-border: #e8e8e8;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Cancelled banner (kept red/neutral on purpose — a cancelled order
   shouldn't be shown in the brand accent color) */
.shopee-cancelled-banner {
	background: #fdeceb;
	color: #b3261e;
	border: 1px solid #f5c6c0;
	border-radius: 4px;
	padding: 14px 18px;
	font-weight: 600;
	margin-bottom: 20px;
}

/* Tracker */
.shopee-tracker {
	display: flex;
	align-items: flex-start;
	padding: 30px 10px 40px;
	margin-bottom: 10px;
}

.shopee-tracker-step {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100px;
	flex-shrink: 0;
	text-align: center;
}

.shopee-tracker-dot {
	width: 22px;
	height: 22px;
	border-radius: 50%;
	background: #fff;
	border: 3px solid #d9d9d9;
	z-index: 1;
}

.shopee-tracker-step.is-done .shopee-tracker-dot {
	background: var(--shopee-orange);
	border-color: var(--shopee-orange);
}

.shopee-tracker-step.is-current .shopee-tracker-dot {
	box-shadow: 0 0 0 4px rgba(238, 77, 45, 0.2);
}

.shopee-tracker-label {
	margin-top: 8px;
	font-size: 12px;
	color: var(--shopee-gray);
}

.shopee-tracker-step.is-done .shopee-tracker-label {
	color: #222;
	font-weight: 600;
}

.shopee-tracker-line {
	flex: 1;
	height: 3px;
	background: #d9d9d9;
	margin-top: 10px;
}

.shopee-tracker-line.is-done {
	background: var(--shopee-orange);
}

/* Meta row */
.shopee-order-meta {
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	background: #fafafa;
	border: 1px solid var(--shopee-border);
	border-radius: 4px;
	padding: 14px 18px;
	margin-bottom: 20px;
}

.shopee-order-meta-label {
	display: block;
	font-size: 12px;
	color: var(--shopee-gray);
}

.shopee-order-meta-value {
	font-size: 14px;
	font-weight: 600;
	color: #222;
}

/* Card */
.shopee-detail-card {
	border: 1px solid var(--shopee-border);
	border-radius: 4px;
	padding: 18px;
	margin-bottom: 20px;
	background: #fff;
}

.shopee-detail-card__title {
	margin: 0 0 14px;
	font-size: 15px;
	font-weight: 700;
	color: #222;
}

.shopee-detail-card address {
	font-style: normal;
	font-size: 14px;
	color: #444;
	line-height: 1.6;
	margin: 0;
}

.shopee-detail-card p {
	font-size: 14px;
	color: #444;
	margin: 4px 0 0;
}

/* Items */
.shopee-detail-item {
	display: flex;
	align-items: center;
	gap: 14px;
	padding: 12px 0;
	border-bottom: 1px solid var(--shopee-border);
}

.shopee-detail-item:last-of-type {
	border-bottom: none;
}

.shopee-detail-item__thumb img {
	width: 60px;
	height: 60px;
	object-fit: cover;
	border-radius: 4px;
	border: 1px solid var(--shopee-border);
}

.shopee-detail-item__info {
	flex: 1;
	min-width: 0;
}

.shopee-detail-item__name {
	margin: 0;
	font-size: 14px;
	color: #222;
}

.shopee-detail-item__qty {
	margin: 4px 0 0;
	font-size: 12px;
	color: var(--shopee-gray);
}

.shopee-detail-item__total {
	font-size: 14px;
	font-weight: 600;
	color: #222;
	white-space: nowrap;
}

/* Totals */
.shopee-detail-totals {
	margin-top: 14px;
	padding-top: 14px;
	border-top: 1px dashed var(--shopee-border);
}

.shopee-detail-totals__row {
	display: flex;
	justify-content: space-between;
	font-size: 14px;
	color: #444;
	padding: 4px 0;
}

.shopee-detail-totals__row.is-grand-total {
	font-size: 16px;
	font-weight: 700;
	color: var(--shopee-orange);
	padding-top: 8px;
}

/* Address grid */
.shopee-address-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}

@media (max-width: 700px) {
	.shopee-address-grid {
		grid-template-columns: 1fr;
	}
	.shopee-tracker-step {
		width: 70px;
	}
	.shopee-tracker-label {
		font-size: 11px;
	}
}

/* Bottom actions */
.shopee-detail-actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 10px;
}

/* =========================================
   Dashboard
   ========================================= */

.shopee-dashboard {
	--shopee-orange: #1f7a3e;
	--shopee-orange-dark: #175f30;
	--shopee-orange-light: #eaf7ee;
	--shopee-gray: #757575;
	--shopee-border: #e8e8e8;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.shopee-welcome-banner {
	background: var(--shopee-orange-light);
	border: 1px solid #cdeed9;
	border-radius: 4px;
	padding: 16px 20px;
	margin-bottom: 20px;
	font-size: 15px;
	color: #1a1a1a;
}

.shopee-welcome-banner strong {
	color: var(--shopee-orange);
}

.shopee-stat-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 12px;
	margin-bottom: 24px;
}

.shopee-stat-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 20px 10px;
	border: 1px solid var(--shopee-border);
	border-radius: 4px;
	background: #fff;
	text-decoration: none;
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.shopee-stat-card:hover {
	border-color: var(--shopee-orange);
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.shopee-stat-count {
	font-size: 24px;
	font-weight: 700;
	color: var(--shopee-orange);
}

.shopee-stat-label {
	font-size: 13px;
	color: var(--shopee-gray);
}

.shopee-quicklink-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
	gap: 12px;
}

.shopee-quicklink-card {
	display: flex;
	flex-direction: column;
	gap: 4px;
	padding: 16px 18px;
	border: 1px solid var(--shopee-border);
	border-radius: 4px;
	background: #fff;
	text-decoration: none;
	transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.shopee-quicklink-card:hover {
	border-color: var(--shopee-orange);
	box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.shopee-quicklink-title {
	font-size: 14px;
	font-weight: 600;
	color: #222;
}

.shopee-quicklink-desc {
	font-size: 12px;
	color: var(--shopee-gray);
}

@media (max-width: 700px) {
	.shopee-stat-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* =========================================
   Downloads
   ========================================= */

.shopee-download-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.shopee-download-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 0;
}

.shopee-download-name {
	margin: 0;
	font-size: 14px;
	font-weight: 600;
	color: #222;
}

.shopee-download-meta {
	margin: 4px 0 0;
	font-size: 12px;
	color: var(--shopee-gray);
}

/* =========================================
   Addresses (list page)
   ========================================= */

.shopee-address-card__header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 14px;
}

.shopee-address-card__header .shopee-detail-card__title {
	margin: 0;
}

.shopee-btn-small {
	padding: 5px 14px;
	font-size: 12px;
}

.shopee-address-empty {
	color: var(--shopee-gray);
	font-size: 14px;
	margin: 0;
}

/* =========================================
   Generic styling for default WooCommerce forms
   (Edit Address form, Account Details form) —
   CSS-only, no template override, so core
   validation / hooks stay untouched.
   ========================================= */

.woocommerce-account .woocommerce-address-fields,
.woocommerce-account .woocommerce-EditAccountForm {
	max-width: 600px;
	background: #fff;
	border: 1px solid #e8e8e8;
	border-radius: 4px;
	padding: 20px;
}

.woocommerce-account .woocommerce-address-fields .form-row,
.woocommerce-account .woocommerce-EditAccountForm .form-row {
	margin-bottom: 16px;
}

.woocommerce-account .woocommerce-address-fields label,
.woocommerce-account .woocommerce-EditAccountForm label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #222;
	margin-bottom: 6px;
}

.woocommerce-account .woocommerce-address-fields input.input-text,
.woocommerce-account .woocommerce-address-fields select,
.woocommerce-account .woocommerce-EditAccountForm input.input-text,
.woocommerce-account .woocommerce-EditAccountForm select {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d9d9d9;
	border-radius: 4px;
	font-size: 14px;
	transition: border-color 0.15s ease;
}

.woocommerce-account .woocommerce-address-fields input.input-text:focus,
.woocommerce-account .woocommerce-address-fields select:focus,
.woocommerce-account .woocommerce-EditAccountForm input.input-text:focus,
.woocommerce-account .woocommerce-EditAccountForm select:focus {
	border-color: #1f7a3e;
	outline: none;
}

.woocommerce-account .woocommerce-address-fields .button,
.woocommerce-account .woocommerce-EditAccountForm .button,
.woocommerce-account button.woocommerce-Button {
	background: #1f7a3e;
	border: 1px solid #1f7a3e;
	color: #fff;
	padding: 10px 24px;
	border-radius: 3px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
}

.woocommerce-account .woocommerce-address-fields .button:hover,
.woocommerce-account .woocommerce-EditAccountForm .button:hover,
.woocommerce-account button.woocommerce-Button:hover {
	background: #175f30;
	border-color: #175f30;
}

.woocommerce-account fieldset {
	border: 1px solid #e8e8e8;
	border-radius: 4px;
	padding: 16px;
	margin-top: 20px;
}

.woocommerce-account fieldset legend {
	font-size: 13px;
	font-weight: 700;
	color: #222;
	padding: 0 6px;
}
