/**
 * Frontend styles for Telegram Contact Form
 */

.tcf-form-container {
	max-width: 600px;
	margin: 0 auto;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

/* Status Message */
.tcf-status-message {
	padding: 16px 20px;
	margin-bottom: 24px;
	border-radius: 12px;
	font-size: 14px;
	font-weight: 500;
	text-align: center;
	animation: tcfSlideDown 0.3s ease;
}

.tcf-status-message.tcf-success {
	background-color: #d1fae5;
	color: #065f46;
	border: 1px solid #6ee7b7;
}

.tcf-status-message.tcf-error {
	background-color: #fee2e2;
	color: #991b1b;
	border: 1px solid #fca5a5;
}

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

/* Form Base Styles */
.tcf-form {
	background: #ffffff;
	border-radius: 16px;
	padding: 40px;
	box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

.tcf-form-header {
	margin-bottom: 32px;
	text-align: center;
}

.tcf-form-title {
	margin: 0 0 8px 0;
	font-size: 28px;
	font-weight: 700;
	color: #1f2937;
}

.tcf-form-subtitle {
	margin: 0;
	font-size: 15px;
	color: #6b7280;
	line-height: 1.5;
}

/* Form Group */
.tcf-form-group {
	margin-bottom: 24px;
}

.tcf-label {
	display: block;
	margin-bottom: 8px;
	font-size: 14px;
	font-weight: 600;
	color: #374151;
	text-transform: uppercase;
	letter-spacing: 0.5px;
	font-size: 11px;
}

.tcf-required {
	color: #ef4444;
	margin-left: 2px;
}

/* Input Fields */
.tcf-input,
.tcf-textarea {
	width: 100%;
	padding: 14px 18px;
	font-size: 15px;
	color: #1f2937;
	background: #f9fafb;
	border: 2px solid transparent;
	border-radius: 10px;
	transition: all 0.3s ease;
	font-family: inherit;
	box-sizing: border-box;
}

.tcf-input:focus,
.tcf-textarea:focus {
	background: #ffffff;
	border-color: #667eea;
	outline: none;
	box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.tcf-textarea {
	resize: vertical;
	min-height: 120px;
	line-height: 1.6;
}

/* Submit Button */
.tcf-submit-btn {
	width: 100%;
	padding: 16px 32px;
	font-size: 16px;
	font-weight: 700;
	color: #ffffff;
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	border: none;
	border-radius: 10px;
	cursor: pointer;
	transition: all 0.3s ease;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	font-family: inherit;
}

.tcf-submit-btn:hover:not(:disabled) {
	background: linear-gradient(135deg, #5568d3 0%, #6a3f8f 100%);
	box-shadow: 0 6px 16px rgba(102, 126, 234, 0.5);
	transform: translateY(-2px);
}

.tcf-submit-btn:active:not(:disabled) {
	transform: translateY(0);
}

.tcf-submit-btn:disabled {
	opacity: 0.7;
	cursor: not-allowed;
}

/* Spinner */
.tcf-spinner {
	width: 20px;
	height: 20px;
	animation: tcfSpin 0.8s linear infinite;
}

.tcf-spinner-circle {
	fill: none;
	stroke: #ffffff;
	stroke-linecap: round;
	stroke-dasharray: 50;
	stroke-dashoffset: 0;
	animation: tcfDash 1.5s ease-in-out infinite;
}

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

@keyframes tcfDash {
	0% {
		stroke-dasharray: 1, 150;
		stroke-dashoffset: 0;
	}
	50% {
		stroke-dasharray: 90, 150;
		stroke-dashoffset: -35;
	}
	100% {
		stroke-dasharray: 90, 150;
		stroke-dashoffset: -124;
	}
}

/* ===========================
   STYLE VARIANTS
   =========================== */

/* Minimal Style (Default) */
.tcf-style-minimal {
	background: transparent;
	box-shadow: none;
	border: 1px solid #e5e7eb;
}

.tcf-style-minimal .tcf-form-title {
	font-size: 24px;
}

.tcf-style-minimal .tcf-input,
.tcf-style-minimal .tcf-textarea {
	background: #ffffff;
	border: 1px solid #d1d5db;
}

.tcf-style-minimal .tcf-input:focus,
.tcf-style-minimal .tcf-textarea:focus {
	border-color: #667eea;
	box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.08);
}

/* Modern Style */
.tcf-style-modern {
	background: linear-gradient(135deg, #f9fafb 0%, #ffffff 100%);
	border: 2px solid #e5e7eb;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}

.tcf-style-modern .tcf-form-header {
	background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
	margin: -40px -40px 32px -40px;
	padding: 32px 40px;
	border-radius: 14px 14px 0 0;
}

.tcf-style-modern .tcf-form-title,
.tcf-style-modern .tcf-form-subtitle {
	color: #ffffff;
}

.tcf-style-modern .tcf-input,
.tcf-style-modern .tcf-textarea {
	background: #ffffff;
	border: 2px solid #e5e7eb;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.tcf-style-modern .tcf-input:focus,
.tcf-style-modern .tcf-textarea:focus {
	border-color: #667eea;
	box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

/* Dark Style */
.tcf-style-dark {
	background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
	border: 1px solid #374151;
}

.tcf-style-dark .tcf-form-title {
	color: #ffffff;
}

.tcf-style-dark .tcf-form-subtitle {
	color: #9ca3af;
}

.tcf-style-dark .tcf-label {
	color: #d1d5db;
}

.tcf-style-dark .tcf-input,
.tcf-style-dark .tcf-textarea {
	background: #374151;
	border: 1px solid #4b5563;
	color: #ffffff;
}

.tcf-style-dark .tcf-input::placeholder,
.tcf-style-dark .tcf-textarea::placeholder {
	color: #6b7280;
}

.tcf-style-dark .tcf-input:focus,
.tcf-style-dark .tcf-textarea:focus {
	background: #4b5563;
	border-color: #818cf8;
	box-shadow: 0 0 0 4px rgba(129, 140, 248, 0.2);
}

.tcf-style-dark .tcf-submit-btn {
	background: linear-gradient(135deg, #818cf8 0%, #a78bfa 100%);
	box-shadow: 0 4px 12px rgba(129, 140, 248, 0.5);
}

.tcf-style-dark .tcf-submit-btn:hover:not(:disabled) {
	background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
	box-shadow: 0 6px 16px rgba(129, 140, 248, 0.6);
}

/* Responsive */
@media screen and (max-width: 640px) {
	.tcf-form {
		padding: 24px;
		border-radius: 12px;
	}

	.tcf-form-title {
		font-size: 22px;
	}

	.tcf-form-subtitle {
		font-size: 14px;
	}

	.tcf-style-modern .tcf-form-header {
		margin: -24px -24px 24px -24px;
		padding: 24px;
	}

	.tcf-input,
	.tcf-textarea {
		padding: 12px 16px;
		font-size: 14px;
	}

	.tcf-submit-btn {
		padding: 14px 24px;
		font-size: 15px;
	}
}
