/* Watso WhatsApp Chat - Admin Styles - COMPLETE VERSION */

/* Import Lato Font */
@import url('https://fonts.googleapis.com/css2?family=Lato:wght@300;400;600;700&display=swap');

/* Admin Wrapper */
.watso-admin-wrap {
	background: #f1f1f1;
	padding: 0;
	min-height: 100vh;
	font-family: 'Lato', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Header Section */
.watso-header {
	color: #333;
	padding: 20px 30px;
	margin-bottom: 0;
}

.dashicons-format-chat:before {
	color: #fff;
}

.watso-tab:focus, .watso-tab:focus-visible {
	outline: none;
	box-shadow: none;
}

.watso-header-content {
	display: flex;
	align-items: center;
	max-width: 1200px;
	margin: 0 auto;
}

.watso-logo {
	margin-right: 20px;
	padding: 10px;
	background: #119849;
	border-radius: 8px;
}

.watso-header-text h1 {
	margin: 0 0 5px 0;
	font-size: 24px;
	font-weight: 600;
	color: #333;
}

.watso-header-text p {
	margin: 0;
	color: #666;
	font-size: 14px;
}

/* Tabs Container */
.watso-tabs-container {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 30px;
}

/* Tabs Navigation - FIXED */
.nav-tab-wrapper {
	border-bottom: 1px solid #ddd;
	margin: 20px 0 0 0;
	background: #f1f1f1;
	padding: 0;
}

.watso-tab {
	background: #e8e8e8;
	border: 1px solid #ddd;
	border-bottom: none;
	padding: 15px 20px;
	text-decoration: none;
	color: #666;
	display: inline-flex;
	align-items: center;
	margin-right: 3px;
	border-radius: 5px 5px 0 0;
}

.watso-tab:hover {
	background: #f0f0f0;
	color: #333;
	text-decoration: none;
}

/* Active tab - WordPress standard class */
.watso-tab.nav-tab-active {
	background: #fff !important;
	color: #333 !important;
	border-bottom: 1px solid #fff;
	font-weight: 600;
	z-index: 10;
}

.watso-tab-icon {
	font-size: 16px;
	margin-right: 8px;
}

/* Tab Content Wrapper - FIXED */
#watso-tab-content {
	background: #fff;
	border: 1px solid #ddd;
	border-top: none;
	margin-bottom: 20px;
	border-radius: 0 0 5px 5px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

/* Tab Panels */
.watso-tab-panel {
	display: none;
}

.watso-tab-panel.active {
	display: block;
}

/* Cards */
.watso-card {
	padding: 25px 30px;
	border-bottom: 1px solid #eee;
}

.watso-card:last-child {
	border-bottom: none;
}

.watso-card h3 {
	margin: 0 0 20px 0;
	font-size: 18px;
	font-weight: 600;
	color: #333;
	padding-bottom: 10px;
	border-bottom: 1px solid #eee;
}

/* Form Grid */
.watso-form-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 20px;
}

.watso-field-full {
	grid-column: 1 / -1;
}

/* Form Fields */
.watso-form-field {
	display: flex;
	flex-direction: column;
}

.watso-form-field label {
	font-weight: 600;
	margin-bottom: 8px;
	color: #333;
	font-size: 13px;
}

.watso-input, .watso-select {
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 14px;
	background: #fff;
	transition: border-color 0.2s ease;
}

.watso-input:focus, .watso-select:focus {
	outline: none;
	border-color: #119849;
	box-shadow: 0 0 0 2px rgba(17, 152, 73, 0.2);
}

.watso-input:read-only {
	background: #f9f9f9;
	color: #666;
}

.watso-description {
	margin-top: 6px;
	font-size: 12px;
	color: #666;
	line-height: 1.4;
}

/* Toggle Switch */
.watso-toggle {
	position: relative;
	display: inline-block;
	width: 50px;
	height: 28px;
}

.watso-toggle-small {
	width: 40px;
	height: 22px;
}

.watso-toggle input {
	opacity: 0;
	width: 0;
	height: 0;
}

.watso-toggle-slider {
	position: absolute;
	cursor: pointer;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: #ccc;
	transition: .3s;
	border-radius: 28px;
}

.watso-toggle-slider:before {
	position: absolute;
	content: "";
	height: 22px;
	width: 22px;
	left: 3px;
	bottom: 3px;
	background: white;
	transition: .3s;
	border-radius: 50%;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.watso-toggle-small .watso-toggle-slider:before {
	height: 16px;
	width: 16px;
	left: 3px;
	bottom: 3px;
}

.watso-toggle input:checked + .watso-toggle-slider {
	background: #119849;
}

.watso-toggle input:checked + .watso-toggle-slider:before {
	transform: translateX(22px);
}

.watso-toggle-small input:checked + .watso-toggle-slider:before {
	transform: translateX(18px);
}

/* Range Slider */
.watso-range-container {
	display: flex;
	align-items: center;
	gap: 15px;
}

.watso-range-slider {
	flex: 1;
	height: 4px;
	border-radius: 2px;
	background: #ddd;
	outline: none;
	-webkit-appearance: none;
}

.watso-range-slider::-webkit-slider-thumb {
	-webkit-appearance: none;
	appearance: none;
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #119849;
	cursor: pointer;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.watso-range-slider::-moz-range-thumb {
	width: 18px;
	height: 18px;
	border-radius: 50%;
	background: #119849;
	cursor: pointer;
	border: none;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.watso-range-value {
	font-weight: 600;
	color: #119849;
	min-width: 45px;
	font-size: 14px;
}

/* Buttons */
.watso-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 16px;
	border: 1px solid #ddd;
	border-radius: 4px;
	font-size: 13px;
	font-weight: 500;
	text-decoration: none;
	cursor: pointer;
	transition: all 0.2s ease;
	background: #fff;
	color: #333;
}

.watso-btn-small {
	padding: 6px 12px;
	font-size: 12px;
}

.watso-btn-large {
	padding: 12px 24px;
	font-size: 14px;
	font-weight: 600;
}

.watso-btn-primary {
	background: #119849;
	color: white;
	border-color: #119849;
}

.watso-btn-primary:hover {
	background: #0d7a3a;
	border-color: #0d7a3a;
}

.watso-btn-secondary {
	background: #f8f9fa;
	color: #495057;
	border-color: #dee2e6;
}

.watso-btn-secondary:hover {
	background: #e9ecef;
	border-color: #adb5bd;
}

.watso-btn-danger {
	background: #dc3545;
	color: white;
	border-color: #dc3545;
}

.watso-btn-danger:hover {
	background: #c82333;
	border-color: #bd2130;
}

.watso-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* Number Cards - IMPROVED */
.watso-numbers-container {
	display: flex;
	flex-direction: column;
	gap: 20px;
	margin-bottom: 20px;
}

.watso-number-card {
	background: #f9f9f9;
	border: 1px solid #ddd;
	border-radius: 8px;
	padding: 20px;
	transition: all 0.2s ease;
	animation: fadeInUp 0.3s ease;
}

.watso-number-card:hover {
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.watso-number-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 20px;
	padding-bottom: 15px;
	border-bottom: 2px solid #e5e5e5;
}

.watso-number-header h4 {
	margin: 0;
	color: #333;
	font-size: 16px;
	font-weight: 600;
}

.watso-number-header .watso-toggle-small {
	flex-shrink: 0;
}

.watso-number-fields {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 15px;
	margin-bottom: 15px;
}

/* Short description field full width */
.watso-number-fields .watso-field-full {
	grid-column: 1 / -1;
}

.watso-number-actions {
	display: flex;
	justify-content: flex-end;
	padding-top: 10px;
	border-top: 1px solid #e5e5e5;
}

/* Special style for field descriptions */
.watso-field-description {
	margin: 5px 0 0 0;
	font-size: 11px;
	color: #777;
	font-style: italic;
	line-height: 1.3;
}

/* Schedule Grid */
.watso-schedule-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
	gap: 15px;
	margin: 15px 0;
}

.watso-schedule-day {
	background: #f9f9f9;
	border: 1px solid #ddd;
	border-radius: 5px;
	padding: 15px;
}

.watso-day-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 10px;
}

.watso-day-name {
	font-weight: 600;
	color: #333;
	font-size: 13px;
}

.watso-time-inputs {
	display: flex;
	align-items: center;
	gap: 8px;
}

.watso-time-inputs input {
	flex: 1;
}

.watso-time-separator {
	color: #666;
	font-weight: 600;
}

/* Holiday Cards */
.watso-holidays-container {
	display: flex;
	flex-direction: column;
	gap: 10px;
	margin: 15px 0;
}

.watso-holiday-card {
	background: #f9f9f9;
	border: 1px solid #ddd;
	border-radius: 5px;
	padding: 15px;
	display: flex;
	align-items: center;
	gap: 15px;
}

.watso-holiday-fields {
	display: flex;
	gap: 15px;
	flex: 1;
}

.watso-holiday-fields input {
	flex: 1;
}

.watso-upload-container {
	padding: 15px;
	background: #f9f9f9;
	border: 2px dashed #ddd;
	border-radius: 5px;
	text-align: center;
}

.watso-upload-actions {
	display: flex;
	gap: 10px;
	justify-content: center;
	margin-bottom: 10px;
}

/* Icon Upload */
.watso-icon-preview-container {
	display: flex;
	align-items: center;
	gap: 15px;
	padding: 15px;
	background: #f9f9f9;
	border: 1px solid #ddd;
	border-radius: 5px;
}

.watso-icon-preview img,
.watso-custom-icon-preview img {
	width: 50px;
	height: 50px;
	border-radius: 4px;
	border: 1px solid #ddd;
	padding: 5px;
	background: white;
}

.watso-custom-icon-preview {
	margin-top: 10px;
}

/* Color Picker - IMPROVED */
.watso-color-container {
	display: flex;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.watso-color-container .wp-color-picker {
	width: 80px !important;
}

/* Special layout for appearance tab */
#tab-appearance .watso-form-grid {
	grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

/* Form Actions */
.watso-form-actions {
	margin-top: 15px;
}

.watso-form-footer {
	padding: 20px 30px;
	background: #f9f9f9;
	border-top: 1px solid #ddd;
	text-align: center;
}

/* Info Box - IMPROVED */
.watso-info-box {
	background: #e7f3ff;
	border: 1px solid #b8daff;
	border-radius: 4px;
	padding: 12px;
	margin-top: 15px;
}

.watso-info-box p {
	margin: 0;
	color: #0c63e4;
	font-size: 13px;
}

.watso-info-box h4 {
	margin: 0 0 10px 0;
	color: #0c63e4;
	font-size: 14px;
}

.watso-info-box ul {
	list-style: none;
	padding-left: 0;
	margin: 10px 0 0 0;
}

.watso-info-box li {
	padding: 3px 0;
	border-bottom: 1px solid #b8daff;
	color: #0c63e4;
	font-size: 12px;
}

.watso-info-box li:last-child {
	border-bottom: none;
}

/* Sub Fields - For UTM and Source Message */
.watso-sub-fields {
	margin-top: 15px;
}

.watso-sub-container {
	background: #f9f9f9;
	padding: 15px;
	border-radius: 5px;
	border: 1px solid #ddd;
}

.watso-sub-title {
	margin: 0 0 15px 0;
	font-size: 13px;
	font-weight: 600;
	color: #333;
}

.watso-sub-field {
	margin-bottom: 10px;
}

.watso-sub-field:last-child {
	margin-bottom: 0;
}

.watso-sub-label {
	font-size: 12px;
	font-weight: 600;
	margin-bottom: 5px;
	display: block;
	color: #333;
}

.watso-sub-input {
	font-size: 13px;
	width: 100%;
}

.watso-sub-description {
	font-size: 11px;
	color: #666;
	margin: 5px 0 0 0;
	line-height: 1.4;
}

/* ===== PREVIEW CSS - CLEAN AND WORKING ===== */
.watso-preview-container {
	position: fixed !important;
	bottom: 20px !important;
	right: 20px !important;
	z-index: 9999 !important;
	display: block !important;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
}

/* EXACT COPY OF FRONTEND CSS */
.watso-preview-container .watso-chat-button {
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
	padding: 12px 20px !important;
	background: #119849 !important;
	color: white !important;
	text-decoration: none !important;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15) !important;
	transition: all 0.3s ease !important;
	cursor: pointer !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	border: none !important;
	border-radius: 15px !important;
	white-space: nowrap !important;
}

.watso-preview-container .watso-icon {
	width: 24px !important;
	height: 24px !important;
	margin-right: 8px !important;
	flex-shrink: 0 !important;
}

.watso-preview-container .watso-button-text {
	color: white !important;
	font-weight: 600 !important;
	font-size: 14px !important;
}

/* ICON ONLY MODE */
.watso-preview-container .watso-chat-button:not(:has(.watso-button-text)) {
	padding: 12px !important;
	width: 48px !important;
	height: 48px !important;
}

.watso-preview-container .watso-chat-button:not(:has(.watso-button-text)) .watso-icon {
	margin-right: 0 !important;
}

/* PREVIEW DROPDOWN - DEFAULT CLOSED BUT WORKING */
.watso-preview-container .watso-dropdown-menu {
	position: absolute;
	bottom: 70px;
	right: 0;
	width: 320px;
	background: #fff;
	border-radius: 12px;
	box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
	border: 1px solid #e5e5e5;
	overflow: hidden;
	opacity: 0;
	visibility: hidden;
	transform: translateY(10px);
	transition: all 0.3s ease;
	z-index: 1000;
	pointer-events: auto;
}

/* PREVIEW DROPDOWN OPEN STATE */
.watso-preview-container .watso-dropdown-menu.watso-show {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.watso-preview-container .watso-dropdown-header {
	padding: 16px 20px;
	background: #f8f9fa;
	border-bottom: 1px solid #e5e5e5;
	font-weight: 600;
	color: #333;
	font-size: 14px;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.watso-preview-container .watso-close-dropdown {
	background: none;
	border: none;
	font-size: 20px;
	cursor: pointer;
	color: #666;
	padding: 0;
	width: 24px;
	height: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	transition: all 0.2s ease;
}

.watso-preview-container .watso-close-dropdown:hover {
	background: #e9ecef;
	color: #333;
}

.watso-preview-container .watso-dropdown-content {
	max-height: 400px;
	overflow-y: auto;
}

.watso-preview-container .watso-dropdown-item {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	padding: 16px 20px;
	text-decoration: none;
	color: #333;
	border-bottom: 1px solid #f0f0f0;
	transition: all 0.2s ease;
	cursor: pointer;
	min-height: auto !important; /* Dynamic height */
}

.watso-preview-container .watso-dropdown-item:hover {
	background: #f8f9fa;
}

.watso-preview-container .watso-dropdown-item:last-child {
	border-bottom: none;
}

.watso-preview-container .watso-contact-info {
	display: flex;
	align-items: flex-start;
	flex: 1;
	gap: 14px !important;
}

.watso-preview-container .watso-contact-avatar {
	width: 46px !important;
	height: 46px !important;
	background: #119849;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	margin-right: 12px;
	flex-shrink: 0;
	margin-top: 2px;
}

.watso-preview-container .watso-contact-avatar img {
	width: 26px;
	height: 26px;
	filter: brightness(0) invert(1);
}

.watso-preview-container .watso-contact-details {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 2px !important;
	justify-content: center; /* Center content */
	min-height: 46px; /* Same height as avatar */
}

.watso-preview-container .watso-contact-name {
	font-weight: 600;
	font-size: 15px;
	color: #333;
	margin-bottom: 2px;
}

.watso-preview-container .watso-contact-department {
	font-weight: 500 !important;
	font-size: 13px !important;
	margin-bottom: 2px !important;
	transition: color 0.2s ease;
}

.watso-preview-container .watso-contact-number {
	font-size: 12px;
	color: #999;
	margin-top: 2px;
}

.watso-preview-container .watso-contact-description {
	font-size: 11px !important;
	font-style: italic !important;
	margin-top: 4px !important;
	line-height: 1.3 !important;
	opacity: 0.8 !important;
	transition: color 0.2s ease;
}

.watso-preview-container .watso-contact-status {
	display: flex;
	align-items: center;
	margin-top: 2px;
	gap: 6px;
}

.watso-preview-container .watso-online-indicator {
	width: 8px;
	height: 8px;
	background: #4CAF50;
	border-radius: 50%;
}

.watso-preview-container .watso-status-text {
	font-size: 11px;
	color: #4CAF50;
	font-weight: 500;
}

/* Hover effects */
.watso-preview-container .watso-dropdown-item:hover .watso-contact-department {
	color: #333 !important;
}

.watso-preview-container .watso-dropdown-item:hover .watso-contact-description {
	opacity: 1 !important;
}

/* Style for form validation errors */
.watso-input.error {
	border-color: #dc3545 !important;
	box-shadow: 0 0 0 2px rgba(220, 53, 69, 0.2) !important;
}

.watso-field-error {
	color: #dc3545;
	font-size: 11px;
	margin-top: 5px;
	font-weight: 500;
}

/* Style for success state */
.watso-input.success {
	border-color: #28a745 !important;
	box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.2) !important;
}

/* Animations */
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* Responsive adjustments */
@media (max-width: 768px) {
	.watso-number-fields {
		grid-template-columns: 1fr;
		gap: 12px;
	}

	.watso-number-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 10px;
	}

	#tab-appearance .watso-form-grid {
		grid-template-columns: 1fr;
	}

	.watso-color-container {
		flex-direction: column;
		align-items: flex-start !important;
	}

	.watso-tabs-container {
		padding: 0 15px;
	}

	.watso-header {
		padding: 15px 20px;
	}

	.watso-card {
		padding: 20px 15px;
	}
}

@media (max-width: 480px) {
	.watso-form-grid {
		grid-template-columns: 1fr;
		gap: 15px;
	}

	.watso-number-card {
		padding: 15px;
	}

	.watso-number-fields {
		gap: 10px;
	}
}

/* Print styles */
@media print {
	.watso-preview-container {
		display: none !important;
	}
}


/* banner */

/* Full-Width Dinamik Banner CSS - admin.css'e eklenecek */

.watso-hosteva-banner-container {
	margin: 10px 0 15px 0;
	background: #f8f9fa;
	border: 1px solid #e1e5e9;
	width: 100%;
}

.watso-banner-size {
	width: 100%;              /* Full genişlik */
	max-width: 100%;          /* Container'ın tamamını kapla */
	height: 140px;             /* Sabit yükseklik */
	overflow: hidden;
	box-shadow: 0 4px 15px rgba(0,0,0,0.1);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.watso-banner-size:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 20px rgba(0,0,0,0.15);
}

.watso-banner-link {
	display: block;
	width: 100%;
	height: 100%;
	text-decoration: none;
}

.watso-banner-img {
	width: 100%;              /* Full genişlik */
	height: 140px;             /* Sabit yükseklik */
	object-fit: cover;        /* Resmi crop et, aspect ratio koru */
	object-position: center;   /* Ortadan crop et */
	display: block;
}

/* Medium Desktop (992px - 1199px) */
@media (max-width: 1199px) and (min-width: 992px) {
	.watso-banner-size, .watso-banner-img {
		height: 110px;
	}
}

/* Tablet (768px - 991px) */
@media (max-width: 991px) and (min-width: 768px) {
	.watso-hosteva-banner-container {
		margin: 15px 0 25px 0;
		padding: 12px;
	}

	.watso-banner-size, .watso-banner-img {
		height: 100px;   /* Tablet'te biraz daha küçük */
	}
}

/* Mobile (767px ve altı) */
@media (max-width: 767px) {
	.watso-hosteva-banner-container {
		margin: 15px 0 20px 0;
		padding: 10px;
		border-radius: 8px;
	}

	.watso-banner-size {
		border-radius: 6px;
	}

	.watso-banner-img, .watso-banner-size {
		height: 90px;
	}

}

/* Extra Small Mobile (480px ve altı) */
@media (max-width: 480px) {
	.watso-hosteva-banner-container {
		margin: 10px 0 15px 0;
		padding: 8px;
	}

	.watso-banner-size, .watso-banner-img {
		height: 60px;   /* Çok küçük ekranlarda minimal */
	}

}

/* WordPress Admin Panel'e Uyum */
@media screen and (max-width: 782px) {
	/* WordPress mobile breakpoint */
	.watso-hosteva-banner-container {
		margin: 10px 0 15px 0;
	}
}

/* Hover Effects for Better UX */
.watso-banner-link:focus {
	outline: 2px solid #007cba;
	outline-offset: 2px;
}

.watso-banner-link:focus .watso-banner-img {
	opacity: 0.9;
}
