/**
 * andW CF7 Extender - Frontend Styles
 *
 * @package andW_CF7_Extender
 */

/* ==========================================================================
   Repeater Field Styles
   ========================================================================== */

.andw-repeater-wrapper {
	margin-bottom: 1.5em;
}

.andw-repeater-items {
	margin-bottom: 1em;
}

.andw-repeater-item {
	position: relative;
	padding: 1em;
	margin-bottom: 1em;
	border: 1px solid #ddd;
	border-radius: 4px;
	background-color: #fafafa;
}

.andw-repeater-item:last-child {
	margin-bottom: 0;
}

.andw-repeater-item-content {
	margin-bottom: 1em;
}

.andw-repeater-item-actions {
	text-align: right;
}

.andw-repeater-footer {
	margin-top: 1em;
}

.andw-add-btn,
.andw-remove-btn {
	padding: 0.5em 1em;
	border: 1px solid #0073aa;
	border-radius: 4px;
	background-color: #fff;
	color: #0073aa;
	cursor: pointer;
	font-size: 0.9em;
	transition: background-color 0.2s, color 0.2s;
}

.andw-add-btn:hover,
.andw-add-btn:focus {
	background-color: #0073aa;
	color: #fff;
}

.andw-remove-btn {
	border-color: #dc3545;
	color: #dc3545;
}

.andw-remove-btn:hover,
.andw-remove-btn:focus {
	background-color: #dc3545;
	color: #fff;
}

.andw-add-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

.andw-remove-btn.andw-hidden {
	display: none;
}

/* ==========================================================================
   Multi-Step Form Styles
   ========================================================================== */

.andw-multistep-wrapper {
	position: relative;
}

/* Progress Indicator */
.andw-progress {
	display: flex;
	justify-content: space-between;
	margin-bottom: 2em;
	padding: 0;
	list-style: none;
}

.andw-progress-item {
	flex: 1;
	text-align: center;
	padding: 0.75em 0.5em;
	background-color: #f0f0f0;
	border-bottom: 3px solid #ddd;
	color: #666;
	font-size: 0.9em;
	transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}

.andw-progress-item--active {
	background-color: #e6f3ff;
	border-bottom-color: #0073aa;
	color: #0073aa;
	font-weight: bold;
}

.andw-progress-item--completed {
	background-color: #e8f5e9;
	border-bottom-color: #28a745;
	color: #28a745;
}

/* Steps */
.andw-steps-wrapper {
	position: relative;
}

.andw-step {
	display: none;
}

.andw-step--active {
	display: block;
}

.andw-step-header {
	margin-bottom: 1.5em;
}

.andw-step-title {
	margin: 0 0 0.5em;
	font-size: 1.25em;
	font-weight: bold;
}

.andw-step-content {
	margin-bottom: 1.5em;
}

/* Step Navigation */
.andw-step-nav {
	display: flex;
	justify-content: space-between;
	gap: 1em;
	margin-top: 1.5em;
	padding-top: 1.5em;
	border-top: 1px solid #ddd;
}

.andw-prev-btn,
.andw-next-btn {
	padding: 0.75em 1.5em;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	font-size: 1em;
	transition: background-color 0.2s;
}

.andw-prev-btn {
	background-color: #f0f0f0;
	color: #333;
}

.andw-prev-btn:hover,
.andw-prev-btn:focus {
	background-color: #ddd;
}

.andw-next-btn {
	background-color: #0073aa;
	color: #fff;
}

.andw-next-btn:hover,
.andw-next-btn:focus {
	background-color: #005a87;
}

.andw-prev-btn.andw-hidden {
	visibility: hidden;
}

/* ==========================================================================
   Conditional Group Styles
   ========================================================================== */

.andw-group-wrapper {
	transition: opacity 0.3s, max-height 0.3s;
}

.andw-group-wrapper.andw-hidden {
	display: none;
}

.andw-group-content {
	/* Container for conditional content */
}

/* ==========================================================================
   Summary / Confirmation Styles
   ========================================================================== */

.andw-summary-wrapper {
	padding: 1.5em;
	background-color: #f9f9f9;
	border: 1px solid #ddd;
	border-radius: 4px;
}

.andw-summary-table {
	width: 100%;
	border-collapse: collapse;
}

.andw-summary-table th,
.andw-summary-table td {
	padding: 0.75em;
	border-bottom: 1px solid #eee;
	text-align: left;
	vertical-align: top;
}

.andw-summary-table th {
	width: 30%;
	font-weight: bold;
	color: #333;
}

.andw-summary-table td {
	color: #666;
}

.andw-summary-table tr:last-child th,
.andw-summary-table tr:last-child td {
	border-bottom: none;
}

.andw-summary-empty {
	color: #999;
	font-style: italic;
	text-align: center;
	padding: 1em;
}

/* Repeater rows in summary */
.andw-summary-repeater-label {
	background-color: #f0f0f0;
	font-weight: bold;
	color: #333;
	padding-top: 1em;
}

.andw-summary-repeater-row .andw-summary-label {
	padding-left: 1.5em;
	font-weight: normal;
	color: #555;
}

/* Value placeholder */
.andw-value {
	display: inline;
}
