/*
 * Reorder helper styles for WooCommerce account orders.
 * File: sc_reorder.css
 * Added: 2026-04-23
 */

/* View Order page */
.woocommerce-account .account-sub-title,
.woocommerce-checkout .account-sub-title,
.woocommerce-thankyou .account-sub-title {
	display: block !important;
}

.sc-reorder-view-box {
	margin-bottom: 16px;
}

.sc-reorder-view-box p {
	margin: 0 0 12px;
}

.sc-reorder-view-box .button {
	display: inline-block;
}

/* My Account orders table */
.woocommerce-orders-table__cell-order-actions .button {
	margin-right: 10px;
	margin-bottom: 8px;
}

.woocommerce-orders-table__cell-order-actions .button:last-child {
	margin-right: 0;
}

/* Banner */
.sc-reorder-banner {
	position: relative;
	display: flex;
	justify-content: center;
	align-items: center;
	width: 100%;
	height: 0;
	overflow: hidden;
	padding: 0 48px;
	background: var(--porto-secondary-color);
	color: var(--porto-secondary-color-inverse);
	font-size: 15px;
	line-height: 1.4;
	text-align: center;
	opacity: 1;
	transition: height 0.55s ease, padding-top 0.45s ease, padding-bottom 0.45s ease, opacity 0.25s ease;
}

.sc-reorder-banner--visible {
	height: auto;
	padding-top: 12px;
	padding-bottom: 12px;
}

.sc-reorder-banner__text {
	display: inline;
	max-width: 1200px;
	color: inherit;
}

.sc-reorder-banner__text strong {
	display: inline;
	font-weight: 700;
	margin-right: 10px;
}

.sc-reorder-banner__line {
	display: inline;
}

.sc-reorder-banner__button.button {
	display: inline-block;
	flex: 0 0 auto;
	margin-left: 10px;
	font-size: 0.85em;
	padding: 7px 10px;
	vertical-align: middle;
}

.sc-reorder-banner__order-link {
	color: var(--porto-secondary-color-inverse);
	text-decoration: underline;
}

.sc-reorder-banner__order-link:hover,
.sc-reorder-banner__order-link:focus {
	text-decoration: none;
}

.sc-reorder-banner__dismiss {
	position: absolute;
	top: 50%;
	right: 12px;
	transform: translateY(-50%);
	display: flex;
	align-items: center;
	justify-content: center;
	width: 24px;
	height: 24px;
	padding: 0;
	border: 0;
	border-radius: 50% !important;
	background: rgba(255, 255, 255, 0.35) !important;
	color: inherit;
	font-size: 18px;
	line-height: 24px !important;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.sc-reorder-banner__dismiss:hover,
.sc-reorder-banner__dismiss:focus {
	background: rgba(255, 255, 255, 0.55) !important;
}

.sc-reorder-banner--closing {
	height: 0 !important;
	padding-top: 0 !important;
	padding-bottom: 0 !important;
	opacity: 0;
	transition: height 0.3s ease, padding-top 0.25s ease, padding-bottom 0.25s ease, opacity 0.2s ease;
}

/* Tablet and below */
@media (max-width: 991px) {
	.sc-reorder-banner {
		justify-content: flex-start;
		padding-left: 12px;
		padding-right: 12px;
		text-align: left;
	}

	.sc-reorder-banner__text {
		display: block;
		max-width: none;
		line-height: 1.5;
	}

	.sc-reorder-banner__text strong {
		display: block;
		margin-right: 0;
		margin-bottom: 2px;
	}

	.sc-reorder-banner__button.button {
		display: inline-block;
		margin-top: 6px;
		margin-left: 0;
	}

	.sc-reorder-banner__dismiss {
		top: 8px;
		right: 8px;
		transform: none;
	}
}

/* Mobile */
@media (max-width: 480px) {
	.sc-reorder-banner {
		font-size: 14px;
	}

	.sc-reorder-banner__button.button,
	.sc-reorder-view-box .button {
		width: 100%;
		text-align: center;
	}

	.sc-reorder-banner__button.button {
		display: block;
		margin-top: 8px;
	}
}
