/* SCF Repeater for Elementor — frontend styles */

.scfre-rows {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.scfre-rows--grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

.scfre-rows--inline {
	flex-direction: row;
	flex-wrap: wrap;
	align-items: center;
}

.scfre-row {
	display: flex;
	flex-direction: column;
	gap: 8px;
	min-width: 0;
	text-decoration: none;
	color: inherit;
	transition: background-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

a.scfre-row:hover {
	text-decoration: none;
}

.scfre-rows--divided .scfre-row + .scfre-row {
	border-top: 1px solid #e0e0e0;
	padding-top: 16px;
}

.scfre-field {
	min-width: 0;
}

.scfre-field__label {
	font-size: 0.8em;
	font-weight: 600;
	letter-spacing: 0.03em;
	text-transform: uppercase;
	opacity: 0.75;
}

.scfre-field__value {
	margin: 0;
	word-break: break-word;
}

.scfre-field__value > .scfre-image {
	display: block;
}

/* Sub field icons */
.scfre-field__value--with-icon {
	display: flex;
	align-items: flex-start;
	gap: 8px;
}

.scfre-field__icon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	justify-content: center;
	line-height: 1;
}

.scfre-field__icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

/* Keeps wrapped lines from running back under the icon. */
.scfre-field__text {
	min-width: 0;
}

/* Icon Picker values: dashicon, media library image or URL */
.scfre-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
}

.scfre-icon .dashicons,
.scfre-icon .dashicons-before:before {
	width: 1em;
	height: 1em;
	font-size: 1em;
	line-height: 1;
}

.scfre-icon-img {
	width: 1em;
	height: 1em;
	object-fit: contain;
}

/* Buttons */
.scfre-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 10px 18px;
	border: 0;
	border-radius: 4px;
	background-color: #3858e9;
	color: #fff;
	line-height: 1.3;
	text-align: center;
	text-decoration: none;
	transition: background-color 0.2s ease, color 0.2s ease, box-shadow 0.2s ease;
}

.scfre-button:hover,
.scfre-button:focus {
	color: #fff;
	text-decoration: none;
}

.scfre-button__icon {
	display: inline-flex;
	flex: 0 0 auto;
	align-items: center;
	line-height: 1;
}

.scfre-button__icon svg {
	width: 1em;
	height: 1em;
	fill: currentColor;
}

.scfre-button__text {
	min-width: 0;
}

.scfre-image {
	max-width: 100%;
	height: auto;
	vertical-align: middle;
}

.scfre-row__index {
	display: inline-block;
	flex: 0 0 auto;
	align-self: flex-start;
	min-width: 28px;
	height: 28px;
	line-height: 28px;
	text-align: center;
	border-radius: 50%;
	background-color: #f1f1f1;
	font-size: 0.85em;
	font-weight: 600;
}

/* Gallery */
.scfre-gallery {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 8px;
	margin: 0;
	padding: 0;
	list-style: none;
}

.scfre-gallery__item {
	margin: 0;
}

/* Nested repeater */
.scfre-nested {
	margin: 0;
	padding: 0;
	list-style: none;
}

.scfre-nested__row {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.scfre-nested__row + .scfre-nested__row {
	margin-top: 4px;
}

/* Misc value types */
.scfre-color-swatch {
	display: inline-block;
	width: 1em;
	height: 1em;
	margin-right: 0.4em;
	border: 1px solid rgba(0, 0, 0, 0.15);
	border-radius: 3px;
	vertical-align: -0.15em;
}

.scfre-boolean--false {
	opacity: 0.6;
}

.scfre-embed {
	position: relative;
}

.scfre-embed iframe {
	max-width: 100%;
}

.scfre-field__before,
.scfre-field__after {
	opacity: 0.8;
}

/* Table layout */
.scfre-table {
	width: 100%;
	border-collapse: collapse;
}

.scfre-table th,
.scfre-table td {
	padding: 10px 12px;
	text-align: left;
	vertical-align: top;
	border-bottom: 1px solid #e6e6e6;
}

.scfre-table th {
	font-weight: 600;
}

.scfre-table__index {
	width: 1%;
	white-space: nowrap;
	opacity: 0.7;
}

/* Shown only inside the Elementor editor, never on the front end. */
.scfre-hint {
	display: block;
	margin-top: 6px;
	padding: 4px 8px;
	border-left: 3px solid #d63638;
	background-color: #fcf0f1;
	color: #8a2424;
	font-size: 12px;
	line-height: 1.5;
	text-align: left;
}

/* Editor + empty states */
.scfre-notice {
	padding: 12px 16px;
	border: 1px dashed #c3c4c7;
	border-radius: 4px;
	background-color: #fafafa;
	color: #50575e;
	font-size: 13px;
}

.scfre-empty {
	opacity: 0.75;
}

@media (max-width: 767px) {
	.scfre-rows--grid {
		grid-template-columns: 1fr;
	}

	.scfre-table {
		display: block;
		overflow-x: auto;
	}
}
