/* Shortcode Forms - Optimized for Telegram WebApps */

.stm-shortcode-form {
	max-width: 100%;
	margin: 0 auto;
	padding: 20px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
}

.stm-form-container {
	background: #fff;
	padding: 24px;
	border-radius: 8px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
	max-width: 600px;
	margin: 0 auto;
}

.stm-form-container h2 {
	margin: 0 0 16px 0;
	font-size: 24px;
	color: #1d2327;
	font-weight: 600;
}

.stm-form-container p {
	margin: 0 0 20px 0;
	color: #646970;
	line-height: 1.6;
}

.stm-form {
	margin-top: 20px;
}

.stm-form-group {
	margin-bottom: 20px;
}

.stm-form-group label {
	display: block;
	margin-bottom: 8px;
	color: #1d2327;
	font-weight: 600;
	font-size: 14px;
}

.stm-form-group .required {
	color: #d63638;
}

.stm-form-group input[type="text"],
.stm-form-group input[type="email"],
.stm-form-group input[type="password"],
.stm-form-group input[type="number"],
.stm-form-group input[type="date"],
.stm-form-group select,
.stm-form-group textarea {
	width: 100%;
	padding: 12px;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	font-size: 16px; /* Prevents zoom on iOS */
	font-family: inherit;
	box-sizing: border-box;
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
}

.stm-form-group input:focus,
.stm-form-group select:focus,
.stm-form-group textarea:focus {
	outline: none;
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}

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

.stm-form-group select {
	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='%2323282d' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 12px;
	padding-right: 36px;
}

.stm-submit-btn {
	width: 100%;
	padding: 14px 24px;
	background: #2271b1;
	color: #fff;
	border: none;
	border-radius: 4px;
	font-size: 16px;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.2s;
	margin-top: 10px;
}

.stm-submit-btn:hover {
	background: #135e96;
}

.stm-submit-btn:active {
	background: #0a4b78;
}

.stm-submit-btn:disabled {
	background: #c3c4c7;
	cursor: not-allowed;
}

.stm-message {
	padding: 12px 16px;
	border-radius: 4px;
	margin-bottom: 20px;
	font-size: 14px;
	line-height: 1.5;
}

.stm-message-success {
	background: #00a32a;
	color: #fff;
}

.stm-message-error {
	background: #d63638;
	color: #fff;
}

.stm-error {
	color: #d63638;
	padding: 12px;
	background: #fcf0f1;
	border-left: 4px solid #d63638;
	border-radius: 4px;
}

/* Mobile/Telegram WebApp optimizations */
@media (max-width: 600px) {
	.stm-shortcode-form {
		padding: 12px;
	}
	
	.stm-form-container {
		padding: 16px;
		border-radius: 0;
		box-shadow: none;
	}
	
	.stm-form-container h2 {
		font-size: 20px;
	}
}

/* Dark mode support for Telegram */
@media (prefers-color-scheme: dark) {
	.stm-form-container {
		background: #1e1e1e;
		color: #e0e0e0;
	}
	
	.stm-form-container h2 {
		color: #e0e0e0;
	}
	
	.stm-form-container p {
		color: #b0b0b0;
	}
	
	.stm-form-group label {
		color: #e0e0e0;
	}
	
	.stm-form-group input[type="text"],
	.stm-form-group input[type="email"],
	.stm-form-group input[type="password"],
	.stm-form-group input[type="number"],
	.stm-form-group input[type="date"],
	.stm-form-group select,
	.stm-form-group textarea {
		background: #2d2d2d;
		border-color: #555;
		color: #e0e0e0;
	}
	
	.stm-form-group input:focus,
	.stm-form-group select:focus,
	.stm-form-group textarea:focus {
		border-color: #2271b1;
	}
}

