/**
 * TenderPipe Wizard Styles
 *
 * Now using design tokens from design-tokens.css for consistent theming
 *
 * @package TenderPipe
 * @since   2.0.0
 */

/* ============================================
   Base Wizard Styles
   ============================================ */

.tenderpipe-wizard-wrapper {
	max-width: var(--tp-container-max-width-lg, 1024px);
	margin: 0 auto;
	padding: var(--tp-spacing-3);
	width: 100%;
	box-sizing: border-box;
}

@media (min-width: 375px) {
	.tenderpipe-wizard-wrapper {
		padding: var(--tp-spacing-4);
	}
}

@media (min-width: 768px) {
	.tenderpipe-wizard-wrapper {
		padding: var(--tp-spacing-5);
	}
}

@media (min-width: 1024px) {
	.tenderpipe-wizard-wrapper {
		padding: var(--tp-spacing-6);
	}
}

.tenderpipe-container {
	background: var(--tp-white);
	border-radius: var(--tp-radius-xl);
	box-shadow: var(--tp-shadow-md);
	padding: var(--tp-spacing-10);
	position: relative;
}

/* Progress Bar */
.tp-progress-container {
	margin-bottom: var(--tp-spacing-10);
}

.tp-progress-bar {
	height: 8px;
	background: var(--tp-gray-200);
	border-radius: var(--tp-radius-sm);
	overflow: hidden;
	margin-bottom: var(--tp-spacing-5);
}

.tp-progress-fill {
	height: 100%;
	background: linear-gradient(90deg, var(--tp-primary) 0%, var(--tp-primary-dark) 100%);
	transition: width var(--tp-transition-base);
	width: 25%;
}

.tp-progress-steps {
	display: flex;
	justify-content: space-between;
	gap: var(--tp-spacing-3);
}

.tp-step-indicator {
	flex: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--tp-spacing-2);
	min-width: var(--tp-touch-target-min);
	min-height: var(--tp-touch-target-min);
	padding: var(--tp-spacing-1);
	opacity: 0.5;
	transition: opacity var(--tp-transition-base);
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
}

.tp-step-indicator.active,
.tp-step-indicator.completed {
	opacity: 1;
}

.tp-step-number {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	background: var(--tp-gray-200);
	color: var(--tp-gray-500);
	border-radius: var(--tp-radius-full);
	font-weight: var(--tp-font-weight-semibold);
	font-size: var(--tp-font-size-sm);
	transition: all var(--tp-transition-base);
}

.tp-step-indicator.active .tp-step-number {
	background: var(--tp-primary);
	color: var(--tp-white);
}

.tp-step-indicator.completed .tp-step-number {
	background: var(--tp-success);
	color: var(--tp-white);
}

.tp-step-label {
	font-size: var(--tp-font-size-xs);
	color: var(--tp-text-tertiary);
	text-align: center;
}

.tp-step-indicator.active .tp-step-label {
	color: var(--tp-text-primary);
	font-weight: var(--tp-font-weight-semibold);
}

/* Step Content */
.tp-step {
	display: none;
}

.tp-step.active {
	display: block;
}

.tp-step-content {
	margin-bottom: 32px;
/* Step 4: User Details - Constrain width to match other steps */
.tp-step[data-step="4"] .tp-step-content {
	max-width: 600px;
	margin-left: auto;
	margin-right: auto;
}

}

.tp-step-header {
	margin-bottom: 32px;
	text-align: center;
}

.tp-step-title {
	margin: 0 0 var(--tp-spacing-3) 0;
	font-size: var(--tp-font-size-3xl);
	font-weight: var(--tp-font-weight-bold);
	color: var(--tp-text-primary);
}

.tp-step-description {
	margin: 0;
	font-size: var(--tp-font-size-base);
	color: var(--tp-text-secondary);
	line-height: var(--tp-line-height-relaxed);
}

/* Form Elements */
.tp-form-group {
	margin-bottom: var(--tp-spacing-6);
}

.tp-label {
	display: block;
	margin-bottom: var(--tp-spacing-2);
	font-size: var(--tp-font-size-sm);
	font-weight: var(--tp-font-weight-semibold);
	color: var(--tp-text-primary);
}

.tp-required {
	color: var(--tp-error);
	margin-left: var(--tp-spacing-1);
}

.tp-optional {
	color: var(--tp-text-tertiary);
	font-weight: var(--tp-font-weight-normal);
	font-size: var(--tp-font-size-xs);
	margin-left: var(--tp-spacing-1);
}

.tp-select {
	width: 100% !important;
	min-width: 280px !important;
	max-width: 100% !important;
	height: auto !important;
	min-height: 48px !important;
	padding: 12px 16px !important;
	padding-right: 50px !important;
	font-size: 15px !important;
	line-height: 1.5 !important;
	color: var(--tp-gray-600);
	background: var(--tp-white);
	border: 2px solid var(--tp-border);
	border-radius: 8px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23495057' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	background-size: 12px;
	white-space: normal;
	overflow: visible !important;
	text-overflow: ellipsis;
	box-sizing: border-box !important;
	vertical-align: middle;
}

.tp-select option {
	padding: 8px;
	white-space: normal;
}

.tp-select:focus {
	outline: none;
	border-color: var(--tp-primary);
	box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}
/* Prevent iOS zoom on input focus */
@media (max-width: 767px) {
	.tp-select,
	.tp-input,
	.tp-textarea {
		font-size: 16px !important;
	}
}


/* Buttons */
.tp-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 14px 24px;
	min-height: 48px;
	font-size: 15px;
	font-weight: 600;
	border: none;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s ease;
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
}

.tp-button-primary {
	background: var(--tp-primary);
	color: var(--tp-white);
}

.tp-button-primary:hover {
	background: var(--tp-primary-dark);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
}

.tp-button-secondary {
	background: var(--tp-gray-500);
	color: var(--tp-white);
}

.tp-button-secondary:hover {
	background: var(--tp-gray-600);
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(108, 117, 125, 0.3);
}

.tp-button:active {
	transform: scale(0.98);
	opacity: 0.9;
}

.tp-button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none !important;
}

.tp-btn-icon {
	font-size: 16px;
}

/* Navigation */
.tp-navigation {
	display: flex;
	justify-content: space-between;
	gap: 12px;
	margin-top: 32px;
	padding-top: 32px;
	border-top: 1px solid var(--tp-gray-200);
}

/* Messages */
.tp-tier-notice {
	margin-bottom: 24px;
	padding: 16px;
	background: var(--tp-warning-bg);
	border: 1px solid var(--tp-warning);
	border-radius: 8px;
	text-align: center;
}

.tp-tier-notice p {
	margin: 0;
	font-size: 14px;
	color: var(--tp-warning-text);
}

.tp-upgrade-link {
	color: var(--tp-primary);
	font-weight: 600;
	text-decoration: none;
	margin-left: 8px;
}

.tp-upgrade-link:hover {
	text-decoration: underline;
}

.tp-error-message,
.tp-success-message {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 16px;
	border-radius: 8px;
	margin-bottom: 24px;
}

.tp-error-message {
	background: var(--tp-error-bg);
	border: 1px solid var(--tp-error-bg);
	color: var(--tp-error-text);
}

.tp-success-message {
	background: var(--tp-success-bg);
	border: 1px solid var(--tp-success-bg);
	color: var(--tp-success-text);
}

.tp-error-icon,
.tp-success-icon {
	font-size: 20px;
}

.tp-error-text,
.tp-success-text {
	flex: 1;
	font-size: 14px;
}

.tp-error-close {
	background: none;
	border: none;
	font-size: 24px;
	color: var(--tp-error-text);
	cursor: pointer;
	padding: 0;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* Loading Overlay */
.tp-loading-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.95);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	z-index: 1000;
}

.tp-spinner {
	width: 50px;
	height: 50px;
	border: 5px solid var(--tp-gray-100);
	border-top: 5px solid var(--tp-primary);
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin-bottom: 16px;
}

@keyframes spin {
	0% { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}

/* Location Preview */
.tp-location-preview {
	margin-top: 24px;
}

.tp-preview-card {
	padding: 20px;
	background: var(--tp-gray-50);
	border-radius: 8px;
	border: 1px solid var(--tp-border-light);
}

.tp-preview-card h4 {
	margin: 0 0 12px 0;
	font-size: 14px;
	font-weight: 600;
	color: var(--tp-gray-600);
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.tp-location-breadcrumb {
	font-size: 16px;
	color: var(--tp-text-primary);
	font-weight: 500;
}

/* Success Screen */
.tp-success-screen {
	text-align: center;
	padding: 60px 20px;
}

.tp-success-content {
	max-width: 500px;
	margin: 0 auto;
}

.tp-success-icon-large {
	width: 80px;
	height: 80px;
	background: var(--tp-success);
	color: var(--tp-white);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 48px;
	margin: 0 auto 24px;
}

.tp-success-screen h2 {
	margin: 0 0 16px 0;
	font-size: 32px;
	color: var(--tp-text-primary);
}

.tp-success-screen p {
	margin: 0 0 12px 0;
	font-size: 16px;
	color: var(--tp-gray-500);
	line-height: 1.6;
}

.tp-success-actions {
	display: flex;
	gap: 12px;
	justify-content: center;
	margin-top: 32px;
}

/* ============================================
   Source Selection Styles
   ============================================ */

/* Source Limit Info */
.tp-source-limit-info {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 24px;
	padding: 16px;
	background: var(--tp-gray-50);
	border-radius: 8px;
}

.tp-limit-badge {
	display: flex;
	align-items: center;
	gap: 4px;
	font-size: 14px;
	color: var(--tp-gray-600);
}

.tp-limit-current {
	font-weight: 600;
	font-size: 18px;
	color: var(--tp-primary);
}

.tp-limit-separator {
	color: var(--tp-gray-400);
}

.tp-limit-max {
	font-weight: 600;
	font-size: 18px;
	color: var(--tp-gray-500);
}

.tp-upgrade-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 8px 16px;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	color: var(--tp-white);
	text-decoration: none;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tp-upgrade-badge:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.tp-upgrade-icon {
	font-size: 16px;
}

/* Sources Container */
.tp-sources-container {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	margin-bottom: 24px;
}

@media (min-width: 640px) {
	.tp-sources-container {
		grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	}
}

@media (min-width: 1024px) {
	.tp-sources-container {
		grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	}
}

/* Source Card */
.tp-source-card {
	position: relative;
	display: flex;
	align-items: flex-start;
	gap: 12px;
	padding: 20px;
	background: var(--tp-white);
	border: 2px solid var(--tp-gray-200);
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.2s ease;
}

.tp-source-card:hover {
	border-color: var(--tp-primary);
	box-shadow: 0 4px 12px rgba(0, 102, 204, 0.1);
	transform: translateY(-2px);
}

.tp-source-card.selected {
	border-color: var(--tp-primary);
	background: var(--tp-primary-50);
	box-shadow: 0 4px 12px rgba(0, 102, 204, 0.15);
}

/* Source Checkbox */
.tp-source-checkbox {
	flex-shrink: 0;
	width: 20px;
	height: 20px;
	margin-top: 2px;
	cursor: pointer;
	accent-color: var(--tp-primary);
}

/* Source Info */
.tp-source-info {
	flex: 1;
	min-width: 0;
}

.tp-source-name {
	margin: 0 0 8px 0;
	font-size: 16px;
	font-weight: 600;
	color: var(--tp-text-primary);
	line-height: 1.4;
}

.tp-source-description {
	margin: 0 0 12px 0;
	font-size: 14px;
	color: var(--tp-gray-500);
	line-height: 1.5;
}

/* Source Meta */
.tp-source-meta {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.tp-source-region {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	background: var(--tp-gray-200);
	color: var(--tp-gray-600);
	font-size: 12px;
	font-weight: 500;
	border-radius: 4px;
}

.tp-source-badges {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.tp-source-paid-badge {
	display: inline-flex;
	align-items: center;
	gap: 4px;
	padding: 4px 10px;
	background: #fef3c7;
	color: #92400e;
	font-size: 12px;
	font-weight: 500;
	border-radius: 4px;
	border: 1px solid #fcd34d;
}

.tp-source-type-badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	background: #e5e7eb;
	color: #374151;
	font-size: 11px;
	font-weight: 500;
	border-radius: 4px;
	text-transform: capitalize;
}

.tp-badge-icon {
	font-size: 14px;
}

/* Loading State */
.tp-sources-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 60px 20px;
	text-align: center;
}

.tp-spinner-small {
	width: 40px;
	height: 40px;
	border: 4px solid var(--tp-gray-100);
	border-top: 4px solid var(--tp-primary);
	border-radius: 50%;
	animation: spin 1s linear infinite;
	margin-bottom: 16px;
}

/* No Sources Message */
.tp-no-sources {
	text-align: center;
	padding: 60px 20px;
}

.tp-no-sources p {
	margin: 0 0 20px 0;
	font-size: 16px;
	color: var(--tp-gray-500);
}

/* Selected Sources Preview */
.tp-selected-sources-preview {
	margin-top: 32px;
	padding: 20px;
	background: var(--tp-gray-50);
	border-radius: 8px;
}

.tp-selected-sources-preview h4 {
	margin: 0 0 16px 0;
	font-size: 16px;
	font-weight: 600;
	color: var(--tp-text-primary);
}

.tp-selected-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.tp-selected-item {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	background: var(--tp-white);
	border: 1px solid var(--tp-border-light);
	border-radius: 6px;
	font-size: 14px;
	color: var(--tp-gray-600);
}

.tp-selected-item-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	background: var(--tp-error);
	color: var(--tp-white);
	border: none;
	border-radius: 50%;
	font-size: 12px;
	cursor: pointer;
	transition: background 0.2s ease;
}

.tp-selected-item-remove:hover {
	background: #c82333;
}

/* ============================================
   Keywords Section
   ============================================ */

.tp-keywords-section {
	margin-top: 32px;
	padding: 24px;
	background: var(--tp-gray-50);
	border-radius: 8px;
	border: 1px solid var(--tp-gray-200);
}

.tp-keywords-section h4 {
	margin: 0 0 8px 0;
	font-size: 18px;
	font-weight: 600;
	color: var(--tp-text-primary);
	display: flex;
	align-items: center;
	gap: 8px;
}

.tp-optional-badge {
	font-size: 13px;
	font-weight: 400;
	color: var(--tp-gray-500);
	background: var(--tp-gray-200);
	padding: 2px 8px;
	border-radius: 4px;
}

.tp-keywords-description {
	margin: 0 0 20px 0;
	font-size: 14px;
	color: var(--tp-gray-500);
}

/* Keywords Input Wrapper */
.tp-keywords-input-wrapper {
	position: relative;
	background: var(--tp-white);
	border: 2px solid var(--tp-border-light);
	border-radius: 8px;
	padding: 8px;
	min-height: 48px;
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
	transition: border-color 0.2s ease;
}

.tp-keywords-input-wrapper:focus-within {
	border-color: var(--tp-primary);
	box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

/* Keywords Tags Container */
.tp-keywords-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}

/* Keyword Tag */
.tp-keyword-tag {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	background: var(--tp-primary);
	color: var(--tp-white);
	padding: 6px 10px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	transition: all 0.2s ease;
	animation: tagSlideIn 0.2s ease;
}

@keyframes tagSlideIn {
	from {
		opacity: 0;
		transform: scale(0.8);
	}
	to {
		opacity: 1;
		transform: scale(1);
	}
}

.tp-keyword-tag:hover {
	background: var(--tp-primary-dark);
}

/* Keyword Tag Remove Button */
.tp-keyword-tag-remove {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 18px;
	height: 18px;
	background: rgba(255, 255, 255, 0.2);
	border: none;
	border-radius: 50%;
	color: var(--tp-white);
	font-size: 14px;
	line-height: 1;
	cursor: pointer;
	transition: all 0.2s ease;
	padding: 0;
}

.tp-keyword-tag-remove:hover {
	background: rgba(255, 255, 255, 0.3);
	transform: scale(1.1);
}

/* Keywords Input Field */
.tp-keywords-input {
	flex: 1;
	min-width: 200px;
	border: none;
	outline: none;
	padding: 8px;
	font-size: 14px;
	color: var(--tp-text-primary);
	background: transparent;
}

.tp-keywords-input::placeholder {
	color: var(--tp-gray-400);
}

/* Keywords Autocomplete Dropdown */
.tp-keywords-autocomplete {
	position: absolute;
	top: calc(100% + 4px);
	left: 0;
	right: 0;
	background: var(--tp-white);
	border: 1px solid var(--tp-border-light);
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	max-height: 240px;
	overflow-y: auto;
	z-index: 1000;
	animation: dropdownSlideIn 0.2s ease;
}

@keyframes dropdownSlideIn {
	from {
		opacity: 0;
		transform: translateY(-8px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Autocomplete Item */
.tp-keywords-autocomplete-item {
	padding: 12px 16px;
	cursor: pointer;
	font-size: 14px;
	color: var(--tp-text-primary);
	transition: background 0.15s ease;
	border-bottom: 1px solid var(--tp-gray-50);
}

.tp-keywords-autocomplete-item:last-child {
	border-bottom: none;
}

.tp-keywords-autocomplete-item:hover,
.tp-keywords-autocomplete-item.active {
	background: var(--tp-gray-50);
	color: var(--tp-primary);
}

.tp-keywords-autocomplete-item.active {
	background: var(--tp-primary-50);
}

/* No Results Message */
.tp-keywords-no-results {
	padding: 16px;
	text-align: center;
	color: var(--tp-gray-500);
	font-size: 14px;
}

/* Keywords Hint */
.tp-keywords-hint {
	margin-top: 8px;
	font-size: 13px;
	color: var(--tp-gray-500);
	font-style: italic;
}

/* Loading State */
.tp-keywords-loading {
	padding: 12px 16px;
	text-align: center;
	color: var(--tp-gray-500);
	font-size: 14px;

/* Keywords Summary Display */
.tp-summary-keywords-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 8px;
}

.tp-keyword-badge {
	display: inline-block;
	background: var(--tp-primary-50);
	color: var(--tp-primary);
	padding: 6px 12px;
	border-radius: 6px;
	font-size: 14px;
	font-weight: 500;
	border: 1px solid var(--tp-primary-200);
}
}

.tp-keywords-loading::after {
	content: '...';
	animation: ellipsis 1.5s infinite;
}

@keyframes ellipsis {
	0%, 20% { content: '.'; }
	40% { content: '..'; }
	60%, 100% { content: '...'; }
}


/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
	.tenderpipe-container {
		padding: 24px;
	}
	
	.tp-step-title {
		font-size: 24px;
	}
	
	.tp-progress-steps {
		gap: 8px;
	}
	
	.tp-step-label {
		font-size: 11px;
	}
	
	.tp-step-number {
		width: 36px;
		height: 36px;
		font-size: 13px;
	}
	
	.tp-step-indicator {
		min-width: 48px;
		min-height: 48px;
	}
	
	.tp-button {
		padding: 16px 24px;
		min-height: 52px;
		font-size: 16px;
	}
}

/* Extra Small Devices - iPhone SE, small Android phones */
@media (max-width: 374px) {
	.tp-progress-steps {
		gap: 4px;
		padding: 0 8px;
	}
	
	.tp-step-indicator {
		min-width: 40px;
	}
	
	.tp-step-label {
		display: none;
	}
	
	.tp-step-number {
		width: 28px;
		height: 28px;
		font-size: 12px;
	}
}

/* ============================================
	  Custom Sources Styles
	  ============================================ */

.tp-custom-source-actions {
	margin-bottom: 24px;
	display: flex;
	justify-content: flex-start;
}

.tp-btn-add-custom-source {
	display: inline-flex;
	align-items: center;
	gap: 8px;
}

.tp-custom-sources-section {
	margin-top: 32px;
	padding-top: 24px;
	border-top: 2px solid var(--tp-gray-200);
}

.tp-custom-sources-section h4 {
	font-size: 16px;
	font-weight: 600;
	color: var(--tp-text-primary);
	margin-bottom: 16px;
}

.tp-custom-sources-list {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.tp-custom-source-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 12px 16px;
	background: var(--tp-gray-50);
	border: 1px solid var(--tp-border-light);
	border-radius: 8px;
	transition: all 0.2s ease;
}

.tp-custom-source-item:hover {
	background: var(--tp-gray-200);
	border-color: var(--tp-border);
}

.tp-custom-source-url {
	flex: 1;
	font-size: 14px;
	color: var(--tp-gray-600);
	word-break: break-all;
}

.tp-custom-source-remove {
	background: transparent;
	border: none;
	color: var(--tp-error);
	cursor: pointer;
	padding: 4px 8px;
	font-size: 18px;
	line-height: 1;
	transition: color 0.2s ease;
}

.tp-custom-source-remove:hover {
	color: #c82333;
}

/* Modal Styles */
.tp-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 10000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.tp-modal-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(2px);
}

.tp-modal-content {
	position: relative;
	background: var(--tp-white);
	border-radius: 12px;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
	max-width: 600px;
	width: 100%;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.tp-modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 24px;
	border-bottom: 1px solid var(--tp-gray-200);
}

.tp-modal-header h3 {
	margin: 0;
	font-size: 20px;
	font-weight: 600;
	color: var(--tp-text-primary);
}

.tp-modal-close {
	background: transparent;
	border: none;
	font-size: 28px;
	line-height: 1;
	color: var(--tp-gray-500);
	cursor: pointer;
	padding: 0;
	width: 32px;
	height: 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 4px;
	transition: all 0.2s ease;
}

.tp-modal-close:hover {
	background: var(--tp-gray-50);
	color: var(--tp-text-primary);
}

.tp-modal-body {
	padding: 24px;
	overflow-y: auto;
}

.tp-modal-description {
	margin: 0 0 16px 0;
	font-size: 14px;
	color: var(--tp-gray-500);
	line-height: 1.5;
}

.tp-textarea {
	width: 100%;
	padding: 12px;
	border: 1px solid var(--tp-border);
	border-radius: 8px;
	font-size: 14px;
	font-family: inherit;
	line-height: 1.5;
	resize: vertical;
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.tp-textarea:focus {
	outline: none;
	border-color: var(--tp-primary);
	box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.tp-custom-source-error {
	margin-top: 12px;
	padding: 12px;
	background: var(--tp-error-bg);
	border: 1px solid var(--tp-error-bg);
	border-radius: 8px;
	color: var(--tp-error-text);
	font-size: 14px;
}

.tp-modal-footer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 12px;
	padding: 24px;
	border-top: 1px solid var(--tp-gray-200);
}
/* ============================================
   Summary Page Styles
   ============================================ */

/* Summary Container - Grid Layout */
.tp-summary-container {
	display: grid;
	grid-template-columns: 1fr;
	gap: 16px;
	margin-bottom: 32px;
}

@media (min-width: 640px) {
	.tp-summary-container {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
	}
}

@media (min-width: 1024px) {
	.tp-summary-container {
		grid-template-columns: repeat(3, 1fr);
		gap: 24px;
	}
}

/* Summary Card */
.tp-summary-card {
	background: var(--tp-white);
	border: 1px solid var(--tp-border-light);
	border-radius: 12px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	transition: all 0.3s ease;
	display: flex;
	flex-direction: column;
	overflow: hidden;
}

.tp-summary-card:hover {
	transform: translateY(-2px);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

/* Summary Header */
.tp-summary-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 20px 24px;
	border-bottom: 1px solid #f0f3f5;
	background: #fafbfc;
}

.tp-summary-header h3 {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 0;
	font-size: 18px;
	font-weight: 600;
	color: var(--tp-gray-900);
}

.tp-summary-icon {
	font-size: 24px;
	line-height: 1;
}

/* Edit Link Button */
.tp-edit-link {
	background: transparent;
	border: 1px solid var(--tp-primary);
	color: var(--tp-primary);
	padding: 6px 16px;
	border-radius: 6px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s ease;
}

.tp-edit-link:hover {
	background: var(--tp-primary);
	color: var(--tp-white);
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

/* Summary Content */
.tp-summary-content {
	padding: 24px;
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 16px;
}

/* Summary Value - Primary Information */
.tp-summary-value {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 16px;
	font-weight: 500;
	color: var(--tp-gray-800);
	line-height: 1.5;
}

.tp-summary-value .tp-location-icon,
.tp-summary-value .tp-delivery-icon {
	font-size: 20px;
	flex-shrink: 0;
}

.tp-location-name,
.tp-delivery-label {
	font-weight: 600;
	color: var(--tp-gray-900);
}

/* Summary Meta - Secondary Information */
.tp-summary-meta {
	font-size: 14px;
	color: var(--tp-gray-500);
	line-height: 1.5;
	padding-left: 32px;
}

.tp-location-scope {
	font-style: italic;
}

/* Sources List */
.tp-sources-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.tp-source-item {
	display: flex;
	align-items: center;
	gap: 10px;
	font-size: 14px;
	color: var(--tp-gray-600);
	padding: 8px 12px;
	background: var(--tp-gray-50);
	border-radius: 6px;
	transition: background 0.2s ease;
}

.tp-source-item:hover {
	background: var(--tp-gray-200);
}

.tp-check-icon {
	color: var(--tp-success);
	font-weight: bold;
	font-size: 16px;
	flex-shrink: 0;
}

.tp-source-name {
	flex: 1;
	font-weight: 500;
}

/* Sources Count Badge */
.tp-sources-count {
	margin-top: 8px;
	padding-top: 12px;
	border-top: 1px solid var(--tp-gray-200);
}

.tp-badge {
	display: inline-flex;
	align-items: center;
	padding: 6px 12px;
	background: var(--tp-primary-50);
	color: var(--tp-primary);
	font-size: 13px;
	font-weight: 600;
	border-radius: 20px;
	border: 1px solid var(--tp-primary-200);
}

/* Delivery Details */
.tp-delivery-type {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px;
	background: var(--tp-primary-50);
	border-radius: 8px;
	border: 1px solid #d0e7ff;
}

.tp-delivery-icon {
	font-size: 24px;
}

.tp-delivery-label {
	font-size: 16px;
	font-weight: 600;
	color: var(--tp-gray-900);
}

.tp-delivery-details {
	display: flex;
	flex-direction: column;
	gap: 8px;
}

.tp-detail-row {
	display: flex;
	align-items: baseline;
	gap: 8px;
	font-size: 14px;
}

.tp-detail-label {
	color: var(--tp-gray-500);
	font-weight: 500;
	min-width: 80px;
}

.tp-detail-value {
	color: var(--tp-gray-800);
	font-weight: 500;
	word-break: break-word;
}

/* Confirmation Notice */
.tp-confirmation-notice {
	display: flex;
	gap: 16px;
	padding: 20px;
	background: var(--tp-primary-50);
	border: 1px solid var(--tp-primary-200);
	border-radius: 10px;
	margin-bottom: 24px;
}

.tp-notice-icon {
	font-size: 24px;
	flex-shrink: 0;
}

.tp-notice-content {
	flex: 1;
}

.tp-notice-content p {
	margin: 0 0 8px 0;
	font-size: 14px;
	color: var(--tp-gray-600);
	line-height: 1.6;
}

.tp-notice-content p:last-child {
	margin-bottom: 0;
}

/* Terms Group */
.tp-terms-group {
	margin-bottom: 0;
}

/* Loading Placeholder */
.tp-loading-placeholder {
	display: flex;
	flex-direction: column;
	gap: 12px;
	padding: 12px 0;
}

.tp-skeleton-line {
	height: 16px;
	background: linear-gradient(90deg, #f0f0f0 25%, #e0e0e0 50%, #f0f0f0 75%);
	background-size: 200% 100%;
	animation: skeleton-loading 1.5s ease-in-out infinite;
	border-radius: 4px;
}

.tp-skeleton-line:first-child {
	width: 70%;
}

.tp-skeleton-line:nth-child(2) {
	width: 50%;
}

@keyframes skeleton-loading {
	0% {
		background-position: 200% 0;
	}
	100% {
		background-position: -200% 0;
	}
}

/* Responsive Design */
@media (max-width: 1024px) {
	.tp-summary-container {
		grid-template-columns: repeat(2, 1fr);
		gap: 20px;
	}
	
	.tp-summary-card:last-child {
		grid-column: 1 / -1;
	}
}

@media (max-width: 768px) {
	.tp-summary-container {
		grid-template-columns: 1fr;
		gap: 16px;
	}
	
	.tp-summary-card:last-child {
		grid-column: auto;
	}
	
	.tp-summary-header {
		padding: 16px 20px;
	}
	
	.tp-summary-header h3 {
		font-size: 16px;
	}
	
	.tp-summary-icon {
		font-size: 20px;
	}
	
	.tp-summary-content {
		padding: 20px;
	}
	
	.tp-summary-meta {
		padding-left: 0;
		margin-top: 4px;
	}
	
	.tp-confirmation-notice {
		flex-direction: column;
		gap: 12px;
	}
}


/* ============================================
   Responsive Styles
   ============================================ */

@media (max-width: 767px) {
	.tp-modal {
		padding: 0;
	}
	
	.tp-modal-content {
		max-width: 100%;
		width: 100%;
		height: 100vh;
		max-height: 100vh;
		margin: 0;
		border-radius: 0;
	}
	
	.tp-modal-header {
		position: sticky;
		top: 0;
		background: var(--tp-white);
		z-index: 10;
		padding: 16px;
		box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
	}
	
	.tp-modal-body {
		flex: 1;
		overflow-y: auto;
		-webkit-overflow-scrolling: touch;
		padding: 16px;
		padding-bottom: calc(16px + env(safe-area-inset-bottom));
	}
	
	.tp-modal-footer {
		position: sticky;
		bottom: 0;
		background: var(--tp-white);
		z-index: 10;
		padding: 16px;
		box-shadow: 0 -2px 4px rgba(0, 0, 0, 0.1);
		padding-bottom: calc(16px + env(safe-area-inset-bottom));
	}
	
	.tp-custom-source-actions {
		justify-content: stretch;
	}
	
	.tp-btn-add-custom-source {
		width: 100%;
		justify-content: center;
	}
	
	.tp-sources-container {
		grid-template-columns: 1fr;
	}
	
	.tp-source-limit-info {
		flex-direction: column;
		gap: 12px;
		text-align: center;
	}
	
	.tp-navigation {
		flex-direction: column-reverse;
	}
	
	.tp-button {
		width: 100%;
		justify-content: center;
	}
	
	.tp-success-actions {
		flex-direction: column;
	}
}

@media (max-width: 480px) {
	.tenderpipe-wizard-wrapper {
		padding: 12px;
	}
	
	.tenderpipe-container {
		padding: 20px;
	}
	
	.tp-step-title {
		font-size: 20px;
	}
	
	.tp-step-description {
		font-size: 14px;
	}
}
@media (min-width: 1200px) {
  .ast-plain-container.ast-no-sidebar #primary {
    margin-top: 30px !important;
  }
}