/**
 * AG Translate Switcher - Frontend Styles
 *
 * Minimal, clean styling for the language switcher.
 *
 * @package AG_Translate_Switcher
 * @since 1.0.0
 */

/* ============================================
   Language Switcher Dropdown
   ============================================ */

.ag-translate-switcher-wrapper {
	display: inline-block;
	position: relative;
	width: 100%;
	max-width: 300px;
}

.ag-translate-switcher {
	width: 100%;
	padding: 10px 35px 10px 15px;
	font-size: 16px;
	line-height: 1.5;
	color: #333;
	background-color: #fff;
	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='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.3s ease;
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	min-height: 44px;
	display: block;
	box-sizing: border-box;
	position: relative;
	z-index: 1;
	pointer-events: auto !important;
}

/* Ensure selected option is visible */
.ag-translate-switcher option:checked {
	font-weight: 600;
}

.ag-translate-switcher:hover {
	border-color: #999;
}

.ag-translate-switcher:focus {
	outline: none;
	border-color: #4CAF50;
	box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.ag-translate-switcher option {
	padding: 10px;
}

/* ============================================
   PDF Helper Notification
   ============================================ */

.ag-translate-pdf-helper {
	position: fixed;
	bottom: 20px;
	right: 20px;
	background: #fff;
	border: 1px solid #ddd;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	padding: 20px;
	max-width: 320px;
	z-index: 9999;
	animation: slideInUp 0.3s ease;
}

@keyframes slideInUp {
	from {
		transform: translateY(100%);
		opacity: 0;
	}

	to {
		transform: translateY(0);
		opacity: 1;
	}
}

.ag-translate-pdf-helper-content p {
	margin: 0 0 15px;
	font-size: 14px;
	color: #333;
	line-height: 1.5;
}

.ag-translate-pdf-btn,
.ag-translate-pdf-close {
	padding: 10px 20px;
	font-size: 14px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.3s ease;
	margin-right: 10px;
}

.ag-translate-pdf-btn {
	background: #4CAF50;
	color: #fff;
}

.ag-translate-pdf-btn:hover {
	background: #45a049;
}

.ag-translate-pdf-close {
	background: #f1f1f1;
	color: #333;
}

.ag-translate-pdf-close:hover {
	background: #ddd;
}

/* ============================================
   PDF Translation Modal
   ============================================ */

.ag-translate-pdf-modal {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.6);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 10000;
	animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}

	to {
		opacity: 1;
	}
}

.ag-translate-pdf-modal-content {
	background: #fff;
	border-radius: 8px;
	padding: 30px;
	max-width: 450px;
	width: 90%;
	box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.ag-translate-pdf-modal-content h3 {
	margin: 0 0 15px;
	font-size: 24px;
	color: #333;
}

.ag-translate-pdf-modal-content p {
	margin: 0 0 20px;
	font-size: 14px;
	color: #666;
}

.ag-translate-pdf-language {
	width: 100%;
	padding: 10px;
	font-size: 16px;
	border: 1px solid #ddd;
	border-radius: 4px;
	margin-bottom: 20px;
	transition: all 0.3s ease;
}

.ag-translate-pdf-language:focus {
	outline: none;
	border-color: #4CAF50;
	box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.1);
}

.ag-translate-pdf-modal-actions {
	display: flex;
	gap: 10px;
	justify-content: flex-end;
}

.ag-translate-pdf-modal-submit,
.ag-translate-pdf-modal-cancel {
	padding: 10px 20px;
	font-size: 14px;
	border: none;
	border-radius: 4px;
	cursor: pointer;
	transition: all 0.3s ease;
}

.ag-translate-pdf-modal-submit {
	background: #4CAF50;
	color: #fff;
}

.ag-translate-pdf-modal-submit:hover {
	background: #45a049;
}

.ag-translate-pdf-modal-cancel {
	background: #f1f1f1;
	color: #333;
}

.ag-translate-pdf-modal-cancel:hover {
	background: #ddd;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 768px) {
	.ag-translate-switcher-wrapper {
		max-width: 100%;
	}

	.ag-translate-pdf-helper {
		bottom: 10px;
		right: 10px;
		left: 10px;
		max-width: none;
	}

	.ag-translate-pdf-modal-content {
		padding: 20px;
	}
}

/* ============================================
   Dark Mode Support (Optional)
   ============================================ */

@media (prefers-color-scheme: dark) {
	.ag-translate-switcher {
		color: #f0f0f0;
		background-color: #2a2a2a;
		border-color: #444;
		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='%23f0f0f0' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
	}

	.ag-translate-switcher:hover {
		border-color: #666;
	}

	.ag-translate-pdf-helper,
	.ag-translate-pdf-modal-content {
		background: #2a2a2a;
		border-color: #444;
	}

	.ag-translate-pdf-helper-content p,
	.ag-translate-pdf-modal-content h3 {
		color: #f0f0f0;
	}

	.ag-translate-pdf-modal-content p {
		color: #ccc;
	}

	.ag-translate-pdf-close,
	.ag-translate-pdf-modal-cancel {
		background: #444;
		color: #f0f0f0;
	}

	.ag-translate-pdf-close:hover,
	.ag-translate-pdf-modal-cancel:hover {
		background: #555;
	}

	.ag-translate-pdf-language {
		background: #2a2a2a;
		color: #f0f0f0;
		border-color: #444;
	}
}

/* Hello Elementor Desktop Fix */
@media screen and (min-width: 768px) {
	.ag-translate-switcher {
		font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif !important;
		color: #333 !important;
		opacity: 1 !important;
		visibility: visible !important;
		text-indent: 0 !important;
	}
}