/**
 * Product Page: Shipping / Returns / Certifications Off-Canvas Panel Styles
 * ClickUp Tasks: 86ewyr3cr, 86ewyr7xh
 *
 * @package Blaze_Commerce
 * @since 1.0.0
 */

/* Panel — fixed right-side drawer (Figma: node 26222-23823) */
#shipping-returns-panel {
	--side-panel-width: 606px;
	position: fixed;
	inset: 0;
	z-index: 99999 !important;
	display: flex !important;
	justify-content: flex-end;
	visibility: hidden;
	pointer-events: none;
	opacity: 0;
}

#shipping-returns-panel::before {
	content: '';
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	opacity: 0;
	transition: opacity 0.3s ease;
}

#shipping-returns-panel:not([inert]) {
	visibility: visible;
	pointer-events: auto;
	opacity: 1;
	transform: none !important;
}

#shipping-returns-panel:not([inert])::before {
	opacity: 1;
}

#shipping-returns-panel .ct-panel-inner {
	position: relative;
	z-index: 1;
	width: var(--side-panel-width);
	max-width: 100vw;
	height: 100%;
	background: #fff;
	box-shadow: -2px 0 12px rgba(0, 0, 0, 0.12);
	display: flex;
	flex-direction: column;
	overflow: hidden;
	transform: translateX(100%);
	transition: transform 0.3s ease;
}

#shipping-returns-panel:not([inert]) .ct-panel-inner {
	transform: translateX(0);
}

/* Scrollable content area */
#shipping-returns-panel .ct-panel-content {
	flex: 1;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
}

/* Close button row */
.blaze-sr-close-row {
	display: flex;
	justify-content: flex-end;
	padding: 24px 24px 0;
	flex-shrink: 0;
}

.blaze-sr-close-row .ct-toggle-close {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 40px;
	height: 40px;
	padding: 0;
	border: none;
	background: transparent;
	cursor: pointer;
	border-radius: 6px;
	transition: background-color 0.2s ease;
}

.blaze-sr-close-row .ct-toggle-close:hover {
	background-color: #f3f4f6;
}

.blaze-sr-close-row .ct-toggle-close:focus {
	outline: 2px solid #3b82f6;
	outline-offset: 2px;
}

.blaze-sr-close-row .ct-toggle-close .ct-icon {
	width: 24px;
	height: 24px;
}

/* Tab Bar */
.blaze-sr-tab-bar {
	display: flex;
	padding: 0 24px;
	flex-shrink: 0;
	position: sticky;
	top: 0;
	background: #fff;
	z-index: 2;
}

.blaze-offcanvas-tab {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px 0;
	background: transparent;
	border: none;
	border-bottom: 3px solid #d9d9d9;
	cursor: pointer;
	font-family: 'Barlow', sans-serif;
	font-weight: 700;
	font-size: 16px;
	color: #353638;
	text-transform: capitalize;
	transition: border-color 0.2s ease;
}

.blaze-offcanvas-tab:hover {
	border-bottom-color: #999;
}

.blaze-offcanvas-tab.is-active {
	border-bottom-color: #59402e;
}

/* Override default panel actions since we have custom header */
#shipping-returns-panel .ct-panel-actions {
	display: none;
}

/* Content inner — ensure full width */
#shipping-returns-panel .ct-panel-content-inner {
	display: block;
	width: 100%;
}

/* Tab Content */
.blaze-sr-tab-content {
	display: none;
	width: 100%;
}

.blaze-sr-tab-content.is-active {
	display: block;
}

/* =========================================
   SHIPPING TAB
   ========================================= */

.blaze-shipping-form {
	display: flex;
	flex-direction: column;
	gap: 21px;
	padding: 24px;
}

.blaze-shipping-field label {
	display: block;
	font-family: 'Barlow', sans-serif;
	font-weight: 500;
	font-size: 16px;
	color: #4a4a4a;
	margin-bottom: 6px;
}

.blaze-select-wrap {
	position: relative;
}

.blaze-select-wrap select,
.blaze-shipping-field input[type="text"] {
	width: 100%;
	height: 48px;
	padding: 12px;
	border: 1px solid #e4e5e7;
	border-radius: 8px;
	font-family: 'Barlow', sans-serif;
	font-size: 14px;
	color: #4a4a4a;
	background-color: #fff;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	outline: none;
	transition: border-color 0.15s ease;
}

.blaze-select-wrap select:focus,
.blaze-shipping-field input[type="text"]:focus {
	border-color: #59402e;
}

.blaze-select-wrap select {
	padding-right: 40px;
	background-image: none !important;
}

.blaze-select-chevron {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	width: 20px;
	height: 20px;
}

.blaze-shipping-field input::placeholder {
	color: #4a4a4a;
}

/* Calculate Shipping Button */
.blaze-calculate-shipping-btn {
	width: 100%;
	height: 48px;
	background-color: #59402e;
	color: #fff;
	border: none;
	border-radius: 8px;
	font-family: 'Barlow', sans-serif;
	font-weight: 600;
	font-size: 16px;
	cursor: pointer;
	transition: background-color 0.2s ease;
}

.blaze-calculate-shipping-btn:hover {
	background-color: #4a3526;
}

.blaze-calculate-shipping-btn:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* Shipping Results */
.blaze-shipping-results {
	margin-top: 24px;
	border-top: 1px solid #e4e5e7;
	padding-top: 16px;
}

.blaze-shipping-results h4 {
	font-family: 'Barlow', sans-serif;
	font-weight: 500;
	font-size: 16px;
	color: #4a4a4a;
	margin: 0 0 12px;
}

.blaze-shipping-method {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 12px 0;
	border-bottom: 1px solid #e4e5e7;
}

.blaze-shipping-method:last-child {
	border-bottom: none;
}

.blaze-shipping-method-title {
	font-family: 'Barlow', sans-serif;
	font-weight: 400;
	font-size: 14px;
	color: #4a4a4a;
}

.blaze-shipping-method-cost {
	font-family: 'Barlow', sans-serif;
	font-weight: 600;
	font-size: 14px;
	color: #59402e;
}

.blaze-shipping-no-methods,
.blaze-shipping-error {
	font-family: 'Barlow', sans-serif;
	font-size: 14px;
	color: #4a4a4a;
	margin: 0;
}

/* =========================================
   RETURNS TAB
   ========================================= */

.blaze-returns-content {
	padding: 24px;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.blaze-returns-section h4 {
	font-family: 'Barlow', sans-serif;
	font-weight: 500;
	font-size: 16px;
	color: #4a4a4a;
	margin: 0 0 8px;
}

.blaze-returns-section p {
	font-family: 'Barlow', sans-serif;
	font-weight: 400;
	font-size: 16px;
	line-height: 24px;
	color: #4a4a4a;
	margin: 0;
}

/* =========================================
   CERTIFICATIONS TAB
   ========================================= */

.blaze-certs-list {
	display: flex;
	flex-direction: column;
}

.blaze-cert-row {
	display: flex;
	flex-direction: column;
	gap: 24px;
	padding: 24px;
}

.blaze-cert-row-white {
	background: #fff;
}

.blaze-cert-row-tinted {
	background: rgba(89, 64, 46, 0.05);
}

.blaze-cert-logo {
	width: 80px;
	height: 80px;
	max-width: 200px;
	min-width: 120px;
	display: flex;
	align-items: flex-start;
	justify-content: flex-start;
	flex-shrink: 0;
}

.blaze-cert-logo img {
	width: 80px;
	height: 80px;
	object-fit: contain;
}

.blaze-cert-info {
	flex: 1;
	min-width: 200px;
}

.blaze-cert-name {
	font-family: 'Playfair Display', serif;
	font-weight: 400;
	font-size: 20px;
	color: #59402e;
	margin: 0 0 12px;
}

.blaze-cert-desc {
	font-family: 'Barlow', sans-serif;
	font-weight: 400;
	font-size: 16px;
	line-height: 24px;
	color: #59402e;
}

.blaze-cert-desc a {
	color: #59402e;
	text-decoration: underline;
}

.blaze-cert-desc a:hover {
	opacity: 0.8;
}

.blaze-cert-desc ul {
	margin: 8px 0;
	padding-left: 20px;
}

.blaze-cert-desc ul li {
	margin-bottom: 4px;
}

.blaze-certs-empty {
	padding: 24px;
}

.blaze-certs-empty p {
	font-family: 'Barlow', sans-serif;
	font-size: 16px;
	color: #4a4a4a;
}

/* =========================================
   RESPONSIVE
   ========================================= */

@media (max-width: 999px) {
	#shipping-returns-panel {
		--side-panel-width: 65vw;
	}
}

@media (max-width: 689px) {
	#shipping-returns-panel {
		--side-panel-width: 100vw;
	}

	.blaze-offcanvas-tab {
		font-size: 14px;
	}

	.blaze-cert-name {
		font-size: 18px;
	}

	.blaze-cert-desc {
		font-size: 14px;
	}
}
