/**
 * Stylezea Product Options - front-end helper styles.
 */

.spo-cbt-input {
	display: none;
	margin-top: 15px;
}

/* --- Top-level tab navigation ---------------------------------------- */
.spo-tabnav {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 18px;
	border-bottom: 1px solid #e5e5e5;
}

.spo-tabnav-btn {
	background: none;
	border: none;
	border-bottom: 2px solid transparent;
	padding: 8px 14px;
	font-size: 15px;
	font-weight: 600;
	color: #777;
	cursor: pointer;
}

.spo-tabnav-btn.active {
	color: #111;
	border-bottom-color: #111;
}

.spo-tabpanel {
	display: none;
}

.spo-tabpanel.active {
	display: flex;
	flex-wrap: wrap;
	column-gap: 24px;
	align-items: flex-start;
}

/* --- Top-level (no-tab) fields use the same flexible row layout ------- */
.spo-toplevel-fields {
	display: flex;
	flex-wrap: wrap;
	column-gap: 24px;
	align-items: flex-start;
}

/* --- Field width (responsive: everything full width on small screens) -- */
.spo-tabpanel > .spo-group,
.spo-toplevel-fields > .spo-group {
	flex: 0 0 100%;
	box-sizing: border-box;
}

.spo-tabpanel > .spo-group.spo-w-half,
.spo-toplevel-fields > .spo-group.spo-w-half {
	flex: 0 0 calc(50% - 12px);
}

@media (max-width: 600px) {
	.spo-tabpanel > .spo-group.spo-w-half,
	.spo-toplevel-fields > .spo-group.spo-w-half {
		flex: 0 0 100%;
	}
}

/* --- Conditional logic: hidden until its rule is satisfied ------------ */
.spo-cond-hidden {
	display: none !important;
}

/* --- Shared field bits ----------------------------------------------- */
.spo-group {
	margin-bottom: 22px;
}

.spo-help {
	margin: 4px 0 8px;
	font-size: 13px;
	color: #888;
}

.spo-req {
	color: #c0392b;
}

/* --- Inputs ----------------------------------------------------------- */
.spo-input,
.spo-select,
.spo-multiselect {
	width: 100%;
	padding: 10px 12px;
	border: 1px solid #d9d9d9;
	border-radius: 6px;
	font-size: 14px;
	box-sizing: border-box;
}

textarea.spo-input {
	min-height: 90px;
	resize: vertical;
}

input[type="color"].spo-input {
	height: 44px;
	padding: 4px;
	cursor: pointer;
}

input[type="range"].spo-input {
	padding: 0;
	border: none;
}

.spo-range-output {
	display: inline-block;
	margin-left: 8px;
	font-weight: 600;
}

/* --- Radio & checkbox lists ------------------------------------------ */
.spo-radio-list,
.spo-check-list {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.spo-radio-row,
.spo-check-row {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-size: 14px;
}

.spo-radio-row .option_price,
.spo-check-row .option_price {
	display: inline;
}

/* --- Image options --------------------------------------------------- */
.spo-choice-image .field_option {
	text-align: center;
}

.spo-option-img {
	display: block;
	width: 100%;
	max-width: 120px;
	height: auto;
	margin: 0 auto 6px;
	border-radius: 6px;
}

/* --- Display fields -------------------------------------------------- */
.spo-heading {
	margin: 6px 0;
	font-size: 18px;
	font-weight: 700;
}

.spo-description {
	color: #555;
	font-size: 14px;
	line-height: 1.5;
}

.spo-divider {
	border: none;
	border-top: 1px solid #e5e5e5;
	margin: 4px 0;
}

/* ── File upload drop-zone ─────────────────────────────────────────────── */
.spo-file-drop-zone {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
	gap: 2px;
	width: 100%;
	padding: 14px 18px;
	border: 1.5px dashed #d1d5db;
	border-radius: 10px;
	background: #fff;
	cursor: pointer;
	transition: border-color .2s, background .2s;
	text-align: left;
	box-sizing: border-box;
}
.spo-file-drop-zone:hover,
.spo-file-drop-zone:focus-within {
	border-color: #374151;
	background: #f9fafb;
}
.spo-file-drop-zone input[type="file"] {
	position: absolute;
	width: 1px;
	height: 1px;
	opacity: 0;
	pointer-events: none;
}
/* Icon + label on one row */
.spo-file-drop-header {
	display: flex;
	align-items: center;
	gap: 8px;
}
.spo-file-drop-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	color: #374151;
	flex-shrink: 0;
}
.spo-file-drop-text {
	font-weight: 700;
	font-size: 14px;
	color: #111827;
	line-height: 1.3;
}
/* Description line sits directly below the header row, no left indent */
.spo-file-drop-desc {
	font-size: 13px;
	color: #6b7280;
	line-height: 1.45;
	padding-left: 0;
	margin-top: 3px;
}
.spo-file-drop-chosen {
	font-size: 12px;
	color: #059669;
	display: none;
	padding-left: 0;
	margin-top: 3px;
}
.spo-file-drop-chosen.has-file {
	display: block;
}

/* --- Confirmation checkbox (hidden until user selects an option) ---- */
.spo-confirm-wrap {
	margin: 14px 0 10px;
	display: none; /* shown by JS when any option is selected */
}
.spo-confirm-wrap.spo-confirm-visible {
	display: block;
}
.spo-confirm-label {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	font-size: 13px;
	line-height: 1.5;
	color: #444;
	cursor: pointer;
}
.spo-confirm-checkbox {
	flex-shrink: 0;
	margin-top: 3px;
	width: 16px;
	height: 16px;
	cursor: pointer;
}

/* --- Size chart popup ----------------------------------------------- */
#spo-size-chart-overlay {
	position: fixed;
	inset: 0;
	z-index: 999999;
	background: rgba(0,0,0,0.65);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	overflow-y: auto;
}
.spo-sc-modal {
	position: relative;
	background: #fff;
	border-radius: 8px;
	padding: 30px 16px;
	max-width: 90vw;
	max-height: 90vh;
	overflow: auto;
	box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}
.spo-sc-close {
	position: absolute;
	  top: 0px;
	  right: 0px;
	  background: none;
	  border: none;
	  border-radius: 50%;
	  width: 30px;
	  height: 30px;
	  font-size: 30px;
	  line-height: 1;
	  cursor: pointer;
	  color: #000;
	  display: flex;
	  align-items: center;
	  justify-content: center;
	  z-index: 2;
	  padding: 0 25px;
}
.spo-sc-img {
	display: block;
	max-width: 80vw;
	max-height: 80vh;
	width: auto;
	height: auto;
}

/* --- Size chart field on frontend ----------------------------------- */
.spo-size-chart-wrap {
	margin: 8px 0 4px;
}
