/* ========================================
   CookieBloom Admin Styles
   ======================================== */

/* Admin Wrapper */
.cookiebloom-wrap {
	max-width: 1400px;
	margin: 20px auto;
	padding: 0 20px;
}

/* Header */
.cookiebloom-title {
	margin: 0 0 12px 0;
	font-size: 24px;
	font-weight: 600;
	color: #1e293b;
}

.cookiebloom-intro {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 20px;
	padding: 16px 20px;
	background-color: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
}

.cookiebloom-intro p {
	margin: 0;
	color: #64748b;
	font-size: 14px;
}

/* Language Switcher */
.cookiebloom-language-switcher {
	display: flex;
	gap: 8px;
	align-items: center;
}

.cookiebloom-language-switcher label {
	font-weight: 500;
	color: #475569;
}

.cookiebloom-language-switcher select {
	min-width: 180px;
	padding: 6px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font-size: 14px;
}

/* Preview Shell */
.cookiebloom-preview-shell {
	margin-bottom: 24px;
}

.cookiebloom-admin-preview__frame {
	position: relative;
	padding: 60px 40px;
	border: 1px solid #e2e8f0;
	border-radius: 16px;
	background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
	min-height: 450px;
	display: flex;
	align-items: center;
	justify-content: center;
	overflow: visible;
	box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.03);
	margin-bottom: 24px;
	z-index: 9;
}

.cookiebloom-admin-preview__frame::before {
	content: 'Live Preview';
	position: absolute;
	top: 16px;
	left: 24px;
	font-size: 12px;
	font-weight: 600;
	color: #64748b;
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.cookiebloom-admin-preview__frame .cookiebloom-banner {
	position: relative !important;
	inset: auto !important;
	transform: none !important;
	/* pointer-events: none; */
	max-width: 540px;
	margin: 0;
}

.cookiebloom-admin-preview__frame .cookiebloom-banner[data-visible='true'] {
	opacity: 1;
}

.cookiebloom-admin-preview__frame .cookiebloom-banner__close,
.cookiebloom-admin-preview__frame .cookiebloom-button {
	pointer-events: none;
	cursor: default;
}

.cookiebloom-admin-preview__frame .cookiebloom-recall {
	position: absolute !important;
	pointer-events: none;
	opacity: 1 !important;
	transform: scale(1) !important;
}

.cookiebloom-admin-preview__frame .cookiebloom-recall--bottom-right {
	bottom: 24px !important;
	right: 24px !important;
}

/* Tabs */
.cookiebloom-tabs {
	margin-bottom: 24px;
}

.cookiebloom-tabs .nav-tab-wrapper {
	border-bottom: 2px solid #e2e8f0;
	margin-bottom: 0;
}

.cookiebloom-tabs .nav-tab {
	padding: 12px 20px;
	background: none;
	border: none;
	border-bottom: 3px solid transparent;
	cursor: pointer;
	font-size: 14px;
	font-weight: 500;
	color: #64748b;
	transition: all 0.2s;
	margin: 0 4px -2px 0;
}

.cookiebloom-tabs .nav-tab:hover {
	color: #2271b1;
	background-color: #f8fafc;
}

.cookiebloom-tabs .nav-tab.nav-tab-active {
	color: #2271b1;
	border-bottom-color: #2271b1;
	background-color: transparent;
}

/* Main Layout */
.cookiebloom-layout__main {
	background-color: #ffffff;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
	padding: 28px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cookiebloom-tab-content {
	display: none;
}

.cookiebloom-tab-content.active {
	display: block;
}

.cookiebloom-tab-description {
	margin: 0 0 24px 0;
	font-size: 14px;
	color: #64748b;
	line-height: 1.6;
}

/* Form */
.cookiebloom-form {
	margin: 0;
}

.cookiebloom-form table.form-table {
	margin-top: 0;
}

/* Form Fields */
.cookiebloom-field {
	margin-bottom: 24px;
}

.cookiebloom-field:last-child {
	margin-bottom: 0;
}

.cookiebloom-field__label {
	display: block;
	font-weight: 600;
	margin-bottom: 8px;
	color: #1e293b;
	font-size: 14px;
}

.cookiebloom-field .description,
.cookiebloom-field__description {
	display: block;
	margin-top: 6px;
	color: #64748b;
	font-size: 13px;
	font-style: normal;
	line-height: 1.5;
}

/* Input Fields */
.cookiebloom-field input[type='text'],
.cookiebloom-field input[type='url'],
.cookiebloom-field input[type='number'],
.cookiebloom-field .regular-text,
.cookiebloom-select,
.cookiebloom-field select {
	width: 100%;
	max-width: 500px;
	padding: 10px 14px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font-size: 14px;
	transition: border-color 0.2s;
}

.cookiebloom-field input[type='text']:focus,
.cookiebloom-field input[type='url']:focus,
.cookiebloom-field input[type='number']:focus,
.cookiebloom-field .regular-text:focus,
.cookiebloom-select:focus,
.cookiebloom-field select:focus {
	border-color: #2271b1;
	outline: none;
	box-shadow: 0 0 0 1px #2271b1;
}

.cookiebloom-field textarea {
	width: 100%;
	max-width: 600px;
	min-height: 120px;
	padding: 12px 14px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font-size: 14px;
	resize: vertical;
	line-height: 1.6;
}

.cookiebloom-field textarea:focus {
	border-color: #2271b1;
	outline: none;
	box-shadow: 0 0 0 1px #2271b1;
}

.cookiebloom-field input[type='checkbox'] {
	margin-right: 8px;
	width: 18px;
	height: 18px;
	cursor: pointer;
}

.cookiebloom-field input[type='checkbox'] + label {
	cursor: pointer;
}

/* Color Picker */
.cookiebloom-color-picker {
	display: flex;
	gap: 12px;
	align-items: center;
	flex-wrap: wrap;
}

.cookiebloom-color-picker input[type='text'] {
	max-width: 120px;
}

.wp-picker-container {
	display: inline-block;
}

/* Media Library Picker */
.cookiebloom-media {
	display: flex;
	align-items: center;
	gap: 12px;
	flex-wrap: wrap;
}

.cookiebloom-media__holder {
	width: 90px;
	height: 90px;
	border: 2px dashed #cbd5e1;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	background-color: #f8fafc;
	transition: border-color 0.2s;
}

.cookiebloom-media__holder:hover {
	border-color: #94a3b8;
}

.cookiebloom-media__preview {
	max-width: 70px;
	max-height: 70px;
	object-fit: contain;
}

.cookiebloom-media__actions {
	display: flex;
	gap: 8px;
}

.cookiebloom-media__select,
.cookiebloom-media__reset {
	padding: 8px 16px;
	font-size: 13px;
	border-radius: 6px;
	cursor: pointer;
	transition: all 0.2s;
}

.cookiebloom-media__select {
	background: #2271b1;
	color: #fff;
	border: none;
}

.cookiebloom-media__select:hover {
	background: #135e96;
}

.cookiebloom-media__reset {
	background: #f1f5f9;
	color: #475569;
	border: 1px solid #cbd5e1;
}

.cookiebloom-media__reset:hover {
	background: #e2e8f0;
}

/* Form Actions */
.cookiebloom-form__actions {
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid #e2e8f0;
}

.cookiebloom-form__actions .button-primary {
	padding: 12px 28px;
	font-size: 14px;
	font-weight: 500;
	height: auto;
	border-radius: 6px;
}

/* Reset Section */
.cookiebloom-reset {
	margin-top: 24px;
	padding: 20px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	border-radius: 8px;
}

.cookiebloom-reset h3 {
	margin: 0 0 12px 0;
	color: #991b1b;
	font-size: 15px;
}

.cookiebloom-reset p {
	margin: 0 0 16px 0;
	color: #7f1d1d;
	font-size: 13px;
}

.cookiebloom-reset .button {
	background: #dc2626;
	color: #fff;
	border: none;
	padding: 10px 20px;
	border-radius: 6px;
	line-height: 1.2;
}

.cookiebloom-reset .button:hover {
	background: #b91c1c;
	color: #fff;
}

/* Notices */
.cookiebloom-notice {
	padding: 14px 18px;
	margin: 0 0 20px 0;
	border-left: 4px solid;
	border-radius: 6px;
	background: #fff;
}

.cookiebloom-notice--success {
	border-left-color: #10b981;
	background: #f0fdf4;
	color: #065f46;
}

.cookiebloom-notice--error {
	border-left-color: #ef4444;
	background: #fef2f2;
	color: #991b1b;
}

.cookiebloom-notice--info {
	border-left-color: #3b82f6;
	background: #eff6ff;
	color: #1e40af;
}

/* WordPress Notice Overrides */
.notice.cookiebloom-notice {
	border-left-width: 4px;
}

/* Pro License Section */
.cookiebloom-pro-section {
	max-width: 800px;
}

.cookiebloom-pro-active {
	padding: 24px;
	background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
	border: 2px solid #10b981;
	border-radius: 12px;
}

.cookiebloom-pro-inactive {
	padding: 24px;
	background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
	border: 2px solid #3b82f6;
	border-radius: 12px;
}

.cookiebloom-license-error {
	padding: 24px;
	background: linear-gradient(135deg, #fef2f2 0%, #fee2e2 100%);
	border: 2px solid #ef4444;
	border-radius: 12px;
	margin-bottom: 24px;
}

.cookiebloom-license-error h3 {
	margin-top: 0;
	color: #991b1b;
}

.cookiebloom-license-info {
	padding: 16px;
	background: rgba(255, 255, 255, 0.7);
	border-radius: 8px;
	margin: 16px 0;
}

.cookiebloom-license-warning {
	background: #fff9e6;
	border-left: 4px solid #ffc107;
}

.cookiebloom-status-badge {
	display: inline-block;
	padding: 4px 12px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
	text-transform: uppercase;
}

.cookiebloom-status-active {
	background: #10b981;
	color: #fff;
}

.cookiebloom-days-remaining {
	color: #64748b;
	font-size: 13px;
}

.cookiebloom-renewal-notice {
	margin-top: 12px;
	padding: 12px;
	background: #fff9e6;
	border-left: 3px solid #ffc107;
	border-radius: 4px;
	font-weight: 500;
}

.cookiebloom-pro-price {
	font-size: 32px;
	font-weight: 700;
	color: #2271b1;
	margin: 16px 0;
}

.cookiebloom-price-term {
	font-size: 18px;
	font-weight: 400;
	color: #64748b;
}

/* New UI Styles */
.cookiebloom-license-expiry {
	padding: 12px;
	background: #fff9e6;
	border: 1px solid #ffc107;
	border-radius: 6px;
	margin: 16px 0;
}

.cookiebloom-purchase-steps ol {
	counter-reset: step-counter;
	list-style: none;
	padding-left: 0;
}

.cookiebloom-purchase-steps ol li {
	counter-increment: step-counter;
	padding: 12px 12px 12px 48px;
	position: relative;
	margin-bottom: 12px;
	background: #f8fafc;
	border-radius: 8px;
}

.cookiebloom-purchase-steps ol li::before {
	content: counter(step-counter);
	position: absolute;
	left: 12px;
	top: 12px;
	width: 28px;
	height: 28px;
	background: #2271b1;
	color: #fff;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
}

.cookiebloom-features-list {
	list-style: none;
	padding-left: 0;
}

.cookiebloom-features-list li {
	padding: 10px 0;
	border-bottom: 1px solid rgba(0, 0, 0, 0.05);
	font-size: 14px;
}

.cookiebloom-features-active li {
	color: #059669;
	font-weight: 500;
}

.cookiebloom-guarantee {
	margin-top: 24px;
	padding: 16px;
	background: #f0fdf4;
	border: 2px solid #10b981;
	border-radius: 8px;
}

.cookiebloom-guarantee p {
	margin: 8px 0;
}

.cookiebloom-license-form input[type='text'] {
	display: block;
	width: 100%;
	max-width: 400px;
	margin: 12px 0;
}

/* License Form Messages */
#cookiebloom-license-message {
	margin: 16px 0;
	padding: 12px 16px;
	border-left: 4px solid;
	border-radius: 4px;
	animation: slideDown 0.3s ease;
}

#cookiebloom-license-message.notice-success {
	background: #d1fae5;
	border-color: #10b981;
	color: #065f46;
}

#cookiebloom-license-message.notice-error {
	background: #fee2e2;
	border-color: #ef4444;
	color: #991b1b;
}

#cookiebloom-license-message p {
	margin: 0;
	font-weight: 500;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.cookiebloom-license-form .spinner {
	visibility: hidden;
}

.cookiebloom-license-form .spinner.is-active {
	visibility: visible;
}

.cookiebloom-license-form input[type='text']:focus {
	border-color: #2271b1;
	box-shadow: 0 0 0 1px #2271b1;
}

/* Responsive Design */
@media (max-width: 1200px) {
	.cookiebloom-wrap {
		padding: 0 15px;
	}
}

@media (max-width: 960px) {
	.cookiebloom-admin-preview__frame {
		padding: 40px 24px;
		min-height: 380px;
	}

	.cookiebloom-admin-preview__frame .cookiebloom-banner {
		transform: scale(0.9) !important;
	}
}

@media (max-width: 782px) {
	.cookiebloom-field input[type='text'],
	.cookiebloom-field input[type='url'],
	.cookiebloom-field input[type='number'],
	.cookiebloom-field .regular-text,
	.cookiebloom-select,
	.cookiebloom-field select,
	.cookiebloom-field textarea {
		max-width: 100%;
	}

	.cookiebloom-tabs .nav-tab {
		padding: 10px 16px;
		font-size: 13px;
	}
}

@media (max-width: 640px) {
	.cookiebloom-admin-preview__frame {
		padding: 32px 16px;
		min-height: 350px;
	}

	.cookiebloom-admin-preview__frame .cookiebloom-banner {
		transform: scale(0.8) !important;
		max-width: 100%;
	}
}

@media (max-width: 600px) {
	.cookiebloom-admin-preview__frame {
		padding: 16px;
	}

	.cookiebloom-admin-preview__frame .cookiebloom-banner {
		transform: scale(0.75);
	}

	.cookiebloom-media {
		flex-direction: column;
		align-items: flex-start;
	}
}

/* Language Switcher Improvements */
.cookiebloom-intro {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
}

.cookiebloom-intro__notice {
	margin: 8px 0 0 0;
	padding: 8px 12px;
	background: #e0f2ff;
	border-left: 3px solid #2271b1;
	border-radius: 4px;
	font-size: 13px;
}

.cookiebloom-language-switcher {
	display: flex;
	gap: 10px;
	align-items: center;
	flex-shrink: 0;
}

.cookiebloom-language-switcher label {
	font-weight: 500;
	color: #1e293b;
	white-space: nowrap;
}

.cookiebloom-language-switcher select {
	min-width: 200px;
	padding: 6px 12px;
	border: 1px solid #cbd5e1;
	border-radius: 6px;
	font-size: 14px;
	cursor: pointer;
}

.cookiebloom-form__actions .button-large {
	font-size: 15px;
	padding: 10px 28px;
}

/* Utility Classes */
.cookiebloom-hidden {
	display: none !important;
}

.cookiebloom-text-muted {
	color: #64748b;
}

.cookiebloom-text-danger {
	color: #dc2626;
}

.cookiebloom-text-success {
	color: #10b981;
}

/* Loading State */
.cookiebloom-loading {
	opacity: 0.6;
	pointer-events: none;
}

.cookiebloom-loading::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 32px;
	height: 32px;
	margin: -16px 0 0 -16px;
	border: 3px solid #e2e8f0;
	border-top-color: #2271b1;
	border-radius: 50%;
	animation: cookiebloom-spin 0.8s linear infinite;
}

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

.cookiebloom-wrap {
	max-width: 1400px;
	margin: 20px auto;
	padding: 0 20px;
}

@media (max-width: 576px) {
	.cookiebloom-wrap {
		padding: 0;
	}
}

.cookiebloom-title {
	margin: 0 0 12px 0;
	font-size: 24px;
	font-weight: 600;
	color: #1e293b;
}

.cookiebloom-intro {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 20px;
	padding: 16px 20px;
	background-color: #f8fafc;
	border: 1px solid #e2e8f0;
	border-radius: 12px;
}

.cookiebloom-layout__main {
	background-color: #ffffff;
	border: 1px solid #e2e8f0;
	overflow: hidden;
	border-radius: 12px;
	padding: 28px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cookiebloom-tabs .nav-tab {
	padding: 12px 20px;
	background: none;
	border: none;
	border-bottom: 3px solid transparent;
	font-size: 14px;
	font-weight: 500;
	color: #64748b;
	margin: 0 4px -2px 0;
}

.cookiebloom-tabs .nav-tab.nav-tab-active {
	color: #2271b1;
	border-bottom-color: #2271b1;
}

.cookiebloom-field {
	margin-bottom: 24px;
}

.cookiebloom-field__label {
	display: block;
	font-weight: 600;
	margin-bottom: 8px;
	color: #1e293b;
	font-size: 14px;
}

.cookiebloom-telegram-float {
	position: fixed;
	bottom: 30px;
	right: 30px;
	z-index: 999999;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 12px;
}

.cookiebloom-telegram-bubble {
	position: relative;
	background: #ffffff;
	padding: 16px 20px;
	border-radius: 12px;
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
	max-width: 280px;
	display: none;
	animation: cookiebloom-bubble-in 0.3s ease;
}

.cookiebloom-telegram-bubble.visible {
	display: block;
}

.cookiebloom-telegram-bubble::after {
	content: '';
	position: absolute;
	bottom: -8px;
	right: 20px;
	width: 0;
	height: 0;
	border-left: 8px solid transparent;
	border-right: 8px solid transparent;
	border-top: 8px solid #ffffff;
}

.cookiebloom-telegram-bubble__close {
	position: absolute;
	top: 8px;
	right: 8px;
	width: 24px;
	height: 24px;
	border: none;
	background: transparent;
	cursor: pointer;
	font-size: 18px;
	line-height: 1;
	color: #64748b;
	padding: 0;
}

.cookiebloom-telegram-bubble__close:hover {
	color: #1e293b;
}

.cookiebloom-telegram-bubble p {
	margin: 0 0 8px 0;
	font-size: 14px;
	line-height: 1.5;
	color: #1e293b;
}

.cookiebloom-telegram-bubble strong {
	color: #0088cc;
}

.cookiebloom-telegram-btn {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	background: linear-gradient(135deg, #0088cc 0%, #006699 100%);
	border: none;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 16px rgba(0, 136, 204, 0.4);
	transition: all 0.3s ease;
	position: relative;
}

.cookiebloom-telegram-btn:hover {
	transform: scale(1.1);
	box-shadow: 0 6px 20px rgba(0, 136, 204, 0.5);
}

.cookiebloom-telegram-btn:active {
	transform: scale(0.95);
}

.cookiebloom-telegram-btn svg {
	width: 32px;
	height: 32px;
	fill: #ffffff;
}

@keyframes cookiebloom-bubble-in {
	from {
		opacity: 0;
		transform: translateY(10px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

@media (max-width: 782px) {
	.cookiebloom-telegram-float {
		bottom: 20px;
		right: 20px;
	}

	.cookiebloom-telegram-btn {
		width: 56px;
		height: 56px;
	}

	.cookiebloom-telegram-bubble {
		max-width: 240px;
		padding: 14px 16px;
	}
}
