/**
 * Adeptwiz WP Translate Frontend Stylesheet
 */

/* Container */
.adeptwiz-translate-container {
	display: inline-block;
	font-family: inherit;
	font-size: 14px;
	line-height: 1.4;
	vertical-align: middle;
	box-sizing: border-box;
}

.adeptwiz-translate-container * {
	box-sizing: border-box;
}

.adeptwiz-hidden {
	display: none !important;
}

/* Flag Icons */
.adeptwiz-flag-icon {
	display: inline-block;
	width: 24px;
	height: 18px;
	border-radius: 3px;
	background-size: cover;
	background-position: center;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
	flex-shrink: 0;
	background-color: #e2e8f0;
	vertical-align: middle;
}

.adeptwiz-flag-us { background-image: url('https://flagcdn.com/w40/us.png'); }
.adeptwiz-flag-gb { background-image: url('https://flagcdn.com/w40/gb.png'); }
.adeptwiz-flag-es { background-image: url('https://flagcdn.com/w40/es.png'); }
.adeptwiz-flag-fr { background-image: url('https://flagcdn.com/w40/fr.png'); }
.adeptwiz-flag-de { background-image: url('https://flagcdn.com/w40/de.png'); }
.adeptwiz-flag-it { background-image: url('https://flagcdn.com/w40/it.png'); }
.adeptwiz-flag-pt { background-image: url('https://flagcdn.com/w40/pt.png'); }
.adeptwiz-flag-br { background-image: url('https://flagcdn.com/w40/br.png'); }
.adeptwiz-flag-ru { background-image: url('https://flagcdn.com/w40/ru.png'); }
.adeptwiz-flag-cn { background-image: url('https://flagcdn.com/w40/cn.png'); }
.adeptwiz-flag-tw { background-image: url('https://flagcdn.com/w40/tw.png'); }
.adeptwiz-flag-jp { background-image: url('https://flagcdn.com/w40/jp.png'); }
.adeptwiz-flag-kr { background-image: url('https://flagcdn.com/w40/kr.png'); }
.adeptwiz-flag-sa { background-image: url('https://flagcdn.com/w40/sa.png'); }
.adeptwiz-flag-in { background-image: url('https://flagcdn.com/w40/in.png'); }
.adeptwiz-flag-nl { background-image: url('https://flagcdn.com/w40/nl.png'); }
.adeptwiz-flag-tr { background-image: url('https://flagcdn.com/w40/tr.png'); }
.adeptwiz-flag-pl { background-image: url('https://flagcdn.com/w40/pl.png'); }
.adeptwiz-flag-vn { background-image: url('https://flagcdn.com/w40/vn.png'); }
.adeptwiz-flag-th { background-image: url('https://flagcdn.com/w40/th.png'); }
.adeptwiz-flag-id { background-image: url('https://flagcdn.com/w40/id.png'); }
.adeptwiz-flag-ua { background-image: url('https://flagcdn.com/w40/ua.png'); }
.adeptwiz-flag-mx { background-image: url('https://flagcdn.com/w40/mx.png'); }
.adeptwiz-flag-ca { background-image: url('https://flagcdn.com/w40/ca.png'); }
.adeptwiz-flag-au { background-image: url('https://flagcdn.com/w40/au.png'); }

/* Circle & Styles */
.adeptwiz-flag-style-circle24 .adeptwiz-flag-icon { width: 24px; height: 24px; border-radius: 50%; }
.adeptwiz-flag-style-circle32 .adeptwiz-flag-icon { width: 32px; height: 32px; border-radius: 50%; }
.adeptwiz-flag-style-circle48 .adeptwiz-flag-icon { width: 48px; height: 48px; border-radius: 50%; }

/* Custom Flags Dropdown */
.adeptwiz-custom-dropdown {
	position: relative;
	display: inline-block;
}

.adeptwiz-dropdown-trigger {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 14px;
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font-weight: 600;
	color: #1e293b;
	cursor: pointer;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.04);
	transition: all 0.2s ease;
}

.adeptwiz-dropdown-trigger:hover {
	border-color: #94a3b8;
	background: #f8fafc;
}

.adeptwiz-dropdown-arrow {
	font-size: 10px;
	color: #64748b;
	transition: transform 0.2s ease;
}

.adeptwiz-custom-dropdown.is-open .adeptwiz-dropdown-arrow {
	transform: rotate(180deg);
}

.adeptwiz-dropdown-menu {
	position: absolute;
	left: 0;
	z-index: 999999;
	min-width: 170px;
	max-height: 280px;
	overflow-y: auto;
	background: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 8px;
	box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
	padding: 6px 0;
	margin-top: 4px;
}

/* Open Direction Up */
.adeptwiz-dir-up .adeptwiz-dropdown-menu {
	bottom: 100%;
	top: auto;
	margin-bottom: 6px;
	margin-top: 0;
}

.adeptwiz-dropdown-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 14px;
	color: #334155;
	text-decoration: none;
	font-size: 13px;
	font-weight: 500;
	transition: background 0.15s ease;
}

.adeptwiz-dropdown-item:hover {
	background: #f1f5f9;
	color: #4f46e5;
}

/* Flags Row */
.adeptwiz-flags-row {
	display: flex;
	gap: 8px;
	align-items: center;
	flex-wrap: wrap;
}

.adeptwiz-flag-link {
	display: inline-block;
	transition: transform 0.2s ease;
}

.adeptwiz-flag-link:hover {
	transform: scale(1.15);
}

/* Flags List */
.adeptwiz-flags-list {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.adeptwiz-flag-item-link {
	display: flex;
	align-items: center;
	gap: 8px;
	text-decoration: none;
	color: #334155;
	font-weight: 500;
	font-size: 13px;
}

.adeptwiz-flag-item-link:hover {
	color: #4f46e5;
}

/* Text List */
.adeptwiz-text-list {
	display: flex;
	gap: 12px;
	flex-wrap: wrap;
}

.adeptwiz-text-item-link {
	color: #4f46e5;
	text-decoration: none;
	font-weight: 600;
	font-size: 13px;
}

.adeptwiz-text-item-link:hover {
	text-decoration: underline;
}

/* Popup Modal */
.adeptwiz-popup-btn {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px;
	background: #ffffff;
	border: 1px solid #cbd5e1;
	border-radius: 20px;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
	font-weight: 600;
	cursor: pointer;
}

.adeptwiz-popup-modal {
	position: fixed;
	top: 0; left: 0; right: 0; bottom: 0;
	background: rgba(15, 23, 42, 0.6);
	backdrop-filter: blur(4px);
	z-index: 9999999;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
}

.adeptwiz-popup-content {
	background: #ffffff;
	border-radius: 12px;
	width: 100%;
	max-width: 480px;
	max-height: 80vh;
	display: flex;
	flex-direction: column;
	box-shadow: 0 20px 25px -5px rgba(0,0,0,0.2);
	overflow: hidden;
}

.adeptwiz-popup-header {
	padding: 16px 20px;
	background: #f8fafc;
	border-bottom: 1px solid #e2e8f0;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.adeptwiz-popup-header h3 {
	margin: 0;
	font-size: 16px;
	font-weight: 700;
}

.adeptwiz-popup-close {
	font-size: 24px;
	color: #64748b;
	cursor: pointer;
}

.adeptwiz-popup-body {
	padding: 16px;
	overflow-y: auto;
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
	gap: 10px;
}

.adeptwiz-popup-item {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border-radius: 6px;
	text-decoration: none;
	color: #334155;
	font-size: 13px;
	font-weight: 500;
	background: #f8fafc;
	transition: background 0.15s ease;
}

.adeptwiz-popup-item:hover {
	background: #eef2ff;
	color: #4f46e5;
}

/* Floating Language Selector Wrapper */
.adeptwiz-floating-wrapper {
	position: fixed;
	z-index: 999999;
}

.adeptwiz-floating-top_left { top: 20px; left: 20px; }
.adeptwiz-floating-top_right { top: 20px; right: 20px; }
.adeptwiz-floating-bottom_left { bottom: 20px; left: 20px; }
.adeptwiz-floating-bottom_right { bottom: 20px; right: 20px; }
.adeptwiz-floating-bottom_center { bottom: 20px; left: 50%; transform: translateX(-50%); }

/* Menu Item Integration */
.menu-item.adeptwiz-menu-translate-item {
	display: inline-flex;
	align-items: center;
}
