/* Стили для контейнера API ключей */
.api-key-container {
    display: flex;
    align-items: center;
}

.api-key-input {
    flex: 1;
}

.toggle-password,
.reset-key {
    margin-left: 5px;
    padding: 5px 10px;
    cursor: pointer;
}


/**************Настройки API**************/
p.api-key-description {
    font-size: 12px !important; /* Уменьшено с 12px */
}

/* Настройки полей обучающих моделей */
.ai-content-wizard-rename {
    display: flex;
    align-items: center;
    gap: 8px; /* Уменьшено с 10px */
}

.ai-content-wizard-rename select,
.ai-content-wizard-rename input[type="text"] {
    flex-grow: 1;
}

input#new_model_name {
    width: 40%; /* Уменьшено с 50% */
}

button#rename_model {
    padding: 8px; /* Уменьшено с 10px */
    width: 8%; /* Уменьшено с 10% */
    font-weight: 700; /* Уменьшено с 800 */
    background: #fc0;
    color: #000;
    font-size: 14px; /* Добавлено для уменьшения размера */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
}

/* .ai-content-wizard-rename input[type="text"] {
    max-width: 200px; 
} */

.ai-content-wizard-rename button {
    background-color: #ffcc00;
    color: #000;
    padding: 6px 12px; /* Уменьшено с 8px 15px */
    font-size: 12px; /* Уменьшено с 14px */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-align: center;
}

/* Основные стили страницы настроек */
.ai-content-wizard-settings {
    background: linear-gradient(135deg, #6ddb90 0%, #35a79c 100%);
    padding: 16px; /* Уменьшено с 20px */
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    color: #fff;
    font-family: Arial, sans-serif;
    font-size: 14px; /* Добавлено для уменьшения базового размера шрифта */
}

.ai-content-wizard-settings h1 {
    color: #ffffff;
    margin-bottom: 16px; /* Уменьшено с 20px */
    font-size: 1.6em; /* Уменьшено с стандартного размера */
}

/* Стили для таблицы формы */
.ai-content-wizard-settings table {
    width: 100%;
    border-spacing: 0;
    border-collapse: collapse;
    font-size: 14px; /* Уменьшено с 16px */
}

p.api-key-description {
    color: #7705d4;
    font-size: 10px; /* Уменьшено с предыдущего 12px */
}

.ai-content-wizard-settings table th,
.ai-content-wizard-settings table td {
    padding: 8px; /* Уменьшено с 10px */
    vertical-align: top;
    font-size: 14px; /* Добавлено для уменьшения размера шрифта */
}

.ai-content-wizard-settings table th {
    text-align: left;
    font-weight: bold;
}

.ai-content-wizard-settings table td {
    font-size: 12px; /* Уменьшено с 14px */
}

/* Стилизация текстовых полей и выпадающих списков */
.ai-content-wizard-settings input[type="text"],
.ai-content-wizard-settings select {
    width: 100%;
    padding: 6px; /* Уменьшено с 8px */
    border-radius: 4px;
    border: 1px solid #ddd;
    font-size: 14px; /* Уменьшено с 16px */
}

/* Стили кнопки */
.ai-content-wizard-settings input[type="submit"] {
    background-color: #4CAF50;
    color: white;
    padding: 8px 16px; /* Уменьшено с 10px 20px */
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px; /* Уменьшено с 16px */
    font-weight: 700; /* Добавлено для более четкого отображения текста */
}

.ai-content-wizard-settings input[type="submit"]:hover {
    background-color: #45a049;
}


/* ------------------ Active provider ------------------ */

	
/* ------------------ Tabs ------------------ */
.aiw-tabs {
    display: flex;
    gap: 8px; /* Расстояние между табами */
    background: #fff; /* Белый фон для всей панели табов */
    padding: 5px 10px; /* Меньше внутреннего отступа для компактности */
    border-radius: 8px 8px 0 0; /* Скругление только сверху */
    position: relative;
    z-index: 2; /* Табы выше контента */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); /* Лёгкая тень под табами */
}
.aiw-tab-button {
    display: flex;
    align-items: center; /* Выравнивание иконки и текста */
    padding: 12px 20px;
    border: 2px solid #e0e0e0; /* Нейтральная окантовка для всех табов */
    background: #f8f9fa; /* Очень светло-серый фон для неактивных табов */
    color: #555; /* Тёмно-серый текст для контраста */
    cursor: pointer;
    border-radius: 6px 6px 0 0; /* Скругление только сверху */
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05); /* Лёгкая тень */
    transition: all 0.3s ease; /* Плавные переходы */
    font-size: 15px;
    font-weight: 500;
    position: relative; /* Для индикатора активного таба */
}
.aiw-tab-button:hover {
    background: #f0f2f5; /* Ещё более светлый серый при наведении */
    border-color: #b0b0b0; /* Более тёмная окантовка при наведении */
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    color: #333; /* Тёмнее текст при наведении */
}
.aiw-tab-button:hover svg {
    stroke: #333; /* Тёмно-серый цвет иконки при наведении */
}
.aiw-tab-button.active {
    background: #fff; /* Белый фон для активного таба */
    color: #2196F3; /* Синий текст для акцента */
    border-color: #2196F3; /* Синяя окантовка для активного таба */
    font-weight: 600;
    box-shadow: 0 3px 8px rgba(33, 150, 243, 0.2); /* Тень с синим акцентом */
    z-index: 3; /* Активный таб выше остальных */
}
.aiw-tab-button.active svg {
    stroke: #2196F3; /* Синий цвет иконки для активного таба */
}
.aiw-tab-content {
    display: none;
    background: #fff;
    padding: 25px;
    border-radius: 0 0 8px 8px; /* Скругление только снизу */
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05); /* Лёгкая тень под контентом */
    border: 2px solid #e0e0e0; /* Нейтральная окантовка для контента */
    border-top: none; /* Убираем верхнюю границу, чтобы сливалось с табами */
    margin-top: -2px; /* Убираем промежуток между табами и контентом */
    position: relative;
    z-index: 1; /* Контент ниже табов */
}

.aiw-tab-button.active {
    animation: tabActive 0.3s ease-in-out;
}
@keyframes tabActive {
    from { transform: scale(1); background: #f5f7fa; border-color: #e0e0e0; }
    to { transform: scale(1.02); background: #e3f2fd; border-color: #1e88e5; }
}


.aiw-tab-content.active {
    display: block;
    animation: slideIn 0.3s ease-in-out;
}
@keyframes slideIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* ------------------ Radio Buttons ------------------ */
/* ------------------ Radio Buttons ------------------ */
.aiw-radio-group {
    display: flex;
    flex-wrap: wrap;
    gap: 16px; /* Увеличиваем отступы между кнопками для большей читаемости */
    margin: 20px 0; /* Больше пространства вокруг группы */
    font-family: "Inter", sans-serif; /* Оставляем современный шрифт */
}

.aiw-radio-group input[type="radio"] {
    display: none; /* Без изменений */
}

.aiw-radio-group label {
    display: inline-block;
    padding: 10px 20px; /* Увеличиваем padding для более выразительных кнопок */
    border: 1px solid #d1d9e6; /* Легкий голубоватый оттенок для границы */
    border-radius: 5px; /* Более округлые углы */
    background: linear-gradient(135deg, #dfe7fd, #c7d2fe); /* Яркий и интересный градиент: от светло-голубого к лавандовому */
    color: #1e293b; /* Темно-синий текст для контраста */
    cursor: pointer;
    transition: all 0.3s ease; /* Плавные переходы */
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1); /* Чуть заметная тень */
    font-size: 14px;
    font-weight: 500;
    margin: 3px 5px;
}

.aiw-provider-card {
    position: relative;
    gap: 8px;
}

.aiw-provider-card.aiw-locked {
    opacity: 0.55;
    cursor: not-allowed;
}

.aiw-lock-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: #ffdbdb;
    color: #b30000;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.aiw-provider-note {
    display: block;
    font-size: 11px;
    color: #555;
}

.aiw-upgrade-hint {
    margin: 16px 0;
    padding: 16px;
    border: 1px dashed #f39c12;
    border-radius: 8px;
    background: #fffaf2;
}

.aiw-upgrade-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 6px;
    background: linear-gradient(135deg, #ff7e5f, #feb47b);
    color: #fff;
    font-weight: 600;
    text-decoration: none;
    transition: opacity 0.2s ease;
}

.aiw-upgrade-cta:hover {
    opacity: 0.85;
}

.aiw-active-selection {
    margin: 20px 0;
    padding: 18px 22px;
    border-radius: 16px;
    background: linear-gradient(135deg, #f5f7ff, #eef7ff);
    border: 1px solid #dfe6ff;
    color: #0f172a;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.aiw-active-selection__label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: #475569;
    margin-bottom: 8px;
}

.aiw-active-selection__value {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}

.aiw-active-selection__meta {
    margin: 0;
    font-size: 14px;
    color: #334155;
}

.aiw-active-selection__meta span {
    font-weight: 600;
    color: #0f172a;
}

.aiw-active-text-model {
    border-left: 4px solid #22c55e;
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.08), rgba(34, 197, 94, 0.02));
}

.aiw-active-image-model {
    border-left: 4px solid #3b82f6;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(59, 130, 246, 0.02));
}

.aiw-radio-group input[type="radio"]:checked + label {
    background: linear-gradient(135deg, #7c3aed, #4f46e5); /* Яркий фиолетово-синий градиент для выбранного состояния */
    color: #ffffff; /* Белый текст */
    border-color: #6d28d9; /* Граница в тон градиенту */
    box-shadow: 0 5px 15px rgba(124, 58, 237, 0.4); /* Более насыщенная тень */
    transform: scale(1.02); /* Легкое увеличение при выборе */
}

.aiw-radio-group input[type="radio"][disabled] + label {
    opacity: 0.45;
    filter: blur(0.35px);
    cursor: not-allowed;
    box-shadow: none;
    position: relative;
}

.aiw-radio-group input[type="radio"][disabled] + label::after {
    content: '\1F512';
    position: absolute;
    top: 8px;
    right: 12px;
    font-size: 14px;
    color: rgba(15, 23, 42, 0.45);
}

.aiw-radio-group label:hover {
    background: linear-gradient(135deg, #c7d2fe, #a5b4fc); /* При наведении усиливаем яркость */
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.15); /* Тень чуть сильнее */
    transform: translateY(-2px); /* Подъем при наведении */
}

.aiw-radio-group label.unavailable {
    background: linear-gradient(135deg, #e5e7eb, #d1d5db); /* Серый градиент для недоступных, но не скучный */
    color: #6b7280; /* Мягкий серый текст */
    border-color: #d1d5db; /* Согласованная граница */
    cursor: not-allowed;
    box-shadow: none; /* Без тени для недоступных */
    opacity: 0.8; /* Легкая прозрачность для акцента */
}

	/* ------------------ Floating Status Window ------------------ */
	.aiw-floating-status {
		position: fixed;
		left: 55%;
		transform: translateX(-50%);
		bottom: 20px;
		background: rgba(255, 255, 224, 0.8);
		border: 1px solid #ccc;
		padding: 10px 20px;
		border-radius: 8px;
		box-shadow: 0 0 10px rgba(0,0,0,0.2);
		max-width: 600px;
		z-index: 9999;
		font-size: 14px;
	}
	.aiw-floating-status-header {
		cursor: pointer;
		display: flex;
		justify-content: space-between;
		align-items: center;
	}
	.aiw-floating-status-header h4 {
		margin: 0;
		font-size: 18px;
	}
	/* Содержимое окна по умолчанию скрыто */
	.aiw-floating-status-content {
		margin-top: 8px;
		display: none;
	}
	/* Правило для unsaved-метки, как было ранее */
	.aiw-status-item .aiw-unsaved {
		color: #FF5722;
		font-weight: bold;
		margin-left: 6px;
	}
	/* ------------------ Modal Windows ------------------ */
	.ai-content-wizard-modal {
		display: none;
		position: fixed;
		z-index: 1000;
		left: 0;
		top: 0;
		width: 100%;
		height: 100vh;
		background-color: rgba(0,0,0,0.5);
		align-items: center;
		justify-content: center;
		padding: 0;
	}
	.ai-content-wizard-modal-content {
		background: #fff;
		border-radius: 10px;
		border: 2px solid #868686;
		padding: 20px;
		width: 50%;
		max-width: 650px;
		box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 6px 20px rgba(0, 0, 0, 0.1);
		position: relative;
		animation: fadeIn 0.3s;
		color: #000;
	}
	@keyframes fadeIn {
		from { opacity: 0; }
		to { opacity: 1; }
	}
	.ai-content-wizard-close {
		position: absolute;
		right: 15px;
		top: 15px;
		font-size: 1.5rem;
		cursor: pointer;
	}
	.ai-content-wizard-close:hover {
		color: #f00;
	}
	.ai-content-wizard-modal-content h2 {
		margin-top: 0;
		font-size: 24px;
		margin-bottom: 10px;
	}

	/* ------------------ Modern "Show available models" Button ------------------ */
	.aiw-models-button {
		background: linear-gradient(135deg, #6a11cb, #2575fc);
		border: none;
		border-radius: 4px;
		color: #fff;
		padding: 10px 20px;
		font-size: 16px;
		cursor: pointer;
		transition: background 0.3s ease, transform 0.3s ease;
		box-shadow: 0 2px 4px rgba(0,0,0,0.2);
	}
	.aiw-models-button:hover {
		background: linear-gradient(135deg, #5a0ebd, #1f65e2);
		transform: scale(1.05);
	}

	/* ------------------ Pulsating Effect for Floating Window Header ------------------ */
	@keyframes pulsate {
		0% { transform: scale(1); }
		50% { transform: scale(1.05); }
		100% { transform: scale(1); }
	}
	.aiw-floating-status-header.pulsate h4 {
		animation: pulsate 1.5s infinite;
		color: #FF5722;
	}

	/* ------------------ New styles for model groups and badges ------------------ */
	.model-group {
		margin-top: 15px;
		padding: 10px;
		border: 1px dashed #ccc;
		border-radius: 4px;
		width: 100%;
	}
	.model-group-title {
		font-weight: bold;
		margin-bottom: 10px;
	}
	.badge-recommended {
		background-color: #4caf50;
		color: #fff;
		font-size: 10px;
		padding: 2px 6px;
		border-radius: 3px;
		margin-left: 5px;
		vertical-align: middle;
	}
	.badge-new {
		background-color: #ff9800;
		color: #fff;
		font-size: 10px;
		padding: 2px 6px;
		border-radius: 3px;
		margin-left: 5px;
		vertical-align: middle;
	}
	.badge-reasoner {
		background-color: #9c27b0;
		color: #fff;
		font-size: 10px;
		padding: 2px 6px;
		border-radius: 3px;
		margin-left: 5px;
		vertical-align: middle;
	}
	
	/* ------------------ стили кнопок выбора провайдера ------------------ */	
    .aiw-radio-group input[type="radio"]:checked + label {
        border-color: currentColor; /* Используем цвет текста (фирменный цвет провайдера) */
        box-shadow: 7px 5px 17px rgb(0 0 0 / 57%) !important;
        transform: translateY(-4px);
    }

    .aiw-radio-group label:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);
    }	