/* Service Request Form Modal Styles */

.modal {
	display: none;
	position: fixed;
	z-index: 10000;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	overflow: auto;
	background-color: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(4px);
	animation: fadeIn 0.3s ease-out;
}

.modal.show {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem 1rem;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

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

.modal-content {
	background: linear-gradient(135deg, #ffffff 0%, rgba(248, 247, 255, 0.95) 100%);
	margin: auto;
	padding: 0;
	border-radius: var(--radius-3xl, 1.5rem);
	max-width: 900px;
	width: 100%;
	max-height: 90vh;
	overflow-y: auto;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25),
				0 0 0 1px rgba(197, 31, 93, 0.1);
	position: relative;
	animation: slideIn 0.3s ease-out;
}

body.dark-mode .modal-content {
	background: linear-gradient(135deg, #2d2d2d 0%, #1e1e1e 100%);
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
				0 0 0 1px rgba(197, 31, 93, 0.3);
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 2rem 2.5rem;
	border-bottom: 2px solid rgba(197, 31, 93, 0.1);
	background: linear-gradient(135deg,
		rgba(197, 31, 93, 0.05) 0%,
		rgba(138, 43, 226, 0.05) 100%);
	border-radius: var(--radius-3xl, 1.5rem) var(--radius-3xl, 1.5rem) 0 0;
}

body.dark-mode .modal-header {
	border-bottom-color: rgba(197, 31, 93, 0.3);
	background: linear-gradient(135deg,
		rgba(197, 31, 93, 0.15) 0%,
		rgba(138, 43, 226, 0.15) 100%);
}

.modal-header h2 {
	margin: 0;
	font-size: clamp(1.5rem, 3vw, 2rem);
	font-weight: var(--font-weight-black, 900);
	background: linear-gradient(135deg, #c51f5d 0%, #8a2be2 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

body.dark-mode .modal-header h2 {
	background: linear-gradient(135deg, #ff6b9d 0%, #a855f7 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.modal-close {
	background: none;
	border: none;
	font-size: 2rem;
	cursor: pointer;
	color: var(--text-secondary, #64748b);
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: all 0.3s ease;
	padding: 0;
}

.modal-close:hover {
	background: rgba(197, 31, 93, 0.1);
	color: var(--primary-color, #c51f5d);
	transform: rotate(90deg);
}

body.dark-mode .modal-close {
	color: var(--text-light-secondary, #cbd5e1);
}

body.dark-mode .modal-close:hover {
	background: rgba(197, 31, 93, 0.2);
	color: var(--primary-light, #ff6b9d);
}

.modal-close svg {
	width: 24px;
	height: 24px;
}

.service-form {
	padding: 2rem 2.5rem;
}

.form-section {
	margin-bottom: 2.5rem;
	padding-bottom: 2rem;
	border-bottom: 1px solid rgba(197, 31, 93, 0.1);
}

.form-section:last-of-type {
	border-bottom: none;
}

body.dark-mode .form-section {
	border-bottom-color: rgba(197, 31, 93, 0.2);
}

.form-section h3 {
	font-size: clamp(1.15rem, 2.5vw, 1.35rem);
	font-weight: var(--font-weight-bold, 700);
	color: var(--primary-color, #c51f5d);
	margin: 0 0 1.5rem 0;
	padding-bottom: 0.5rem;
	border-bottom: 2px solid rgba(197, 31, 93, 0.2);
	display: inline-block;
}

body.dark-mode .form-section h3 {
	color: var(--primary-light, #ff6b9d);
	border-bottom-color: rgba(197, 31, 93, 0.3);
}

.form-row {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 1.5rem;
	margin-bottom: 1.5rem;
}

.form-row:last-child {
	margin-bottom: 0;
}

.form-group {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.form-group.full-width {
	grid-column: 1 / -1;
}

.form-group label {
	font-size: 0.95rem;
	font-weight: var(--font-weight-semibold, 600);
	color: var(--text-primary, #1e293b);
}

body.dark-mode .form-group label {
	color: var(--text-light, #f5f5f5);
}

.form-group input,
.form-group select,
.form-group textarea {
	padding: 0.75rem 1rem;
	font-size: 1rem;
	font-family: inherit;
	border: 2px solid rgba(197, 31, 93, 0.2);
	border-radius: var(--radius-lg, 0.75rem);
	background: #ffffff;
	color: var(--text-primary, #1e293b);
	transition: all 0.3s ease;
}

body.dark-mode .form-group input,
body.dark-mode .form-group select,
body.dark-mode .form-group textarea {
	background: #1a1a1a;
	color: var(--text-light, #f5f5f5);
	border-color: rgba(197, 31, 93, 0.3);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
	outline: none;
	border-color: var(--primary-color, #c51f5d);
	box-shadow: 0 0 0 3px rgba(197, 31, 93, 0.1);
}

body.dark-mode .form-group input:focus,
body.dark-mode .form-group select:focus,
body.dark-mode .form-group textarea:focus {
	border-color: var(--primary-light, #ff6b9d);
	box-shadow: 0 0 0 3px rgba(197, 31, 93, 0.2);
}

.form-group input:invalid:not(:placeholder-shown),
.form-group select:invalid:not(:placeholder-shown),
.form-group textarea:invalid:not(:placeholder-shown) {
	border-color: #dc2626;
}

.form-group input[type="date"] {
	cursor: pointer;
}

.form-group textarea {
	resize: vertical;
	min-height: 120px;
}

.form-actions {
	display: flex;
	justify-content: flex-end;
	gap: 1rem;
	padding-top: 1.5rem;
	margin-top: 1.5rem;
	border-top: 2px solid rgba(197, 31, 93, 0.1);
}

body.dark-mode .form-actions {
	border-top-color: rgba(197, 31, 93, 0.2);
}

.btn-primary,
.btn-secondary {
	padding: 0.875rem 2rem;
	font-size: 1.05rem;
	font-weight: var(--font-weight-bold, 700);
	font-family: inherit;
	border: none;
	border-radius: var(--radius-full, 9999px);
	cursor: pointer;
	transition: all 0.3s ease;
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
}

.btn-primary {
	background: linear-gradient(135deg, #c51f5d 0%, #8a2be2 100%);
	color: #ffffff;
	box-shadow: 0 4px 12px rgba(197, 31, 93, 0.3);
}

.btn-primary:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(197, 31, 93, 0.4);
}

.btn-primary:active {
	transform: translateY(0);
}

.btn-secondary {
	background: transparent;
	color: var(--text-secondary, #64748b);
	border: 2px solid rgba(197, 31, 93, 0.2);
}

.btn-secondary:hover {
	background: rgba(197, 31, 93, 0.05);
	color: var(--primary-color, #c51f5d);
	border-color: var(--primary-color, #c51f5d);
}

body.dark-mode .btn-secondary {
	color: var(--text-light-secondary, #cbd5e1);
	border-color: rgba(197, 31, 93, 0.3);
}

body.dark-mode .btn-secondary:hover {
	background: rgba(197, 31, 93, 0.15);
	color: var(--primary-light, #ff6b9d);
	border-color: var(--primary-light, #ff6b9d);
}

/* Responsive Design */
@media (max-width: 768px) {
	.modal.show {
		padding: 1rem 0.5rem;
	}

	.modal-content {
		max-height: 95vh;
	}

	.modal-header {
		padding: 1.5rem 1.5rem;
	}

	.service-form {
		padding: 1.5rem 1.5rem;
	}

	.form-row {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.form-section {
		margin-bottom: 2rem;
		padding-bottom: 1.5rem;
	}

	.form-actions {
		flex-direction: column-reverse;
	}

	.btn-primary,
	.btn-secondary {
		width: 100%;
		justify-content: center;
	}
}

@media (max-width: 480px) {
	.modal-header h2 {
		font-size: 1.25rem;
	}

	.modal-close {
		width: 35px;
		height: 35px;
	}

	.modal-close svg {
		width: 20px;
		height: 20px;
	}
}

/* Scrollbar styling for modal */
.modal-content::-webkit-scrollbar {
	width: 8px;
}

.modal-content::-webkit-scrollbar-track {
	background: rgba(197, 31, 93, 0.05);
	border-radius: 0 var(--radius-3xl, 1.5rem) var(--radius-3xl, 1.5rem) 0;
}

.modal-content::-webkit-scrollbar-thumb {
	background: linear-gradient(135deg, #c51f5d 0%, #8a2be2 100%);
	border-radius: var(--radius-full, 9999px);
}

.modal-content::-webkit-scrollbar-thumb:hover {
	background: linear-gradient(135deg, #a01849 0%, #6b22b3 100%);
}

body.dark-mode .modal-content::-webkit-scrollbar-track {
	background: rgba(197, 31, 93, 0.1);
}

/* Loading State */
.form-loading {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 4rem 2rem;
	gap: 1.5rem;
}

.form-loading p {
	font-size: 1.1rem;
	color: var(--text-secondary, #64748b);
	font-weight: var(--font-weight-semibold, 600);
}

body.dark-mode .form-loading p {
	color: var(--text-light-secondary, #cbd5e1);
}

/* Spinner Animation */
.spinner {
	width: 48px;
	height: 48px;
	border: 4px solid rgba(197, 31, 93, 0.1);
	border-top-color: #c51f5d;
	border-radius: 50%;
	animation: spin 0.8s linear infinite;
}

body.dark-mode .spinner {
	border-color: rgba(197, 31, 93, 0.2);
	border-top-color: #ff6b9d;
}

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

/* Disabled button state */
.btn-primary:disabled,
.btn-secondary:disabled {
	opacity: 0.6;
	cursor: not-allowed;
	pointer-events: none;
}

/* Success Modal */
.success-modal {
	display: none;
	position: fixed;
	z-index: 10001;
	left: 0;
	top: 0;
	width: 100%;
	height: 100%;
	background-color: rgba(0, 0, 0, 0.6);
	backdrop-filter: blur(4px);
	animation: fadeIn 0.3s ease-out;
}

.success-modal.show {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2rem 1rem;
}

.success-modal-content {
	background: linear-gradient(135deg, #ffffff 0%, rgba(248, 247, 255, 0.95) 100%);
	padding: 3rem 2.5rem;
	border-radius: var(--radius-3xl, 1.5rem);
	max-width: 500px;
	width: 100%;
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25),
				0 0 0 1px rgba(197, 31, 93, 0.1);
	text-align: center;
	animation: successSlideIn 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

body.dark-mode .success-modal-content {
	background: linear-gradient(135deg, #2d2d2d 0%, #1e1e1e 100%);
	box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5),
				0 0 0 1px rgba(197, 31, 93, 0.3);
}

@keyframes successSlideIn {
	from {
		transform: translateY(-100px) scale(0.8);
		opacity: 0;
	}
	to {
		transform: translateY(0) scale(1);
		opacity: 1;
	}
}

.success-icon {
	width: 80px;
	height: 80px;
	margin: 0 auto 1.5rem;
	background: linear-gradient(135deg, #c51f5d 0%, #8a2be2 100%);
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
	animation: successIconPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.2s backwards;
}

body.dark-mode .success-icon {
	background: linear-gradient(135deg, #ff6b9d 0%, #a855f7 100%);
}

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

.success-icon svg {
	width: 48px;
	height: 48px;
	stroke-width: 3;
	animation: checkmark 0.6s ease-out 0.4s backwards;
}

@keyframes checkmark {
	from {
		stroke-dasharray: 100;
		stroke-dashoffset: 100;
	}
	to {
		stroke-dasharray: 100;
		stroke-dashoffset: 0;
	}
}

.success-modal-content h2 {
	font-size: clamp(1.75rem, 4vw, 2.25rem);
	font-weight: var(--font-weight-black, 900);
	background: linear-gradient(135deg, #c51f5d 0%, #8a2be2 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	margin: 0 0 1rem 0;
	animation: fadeInUp 0.5s ease-out 0.3s backwards;
}

body.dark-mode .success-modal-content h2 {
	background: linear-gradient(135deg, #ff6b9d 0%, #a855f7 100%);
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

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

.success-modal-content p {
	font-size: 1.05rem;
	color: var(--text-secondary, #64748b);
	line-height: 1.6;
	margin: 0 0 2rem 0;
	animation: fadeInUp 0.5s ease-out 0.4s backwards;
}

body.dark-mode .success-modal-content p {
	color: var(--text-light-secondary, #cbd5e1);
}

.success-btn {
	padding: 0.875rem 3rem;
	font-size: 1.05rem;
	font-weight: var(--font-weight-bold, 700);
	font-family: inherit;
	border: none;
	border-radius: var(--radius-full, 9999px);
	background: linear-gradient(135deg, #c51f5d 0%, #8a2be2 100%);
	color: #ffffff;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(197, 31, 93, 0.3);
	transition: all 0.3s ease;
	animation: fadeInUp 0.5s ease-out 0.5s backwards;
}

.success-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(197, 31, 93, 0.4);
}

.success-btn:active {
	transform: translateY(0);
}

/* Responsive for Success Modal */
@media (max-width: 480px) {
	.success-modal-content {
		padding: 2.5rem 2rem;
	}

	.success-icon {
		width: 70px;
		height: 70px;
	}

	.success-icon svg {
		width: 40px;
		height: 40px;
	}

	.success-btn {
		width: 100%;
	}
}
