/**
 * Get Proposal Flow Modal
 * Fullscreen modal with AI conversation for partner-specific proposals
 * Matches Get Matched Flow interface
 */

/* Reduce vertical gap between form fields in proposal modal */
.get-proposal-modal .get-matched-form__field {
	margin-bottom: 12px;
}

/* Modal Container */
.get-proposal-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	z-index: 99999;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity 0.3s ease, visibility 0.3s ease;
	display: none;
}

.get-proposal-modal.is-open {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
	display: block;
}

/* Overlay */
.get-proposal-modal__overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.5);
	backdrop-filter: blur(4px);
	z-index: 1;
	display: none;
}

.get-proposal-modal.is-open .get-proposal-modal__overlay {
	display: block;
}

/* Main Container */
.get-proposal-modal__container {
	position: relative;
	width: 100%;
	height: 100%;
	background: #ffffff;
	display: none;
	flex-direction: column;
	max-height: 100vh;
	z-index: 2;
}

.get-proposal-modal.is-open .get-proposal-modal__container {
	display: flex;
}

/* Header */
.get-proposal-modal__header {
	display: flex;
	flex-direction: column;
	background: rgba(255, 255, 255, 0.2);
	backdrop-filter: blur(10px);
}

.get-proposal-modal__header-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0 50px;
	height: 80px;
}

.get-proposal-modal__header-right {
	display: flex;
	align-items: center;
	gap: 20px;
}

.get-proposal-modal__partner-info {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 16px;
	font-family: 'TWK Everett', 'Inter', sans-serif;
}

.get-proposal-modal__partner-logo {
	width: 40px;
	height: 40px;
	object-fit: contain;
	border-radius: 12px;
	border: 1px solid rgba(17, 17, 17, 0.15);
}

.get-proposal-modal__partner-name {
	font-weight: 500;
	color: #000000;
}

.get-proposal-modal__close {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	background: transparent;
	color: #656672;
	cursor: pointer;
	border-radius: 12px;
	transition: all 0.2s;
	padding: 12px;
}

.get-proposal-modal__close:hover {
	background: rgba(0, 0, 0, 0.05);
}

.get-proposal-modal__close svg {
	width: 14px;
	height: 14px;
}

/* Progress Bar */
.get-proposal-modal__progress-bar {
	width: 100%;
	height: 12px;
	background: #e4e4e7;
	position: relative;
	overflow: hidden;
}

.get-proposal-modal__progress-fill {
	height: 100%;
	background: linear-gradient(90deg, #06b6d4 0%, #a855f7 100%);
	border-radius: 9999px;
	transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
	position: relative;
}

/* Content Area */
.get-proposal-modal__content {
	flex: 1;
	overflow-y: auto;
	overflow-x: hidden;
	padding: 100px 50px 60px 50px;
	background: #ffffff;
	-webkit-overflow-scrolling: touch;
	min-height: 0;
	position: relative;
	overscroll-behavior: contain;
	outline: none;
	cursor: default;
	touch-action: pan-y;
	scroll-behavior: smooth;
}

/* Scrollbar styling */
.get-proposal-modal__content::-webkit-scrollbar {
	width: 8px;
}

.get-proposal-modal__content::-webkit-scrollbar-track {
	background: #f1f5f9;
}

.get-proposal-modal__content::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 4px;
}

.get-proposal-modal__content::-webkit-scrollbar-thumb:hover {
	background: #94a3b8;
}

/* Actions */
.get-proposal-modal__actions {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 24px 40px;
	border-top: 1px solid #e2e8f0;
	background: #ffffff;
}

.get-proposal-modal__actions-left {
	display: flex;
	align-items: center;
}

.get-proposal-modal__powered-by {
	display: flex;
	align-items: center;
	gap: 8px;
}

.get-proposal-modal__powered-by img {
	width: 123px;
	height: 40px;
}

.get-proposal-modal__actions-right {
	display: flex;
	align-items: center;
	gap: 12px;
}

/* Introduction Section (Special Treatment - not AI chat style) */
.get-proposal-introduction {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 60px 40px;
	max-width: 780px;
	margin: 0 auto;
	text-align: center;
}

.get-proposal-introduction__partner-logo {
	width: 120px;
	height: 120px;
	margin-bottom: 24px;
	border-radius: 16px;
	border: 1px solid rgba(17, 17, 17, 0.1);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: #ffffff;
}

.get-proposal-introduction__partner-logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.get-proposal-introduction__icon {
	width: 80px;
	height: 80px;
	margin-bottom: 36px;
}

.get-proposal-introduction__icon img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.get-proposal-introduction__title {
	font-family: 'TWK Everett', 'Inter', sans-serif;
	font-size: 36px;
	font-weight: 500;
	line-height: normal;
	color: #000000;
	margin: 0 0 36px 0;
	max-width: 580px;
}

.get-proposal-introduction__description {
	font-family: 'DM Sans', 'Inter', sans-serif;
	font-size: 20px;
	font-weight: 300;
	line-height: normal;
	color: #656672;
	margin: 0;
}

/* AI Conversation UI Styles */
.get-proposal-ai-welcome {
	display: flex;
	flex-direction: column;
	align-items: center;
	padding: 60px 40px;
	max-width: 600px;
	margin: 0 auto;
}

.get-proposal-ai-welcome .get-proposal-ai-avatar {
	margin-bottom: 24px;
}

.get-proposal-ai-message {
	text-align: center;
	margin-bottom: 32px;
}

.get-proposal-ai-message p {
	margin: 0 0 12px 0;
	font-size: 16px;
	line-height: 1.6;
	color: #1e293b;
}

.get-proposal-ai-message p:last-child {
	margin-bottom: 0;
}

/* Conversation Container */
.get-proposal-conversation {
	display: flex;
	flex-direction: column;
	gap: 16px;
	padding: 32px 24px;
	max-width: 800px;
	margin: 0 auto;
	min-height: 400px;
	max-height: calc(100vh - 200px);
	overflow-y: auto;
}

/* Message Styles */
.get-proposal-message {
	display: flex;
	gap: 12px;
	animation: messageSlideIn 0.3s ease-out;
}

@keyframes messageSlideIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Assistant Messages */
.get-proposal-message--assistant {
	align-items: flex-start;
}

.get-proposal-ai-avatar {
	flex-shrink: 0;
}

.get-proposal-message--assistant .get-proposal-message-content {
	background: #f8fafc;
	border: 1px solid #e2e8f0;
	padding: 14px 18px;
	border-radius: 16px;
	border-top-left-radius: 4px;
	max-width: 70%;
	font-size: 15px;
	line-height: 1.6;
	color: #1e293b;
}

/* User Messages */
.get-proposal-message--user {
	justify-content: flex-end;
}

.get-proposal-message--user .get-proposal-message-content {
	background: #a02deb;
	color: white;
	padding: 14px 18px;
	border-radius: 16px;
	border-top-right-radius: 4px;
	max-width: 70%;
	font-size: 15px;
	line-height: 1.6;
}

/* Typing Indicator */
.get-proposal-typing .get-proposal-message-content {
	display: flex;
	gap: 6px;
	padding: 14px 18px;
}

.typing-dot {
	width: 8px;
	height: 8px;
	background: #94a3b8;
	border-radius: 50%;
	animation: typingDot 1.4s infinite;
}

.typing-dot:nth-child(2) {
	animation-delay: 0.2s;
}

.typing-dot:nth-child(3) {
	animation-delay: 0.4s;
}

@keyframes typingDot {
	0%, 60%, 100% {
		opacity: 0.3;
		transform: translateY(0);
	}
	30% {
		opacity: 1;
		transform: translateY(-4px);
	}
}

/* Input Container */
.get-proposal-input-container {
	margin-top: 8px;
	animation: messageSlideIn 0.3s ease-out;
}

/* Text Input */
.get-proposal-textarea {
	width: 100%;
	padding: 16px;
	border: 2px solid #e2e8f0;
	border-radius: 12px;
	font-size: 16px;
	font-family: inherit;
	resize: vertical;
	transition: all 0.2s;
	background: white;
	min-height: 80px;
}

.get-proposal-textarea:focus {
	outline: none;
	border-color: #a02deb;
	box-shadow: 0 0 0 4px rgba(160, 45, 235, 0.1);
}

.get-proposal-textarea::placeholder {
	color: #94a3b8;
}

.get-proposal-input {
	width: 100%;
	padding: 16px 20px;
	border: 2px solid #e2e8f0;
	border-radius: 12px;
	font-size: 16px;
	font-family: inherit;
	transition: all 0.2s;
	background: white;
	margin-bottom: 16px;
}

.get-proposal-input:focus {
	outline: none;
	border-color: #a02deb;
	box-shadow: 0 0 0 4px rgba(160, 45, 235, 0.1);
}

.get-proposal-input::placeholder {
	color: #94a3b8;
}

/* Choice-based questions (radio/checkbox) */
.get-proposal-choices {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 24px;
}

.get-proposal-choice {
	display: flex;
	align-items: center;
	padding: 16px 20px;
	background: white;
	border: 2px solid #e2e8f0;
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.2s;
	position: relative;
}

.get-proposal-choice:hover {
	border-color: #cbd5e1;
	background: #f8fafc;
}

.get-proposal-choice input[type="radio"],
.get-proposal-choice input[type="checkbox"] {
	width: 20px;
	height: 20px;
	margin: 0;
	cursor: pointer;
	accent-color: #a02deb;
}

.get-proposal-choice input[type="radio"]:checked ~ .get-proposal-choice__label,
.get-proposal-choice input[type="checkbox"]:checked ~ .get-proposal-choice__label {
	font-weight: 600;
	color: #a02deb;
}

.get-proposal-choice:has(input:checked) {
	border-color: #a02deb;
	background: rgba(160, 45, 235, 0.05);
}

.get-proposal-choice__label {
	flex: 1;
	margin-left: 12px;
	font-size: 16px;
	color: #1e293b;
	cursor: pointer;
	transition: all 0.2s;
}

/* Buttons */
.get-proposal-button {
	padding: 14px 32px;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s;
	border: none;
	background: #1a1a2e;
	color: white;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.get-proposal-button:hover {
	background: #2d2d44;
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.get-proposal-button:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	pointer-events: none;
}

.get-proposal-button--secondary {
	background: #ffffff;
	color: #6366f1;
	border: 2px solid #e0e7ff;
	box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.get-proposal-button--secondary:hover {
	background: #eff6ff;
	border-color: #c7d2fe;
	transform: translateY(-1px);
	box-shadow: 0 2px 4px rgba(99, 102, 241, 0.1);
}

/* Loading State */
.get-proposal-loading {
	text-align: center;
	padding: 60px 20px;
}

.get-proposal-loading__spinner {
	width: 60px;
	height: 60px;
	margin: 0 auto 24px;
	border: 4px solid #e2e8f0;
	border-top-color: #a02deb;
	border-radius: 50%;
	animation: spin 1s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.get-proposal-loading p {
	font-size: 16px;
	color: #64748b;
}

/* Error State */
.get-proposal-error {
	padding: 20px;
	background: #fef2f2;
	border: 2px solid #fecaca;
	border-radius: 12px;
	margin-top: 16px;
	color: #991b1b;
	font-size: 15px;
	line-height: 1.6;
	text-align: center;
}

/* Success State */
.get-proposal-success {
	text-align: center;
	padding: 80px 40px;
	max-width: 600px;
	margin: 0 auto;
}

.get-proposal-success__icon {
	width: 80px;
	height: 80px;
	margin: 0 auto 32px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
	border-radius: 20px;
	color: #059669;
}

.get-proposal-success__icon svg {
	width: 48px;
	height: 48px;
}

.get-proposal-success__title {
	font-size: 32px;
	font-weight: 700;
	color: #1a1a2e;
	margin-bottom: 16px;
	line-height: 1.3;
}

.get-proposal-success__message {
	font-size: 16px;
	color: #64748b;
	line-height: 1.6;
	margin-bottom: 32px;
}

/* Summary View - Reuse Get Matched styles */
.get-proposal-brief--two-column {
	display: grid;
	grid-template-columns: 480px 1fr;
	gap: 20px;
	padding: 60px 50px;
	background: white;
	border-radius: 28px;
	max-width: 1180px;
	margin: 0 auto;
	box-sizing: border-box;
	overflow-y: auto;
	max-height: 100%;
	-webkit-overflow-scrolling: touch;
	scroll-behavior: smooth;
}

.get-proposal-brief--two-column::-webkit-scrollbar {
	width: 8px;
}

.get-proposal-brief--two-column::-webkit-scrollbar-track {
	background: #f1f5f9;
	border-radius: 4px;
}

.get-proposal-brief--two-column::-webkit-scrollbar-thumb {
	background: #cbd5e1;
	border-radius: 4px;
}

.get-proposal-brief--two-column::-webkit-scrollbar-thumb:hover {
	background: #94a3b8;
}

.get-proposal-brief__left {
	padding: 0 36px 0 0;
	display: flex;
	flex-direction: column;
	gap: 24px;
	height: fit-content;
}

.get-proposal-brief__badge {
	display: inline-block;
	background: #f4f4f5;
	color: #1c1c1b;
	font-size: 12px;
	font-weight: 700;
	text-transform: uppercase;
	padding: 4px 12px;
	border-radius: 9999px;
	width: fit-content;
	letter-spacing: 0.5px;
}

.get-proposal-brief__main-title {
	font-size: 36px;
	font-weight: 500;
	color: #000000;
	line-height: 1.2;
	margin: 0;
}

.get-proposal-brief__steps {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.get-proposal-brief__step-item {
	display: flex;
	align-items: flex-start;
	gap: 12px;
	font-size: 20px;
	font-weight: 300;
	color: #000000;
	line-height: 1.5;
}

.get-proposal-brief__step-item svg {
	flex-shrink: 0;
	width: 24px;
	height: 24px;
	margin-top: 2px;
	stroke: #000000;
}

.get-proposal-brief__info-box {
	background: #fcfaf7;
	border: 1px solid rgba(17, 17, 17, 0.15);
	border-radius: 28px;
	padding: 36px;
	margin-top: auto;
}

.get-proposal-brief__info-box p {
	font-size: 20px;
	font-weight: 300;
	color: #191a23;
	line-height: 1.5;
	margin: 0;
}

.get-proposal-brief__right {
	border-left: 1px solid rgba(17, 17, 17, 0.15);
	padding: 0 0 0 36px;
	display: flex;
	flex-direction: column;
	gap: 24px;
}

.get-proposal-brief__content-section {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.get-proposal-brief__section-title {
	font-size: 20px;
	font-weight: 500;
	color: #191a23;
	margin: 0;
}

.get-proposal-brief__content-box {
	background: white;
	border: 1px solid rgba(17, 17, 17, 0.15);
	border-radius: 28px;
	padding: 36px;
}

.get-proposal-brief__content-box p {
	font-size: 16px;
	font-weight: 400;
	color: #191a23;
	line-height: 1.5;
	margin: 0;
}

.get-proposal-brief__content-box ul {
	margin: 0;
	padding-left: 20px;
	list-style: disc;
}

.get-proposal-brief__content-box li {
	font-size: 16px;
	font-weight: 400;
	color: #191a23;
	line-height: 1.6;
	margin-bottom: 8px;
}

.get-proposal-brief__content-box li:last-child {
	margin-bottom: 0;
}

/* Form Fields in Summary */
.get-proposal-form__field {
	margin-bottom: 20px;
}

.get-proposal-form__field label {
	display: block;
	font-size: 15px;
	font-weight: 600;
	color: #334155;
	margin-bottom: 8px;
}

.get-proposal-form__error {
	color: #ef4444;
	font-size: 13px;
	margin-top: 6px;
	min-height: 18px;
	font-weight: 500;
}

.get-proposal-input.has-error {
	border-color: #ef4444;
	background: #fef2f2;
}

.get-proposal-input.has-error:focus {
	border-color: #ef4444;
	box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.get-proposal-checkbox {
	display: flex;
	align-items: center;
	gap: 12px;
	cursor: pointer;
	font-size: 14px;
	color: #64748b;
}

.get-proposal-checkbox input[type="checkbox"] {
	width: 20px;
	height: 20px;
	cursor: pointer;
}

/* Responsive */
@media (max-width: 1024px) {
	.get-proposal-modal__content {
		padding: 60px 28px 40px 28px !important;
	}

	.get-proposal-brief--two-column {
		padding: 40px 32px;
		grid-template-columns: 1fr;
		gap: 0;
	}

	.get-proposal-brief__left {
		padding: 0 0 24px 0;
		border-bottom: 1px solid rgba(17, 17, 17, 0.15);
	}

	.get-proposal-brief__right {
		border-left: none;
		padding: 24px 0 0 0;
	}
}

@media (max-width: 768px) {
	.get-proposal-modal__header-top {
		padding-left: 20px !important;
		padding-right: 20px !important;
		height: 64px;
	}

	.get-proposal-modal__branding {
		font-size: 16px;
	}

	.get-proposal-modal__header-right {
		gap: 12px;
	}

	.get-proposal-modal__partner-logo {
		width: 28px;
		height: 28px;
	}

	.get-proposal-modal__partner-name {
		font-size: 13px;
	}

	.get-proposal-modal__close {
		width: 36px;
		height: 36px;
	}

	.get-proposal-modal__progress-bar {
		height: 10px;
	}

	.get-proposal-modal__content {
		padding: 48px 20px 32px 20px !important;
	}

	.get-proposal-modal__actions {
		padding-left: 20px !important;
		padding-right: 20px !important;
	}

	.get-proposal-conversation {
		padding: 24px 16px;
		max-height: calc(100vh - 150px);
	}

	.get-proposal-ai-welcome {
		padding: 40px 20px;
	}

	.get-proposal-message--assistant .get-proposal-message-content,
	.get-proposal-message--user .get-proposal-message-content {
		max-width: 85%;
		font-size: 14px;
	}

	.get-proposal-brief--two-column {
		grid-template-columns: 1fr;
		max-width: 100%;
		padding: 48px 32px;
		gap: 0;
	}

	.get-proposal-brief__left {
		padding: 0 0 32px 0;
		border-bottom: 1px solid rgba(17, 17, 17, 0.15);
	}

	.get-proposal-brief__right {
		border-left: none;
		padding: 32px 0 0 0;
	}
}

@media (max-width: 640px) {
	.get-proposal-modal__content {
		padding: 32px 16px 24px 16px !important;
	}

	.get-proposal-brief--two-column {
		padding: 28px 20px;
		border-radius: 12px;
	}

	.get-proposal-modal__header-top {
		padding-left: 16px !important;
		padding-right: 16px !important;
		height: 56px;
	}

	.get-proposal-modal__branding {
		font-size: 15px;
	}

	.get-proposal-modal__header-right {
		gap: 10px;
	}

	.get-proposal-modal__partner-info {
		gap: 8px;
		font-size: 13px;
	}

	.get-proposal-modal__close {
		width: 32px;
		height: 32px;
	}

	.get-proposal-modal__close svg {
		width: 12px;
		height: 12px;
	}

	.get-proposal-modal__progress-bar {
		height: 8px;
	}

	.get-proposal-modal__actions {
		padding: 12px 16px;
	}

	.get-proposal-button {
		padding: 12px 24px;
		font-size: 14px;
	}
}

@media (max-width: 480px) {
	.get-proposal-modal__content {
		padding: 24px 12px 20px 12px !important;
	}

	.get-proposal-brief--two-column {
		padding: 24px 16px;
		border-radius: 8px;
	}

	.get-proposal-modal__header-top {
		padding-left: 12px !important;
		padding-right: 12px !important;
		height: 52px;
	}

	.get-proposal-modal__branding {
		font-size: 14px;
	}

	.get-proposal-modal__header-right {
		gap: 8px;
	}

	.get-proposal-modal__close {
		width: 30px;
		height: 30px;
	}

	.get-proposal-modal__close svg {
		width: 11px;
		height: 11px;
	}

	.get-proposal-modal__progress-bar {
		height: 6px;
	}

	.get-proposal-modal__actions {
		padding: 10px 12px;
	}
}

/* Footer Button Styles (matching Get Matched) */
.get-matched-modal__next {
	padding: 14px 32px;
	border-radius: 8px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s;
	border: none;
	background: #000000;
	color: white;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.get-matched-modal__next:hover:not(:disabled) {
	background: #333333;
	transform: translateY(-1px);
	box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.get-matched-modal__next:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	background: #cccccc;
}
