/**
 * Admin styles for iiTech Global Language & Timezone.
 * Modern, professional design.
 *
 * @package WP_Language_Timezone_Manager
 */

/* ==========================================================================
   Settings Page Layout
   ========================================================================== */

.wpltm-settings-wrap {
	max-width: 960px;
	margin: 20px 20px 20px 0;
}

.wpltm-settings-header {
	margin-bottom: 24px;
}

.wpltm-settings-title {
	font-size: 23px;
	font-weight: 600;
	color: #1d2327;
	margin: 0;
	padding: 9px 0 4px;
	line-height: 1.3;
}

/* ==========================================================================
   Navigation Tabs
   ========================================================================== */

.wpltm-nav-tabs {
	display: flex;
	flex-wrap: wrap;
	gap: 4px;
	margin-bottom: 0;
	border-bottom: 1px solid #c3c4c7;
	background: #f6f7f7;
	padding: 0 16px 0 0;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
}

.wpltm-nav-tab {
	display: inline-block;
	padding: 12px 20px;
	margin: 0;
	font-size: 14px;
	font-weight: 500;
	color: #50575e;
	text-decoration: none;
	border-bottom: 3px solid transparent;
	transition: color 0.15s ease, border-color 0.15s ease, background 0.15s ease;
}

.wpltm-nav-tab:hover {
	color: #2271b1;
	background: rgba(255, 255, 255, 0.5);
}

.wpltm-nav-tab-active {
	color: #2271b1;
	border-bottom-color: #2271b1;
	background: #fff;
}

/* ==========================================================================
   Settings Panel & Form
   ========================================================================== */

.wpltm-settings-panel {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-top: none;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
	padding: 24px 32px 32px;
	margin-top: -1px;
}

.wpltm-settings-form .form-table {
	margin-top: 0;
}

.wpltm-settings-form .form-table th {
	padding: 20px 20px 20px 0;
	font-weight: 600;
	color: #1d2327;
	vertical-align: top;
	width: 220px;
}

.wpltm-settings-form .form-table td {
	padding: 20px 0;
	vertical-align: top;
}

.wpltm-settings-form .form-table select,
.wpltm-settings-form .form-table input[type="text"] {
	padding: 8px 12px;
	font-size: 14px;
	line-height: 1.5;
	border: 1px solid #8c8f94;
	border-radius: 4px;
	min-width: 280px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wpltm-settings-form .form-table select:focus,
.wpltm-settings-form .form-table input[type="text"]:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
	outline: none;
}

.wpltm-settings-form .form-table .description {
	margin-top: 8px;
	font-size: 13px;
	color: #646970;
	line-height: 1.5;
}

.wpltm-settings-form .form-table .description code {
	background: #f0f0f1;
	padding: 2px 6px;
	border-radius: 3px;
	font-size: 12px;
}

/* Checkboxes */
.wpltm-settings-form .form-table input[type="checkbox"] {
	width: 18px;
	height: 18px;
	margin: 0 8px 0 0;
	vertical-align: middle;
	accent-color: #2271b1;
}

.wpltm-settings-form .form-table label {
	display: inline-flex;
	align-items: center;
	font-weight: 500;
	color: #1d2327;
	cursor: pointer;
}

/* Submit Button */
.wpltm-settings-form .submit {
	margin-top: 24px;
	padding-top: 20px;
	border-top: 1px solid #dcdcde;
}

.wpltm-settings-form .button.button-primary {
	background: #2271b1;
	border-color: #2271b1;
	color: #fff;
	text-decoration: none;
	font-size: 14px;
	line-height: 1.5;
	height: 40px;
	padding: 0 24px;
	border-radius: 4px;
	font-weight: 500;
	box-shadow: 0 1px 0 #135e96;
	transition: background 0.15s ease, border-color 0.15s ease;
}

.wpltm-settings-form .button.button-primary:hover {
	background: #135e96;
	border-color: #135e96;
	color: #fff;
}

.wpltm-settings-form .button.button-secondary {
	height: 40px;
	padding: 0 20px;
	border-radius: 4px;
	font-weight: 500;
}

/* Section Headers */
.wpltm-settings-form h2 {
	font-size: 18px;
	font-weight: 600;
	color: #1d2327;
	margin: 32px 0 16px;
	padding: 0 0 8px;
	border-bottom: 1px solid #dcdcde;
}

.wpltm-settings-form h2:first-child {
	margin-top: 0;
}

/* ==========================================================================
   Timezone Row (Detect Button)
   ========================================================================== */

.wpltm-timezone-row {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	flex-wrap: wrap;
}

.wpltm-timezone-row select {
	flex: 1;
	min-width: 280px;
}

.wpltm-timezone-row .button {
	margin-top: 0;
	flex-shrink: 0;
}

.wpltm-timezone-row .button.wpltm-detected {
	color: #00a32a;
	font-weight: 500;
}

.wpltm-timezone-row .button.wpltm-detect-fail {
	color: #d63638;
	font-weight: 500;
}

/* ==========================================================================
   Loader Overlay (Language Pack Install)
   ========================================================================== */

.wpltm-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(255, 255, 255, 0.92);
	z-index: 100000;
	align-items: center;
	justify-content: center;
}

.wpltm-overlay.wpltm-active {
	display: flex;
}

.wpltm-loader-wrap {
	text-align: center;
	padding: 32px 48px;
	background: #fff;
	box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
	border-radius: 8px;
	border: 1px solid #c3c4c7;
}

.wpltm-spinner {
	width: 44px;
	height: 44px;
	margin: 0 auto 16px;
	border: 3px solid #f0f0f1;
	border-top-color: #2271b1;
	border-radius: 50%;
	animation: wpltm-spin 0.8s linear infinite;
}

.wpltm-loader-text {
	margin: 0;
	color: #50575e;
	font-size: 14px;
	font-weight: 500;
}

body.wpltm-loading {
	overflow: hidden;
}

@keyframes wpltm-spin {
	to { transform: rotate(360deg); }
}

/* ==========================================================================
   Developer / API Panel
   ========================================================================== */

.wpltm-developer-panel {
	background: #fff;
	border: 1px solid #c3c4c7;
	border-top: none;
	box-shadow: 0 1px 1px rgba(0, 0, 0, 0.04);
	padding: 32px 40px 40px;
	margin-top: -1px;
}

.wpltm-dev-section {
	margin-bottom: 40px;
}

.wpltm-dev-section:last-child {
	margin-bottom: 0;
}

.wpltm-dev-heading {
	font-size: 18px;
	font-weight: 600;
	color: #1d2327;
	margin: 0 0 8px;
	padding: 0 0 12px;
	border-bottom: 2px solid #2271b1;
}

.wpltm-dev-section:not(:first-child) .wpltm-dev-heading {
	margin-top: 32px;
}

.wpltm-dev-desc {
	font-size: 14px;
	color: #646970;
	margin: 0 0 20px;
	line-height: 1.5;
}

/* Developer Cards (Shortcodes) */
.wpltm-dev-cards {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 20px;
}

@media screen and (max-width: 782px) {
	.wpltm-dev-cards {
		grid-template-columns: 1fr;
	}
}

.wpltm-dev-card {
	background: #f6f7f7;
	border: 1px solid #dcdcde;
	border-radius: 8px;
	padding: 20px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wpltm-dev-card:hover {
	border-color: #c3c4c7;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.wpltm-dev-card h3 {
	font-size: 15px;
	font-weight: 600;
	color: #1d2327;
	margin: 0 0 12px;
}

.wpltm-dev-code {
	display: block;
	background: #1d2327;
	color: #f0f0f1;
	padding: 12px 16px;
	border-radius: 4px;
	font-size: 13px;
	font-family: 'Consolas', 'Monaco', monospace;
	overflow-x: auto;
	margin-bottom: 12px;
	word-break: break-all;
}

.wpltm-dev-card p {
	font-size: 13px;
	color: #50575e;
	margin: 0 0 12px;
	line-height: 1.5;
}

.wpltm-dev-params {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #dcdcde;
	font-size: 12px;
	color: #646970;
}

.wpltm-dev-params strong {
	color: #1d2327;
}

.wpltm-dev-params ul {
	margin: 8px 0 0;
	padding-left: 18px;
}

.wpltm-dev-params li {
	margin-bottom: 4px;
	line-height: 1.4;
}

.wpltm-dev-params code {
	background: #fff;
	border: 1px solid #dcdcde;
	padding: 1px 5px;
	border-radius: 3px;
	font-size: 11px;
}

/* Developer Tables */
.wpltm-dev-table-wrap {
	overflow-x: auto;
	border: 1px solid #dcdcde;
	border-radius: 6px;
	background: #f6f7f7;
}

.wpltm-dev-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 14px;
}

.wpltm-dev-table th,
.wpltm-dev-table td {
	padding: 14px 20px;
	text-align: left;
	border-bottom: 1px solid #dcdcde;
	vertical-align: top;
}

.wpltm-dev-table tbody tr:last-child th,
.wpltm-dev-table tbody tr:last-child td {
	border-bottom: none;
}

.wpltm-dev-table th {
	background: #fff;
	font-weight: 600;
	color: #1d2327;
	white-space: nowrap;
}

.wpltm-dev-table td {
	background: #fff;
	color: #50575e;
}

.wpltm-dev-table td code {
	background: #f0f0f1;
	padding: 3px 8px;
	border-radius: 4px;
	font-size: 12px;
	font-family: 'Consolas', 'Monaco', monospace;
	display: inline-block;
	word-break: break-all;
}

.wpltm-dev-table td:first-child {
	width: 45%;
	min-width: 200px;
}

/* ==========================================================================
   Notice / Settings Updated
   ========================================================================== */

.wpltm-settings-wrap .notice {
	margin: 0 0 20px;
}
