/**************************************************
 * Общий контейнер
 **************************************************/
.ai-content-plan-wrapper {
    background: linear-gradient(135deg, #6ddb90 0%, #35a79c 100%);
    padding: 20px;
    border-radius: 8px;
	margin-right: 20px;
}

/**************************************************
 * Вкладки (табы)
 **************************************************/
        .ai-content-plan-tabs {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 15px 20px;
            background: #ffffff75;
            border-bottom: 1px solid #d1d9e6;
            border-radius: 8px 8px 0 0;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
        }

        .tabs-list {
            display: flex;
            list-style: none;
            margin: 0;
            padding: 0;
        }

        .tab-link {
            display: flex;
            align-items: center;
            padding: 12px 18px;
            margin-right: 10px;
            cursor: pointer;
            font-size: 16px;
            font-weight: 600;
            color: #4b5563;
            background: #ffffff;
            border-radius: 8px;
            box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
            transition: all 0.3s ease;
        }

        .tab-icon {
            width: 24px;
            height: 24px;
            margin-right: 10px;
            /* fill: #6b7280; */
            transition: fill 0.3s ease;
        }

        .tab-link:hover {
            background: #e5e7eb;
            color: #1f2937;
        }

        .tab-link.current {
            background: #3b82f6;
            color: #ffffff;
            box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
        }

        .tab-link.current .tab-icon {
            fill: #ffffff;
        }

        /* Стили для информации в шапке */
        .header-info {
            display: flex;
            align-items: center;
            gap: 15px;
        }

        .status-indicator {
            position: relative;
            display: flex;
            align-items: center;
            padding: 6px 12px;
            background: #ffffff;
            border-radius: 20px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            transition: all 0.3s ease;
        }

        .status-dot {
            width: 8px;
            height: 8px;
            border-radius: 50%;
            margin-right: 6px;
            transition: background 0.3s ease;
        }

        .status-indicator.running .status-dot {
            background: #22c55e;
        }

        .status-indicator.stopped .status-dot {
            background: #ef4444;
        }

        .status-text {
            font-size: 13px;
            font-weight: 500;
            color: #374151;
        }

        .status-tooltip {
            display: none;
            position: absolute;
            top: 100%;
            right: 0;
            margin-top: 8px;
            padding: 8px 12px;
            background: #1f2937;
            color: #ffffff;
            font-size: 12px;
            border-radius: 6px;
            box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
            white-space: nowrap;
            z-index: 10;
        }

        .status-indicator:hover .status-tooltip {
            display: block;
        }

        .details-btn {
            margin-left: 10px;
            padding: 4px 10px;
            font-size: 12px;
            font-weight: 500;
            color: #3b82f6;
            background: #dbeafe;
            border-radius: 12px;
            text-decoration: none;
            transition: all 0.3s ease;
            cursor: pointer;
        }

        .details-btn:hover {
            background: #bfdbfe;
            color: #1e40af;
        }

        /* Стили для часов */
        .modern-clock {
            display: flex;
            flex-direction: column;
            align-items: flex-end;
            font-family: 'Segoe UI', Arial, sans-serif;
            padding: 8px 12px;
            background: #ffffff;
            border-radius: 8px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
            border: 1px solid #e5e7eb;
        }

        .clock-date {
            font-size: 12px;
            color: #6b7280;
            font-weight: 500;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .clock-date #day {
            color: #3b82f6;
        }

        .clock-time {
            display: flex;
            align-items: center;
            margin-top: 3px;
        }

        .clock-time span {
            font-size: 20px;
            font-weight: 600;
            color: #1f2937;
            min-width: 22px;
            text-align: center;
        }

        .clock-time .colon {
            font-size: 18px;
            color: #6b7280;
            margin: 0 2px;
            animation: blink 1s infinite;
        }

        .clock-time #hours,
        .clock-time #minutes,
        .clock-time #seconds {
            padding: 2px 4px;
            background: #f1f5f9;
            border-radius: 4px;
            transition: all 0.2s ease;
        }

        .clock-time #hours:hover,
        .clock-time #minutes:hover,
        .clock-time #seconds:hover {
            background: #dbeafe;
            color: #1e40af;
        }

        @keyframes blink {
            0%, 100% { opacity: 1; }
            50% { opacity: 0.3; }
        }


/**************************************************
 * Содержимое вкладок
 **************************************************/
.tab-content {
    display: none;
    /* background: #ffffff82; */
    border-radius: 6px;
    padding: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

.tab-content.current {
    display: block;
}

.tab-content-inner {
    margin: 0;
}

.tab-description {
    margin-bottom: 12px;
    font-size: 14px;
    color: #666;
}

/**************************************************
 * Заголовки
 **************************************************/
.page-title {
    margin: 0;
    margin-bottom: 20px;
    font-size: 24px;
    line-height: 1.4;
    color: #333;
}

/**************************************************
 * Общие элементы формы
 **************************************************/
.ai-content-plan-form {
    margin: 0;
    padding: 0;
    width: 100%;
}

/* Ряды формы */
.form-row {
    margin-bottom: 15px;
    display: flex;
    flex-direction: column;
    max-width: 400px; 
}

.form-row label {
    font-weight: 500;
    margin-bottom: 6px;
    color: #333;
}

.form-row input[type="text"],
.form-row input[type="number"],
.form-row input[type="datetime-local"],
.form-row select {
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

.checkbox-row {
    flex-direction: row;
    align-items: center;
}

.checkbox-row .switch {
    margin-right: 10px;
}

/* Кнопка сохранения */
.save-button-row {
    margin-top: 15px;
}

/**************************************************
 * Switch (тумблер)
 **************************************************/
.switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 22px;
  margin-right: 8px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* Ползунок */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0; left: 0; right: 0; bottom: 0;
  background-color: #aaa;
  transition: .4s;
  border-radius: 22px;
}

.slider:before {
  position: absolute;
  content: "";
  height: 16px;
  width: 16px;
  left: 3px;
  bottom: 3px;
  background-color: #fff;
  transition: .4s;
  border-radius: 50%;
}

input:checked + .slider {
  background: linear-gradient(135deg, #3e60fe 0%, #35a79c 100%);
}

input:checked + .slider:before {
  transform: translateX(18px);
}

/**************************************************
 * Короткая сводка выбранных категорий
 **************************************************/
.categories-summary {
    background: #e7fbe7;
    border: 1px solid #cef2d1;
    border-radius: 6px;
    padding: 10px 15px;
    margin-bottom: 20px;
}

        .category-grid {
            display: grid;
            grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
            gap: 15px;
            list-style: none;
            padding: 0;
            margin: 15px 0 0;
        }

		.category-item {
			display: flex;		;
			justify-content: space-between;
			align-items: center;
			padding: 5px 15px;
			background: #ffffffbf;
			border-radius: 10px;
			box-shadow: 0 2px 5px rgba(0, 0, 0, 0.08);
			transition: transform 0.2sease, box-shadow 0.2sease;
		}

        .category-item:hover {
            transform: translateY(-2px);
            box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
        }

        .category-name {
            font-size: 15px;
            font-weight: 600;
            color: #1f2937;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 60%;
        }

        .frequency-bubble {
            display: inline-flex;
            align-items: center;
            padding: 6px 12px;
            font-size: 13px;
            font-weight: 500;
            color: #3b82f6;
            background: #dbeafe;
            border-radius: 20px;
            white-space: nowrap;
        }

        /* Адаптивность */
        @media (max-width: 768px) {
            .category-grid {
                grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
                gap: 10px;
            }

            .category-item {
                padding: 10px 12px;
            }

            .category-name {
                font-size: 14px;
                max-width: 50%;
            }

            .frequency-bubble {
                padding: 5px 10px;
                font-size: 12px;
            }
        }

        @media (max-width: 480px) {
            .category-grid {
                grid-template-columns: 1fr;
            }

            .category-item {
                flex-direction: column;
                align-items: flex-start;
                padding: 12px;
            }

            .category-name {
                max-width: 100%;
                margin-bottom: 8px;
            }

            .frequency-bubble {
                padding: 4px 8px;
            }
        }

/**************************************************
 * Блок других настроек (General Settings)
 **************************************************/
.other-settings-block {
    background: #fefefe;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 15px 20px;
    margin-bottom: 20px;
}

.other-settings-block h2 {
    margin-top: 0;
    font-size: 18px;
    margin-bottom: 12px;
}

/**************************************************
 * Статистика плана
 **************************************************/
.plan-stats p {
    font-size: 14px;
    color: #555;
    line-height: 1.4;
    margin: 6px 0 0;
}

/**************************************************
 * План/таблица и кнопки
 **************************************************/
    .plan-controls-and-table {
        padding: 20px;
        background: #f9fafb;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    .plan-actions {
        display: flex;
        justify-content: center;
        margin-bottom: 20px;
    }

    #start_stop_generation.plan-btn {
        display: flex;
        align-items: center;
        padding: 14px 28px;
        font-size: 18px;
        font-weight: 600;
/*         color: #ffffff; */
        border: none;
        border-radius: 12px;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
    }

    #start_stop_generation.plan-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
    }

    #start_stop_generation.start-state {
        background: linear-gradient(45deg, #10b981, #d1fa4d, #bef264);
        background-size: 200% 200%;
        animation: gradientFlowStart 6s ease infinite;
    }

    #start_stop_generation.stop-state {
        background: linear-gradient(45deg, #faeb15, #df8e03, #80d11f);
        background-size: 200% 200%;
        animation: gradientFlowStop 6s ease infinite;
    }

    #start_stop_generation.start-state:hover,
    #start_stop_generation.stop-state:hover {
        background-position: 100% 100%;
    }

    @keyframes gradientFlowStart {
        0% { background-position: 0% 50%; }
        50% { background-position: 100% 50%; }
        100% { background-position: 0% 50%; }
    }

    @keyframes gradientFlowStop {
        0% { background-position: 0% 50%; }
        50% { background-position: 100% 50%; }
        100% { background-position: 0% 50%; }
    }

    #start_stop_generation .icon-svg {
        width: 24px;
        height: 24px;
        margin-right: 10px;
        fill: #ffffff;
    }

    #start_stop_generation .play-pause-icon .play-path,
    #start_stop_generation .play-pause-icon .pause-path {
        transition: opacity 0.3s ease;
    }

    #start_stop_generation[data-is-running="true"] .play-path {
        opacity: 0;
    }

    #start_stop_generation[data-is-running="true"] .pause-path {
        opacity: 1;
    }

    #start_stop_generation[data-is-running="false"] .pause-path {
        opacity: 0;
    }

    #start_stop_generation[data-is-running="false"] .play-path {
        opacity: 1;
    }

    .generation-hint {
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
        color: #6b7280;
        margin-bottom: 20px;
    }

    .hint-icon {
        width: 16px;
        height: 16px;
        margin-right: 6px;
        fill: #6b7280;
    }

    .plan-status {
        background: #ffffff;
        padding: 20px;
        border-radius: 10px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    }

    .status-header {
        display: flex;
        align-items: center;
        margin-bottom: 15px;
    }

    .status-icon {
        width: 24px;
        height: 24px;
        margin-right: 10px;
        fill: #3b82f6;
    }

    .status-header h3 {
        font-size: 18px;
        font-weight: 600;
        color: #1f2937;
        margin: 0;
    }

    .status-details {
        font-size: 14px;
        color: #4b5563;
    }

    .status-details p {
        margin: 8px 0;
        display: flex;
        align-items: center;
        gap: 8px;
    }

    .detail-label {
        font-weight: 500;
        color: #374151;
        min-width: 120px;
    }

    .highlight {
        font-weight: 600;
        color: #3b82f6;
        background: #dbeafe;
        padding: 2px 8px;
        border-radius: 6px;
    }

    .no-articles, .stopped-message {
        font-style: italic;
        color: #6b7280;
    }

    .no-content-plan {
        text-align: center;
        padding: 30px;
        background: #f9fafb;
        border-radius: 8px;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    }

    .no-content-plan p {
        font-size: 16px;
        color: #4b5563;
        margin-bottom: 20px;
    }

    /* Адаптивность */
    @media (max-width: 768px) {
        #start_stop_generation.plan-btn {
            padding: 12px 20px;
            font-size: 14px;
        }

        #start_stop_generation .icon-svg {
            width: 20px;
            height: 20px;
        }

        .status-header h3 {
            font-size: 16px;
        }

        .status-details {
            font-size: 13px;
        }

        .detail-label {
            min-width: 100px;
        }
    }

    @media (max-width: 480px) {
        .plan-status {
            padding: 15px;
        }

        .status-details p {
            flex-direction: column;
            align-items: flex-start;
            gap: 4px;
        }

        .detail-label {
            min-width: unset;
        }
    }

/**************************************************
 * Статус
 **************************************************/
.plan-status {
    background: #f7f7f7;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    margin-bottom: 15px;
    font-size: 14px;
    color: #333;
}

.plan-status p {
    margin: 5px 0;
    padding-bottom: 5px;
    border-bottom: 1px solid #eee;
}

.plan-status p:last-child {
    border-bottom: none;
    background: #e1f5e2;
    border: 1px solid #cde2ce;
    color: #2d6b2b;
    padding: 8px;
    margin-top: 5px;
    font-weight: 600;
}

/**************************************************
 * Часы (digital-clock)
 **************************************************/
.clock {
    margin: 0 auto 15px auto;
    background: #4E5D6C;
    color: #fff;
    border-radius: 6px;
    text-align: center;
    padding: 10px;
    width: 220px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.clock .date {
    font-size: 12px;
    margin-bottom: 4px;
    font-weight: 300;
    letter-spacing: 1px;
}

.clock .time {
    font-size: 24px;
    font-weight: bold;
    line-height: 1.2;
    letter-spacing: 2px;
}

.clock .colon {
    margin: 0 2px;
}

.clock .labels {
    margin-top: 4px;
}

.clock .labels label {
    font-size: 8px;
    color: #cfd8dc;
    margin-right: 5px;
}

/**************************************************
 * Таблица контент-плана
 **************************************************/
#content_plan_table_container table.wp-list-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 10px;
}

#content_plan_table_container thead {
    background: #f2f2f2;
}

#content_plan_table_container th,
#content_plan_table_container td {
    border: 1px solid #ddd;
    padding: 8px 10px;
    font-size: 13px;
    text-align: center;
    vertical-align: middle;
}

#content_plan_table_container th {
    font-weight: 600;
    color: #333;
}

/* Редактирование */
.editable-value {
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.edit-icon {
    width: 16px;
    height: 16px;
    display: inline-block;
    background: url('data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjNjdkYjkwIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMiAyMC42MmwuNzggNC41NyA0LjU3LS43OSA5LjQtOS40M2MuNTMtLjUzLjgtMS64NC4wNy0yLjU3bC02LjY4LTYuNjhjLS43My0uNzMtMS44My0uNDYtMi41Ny4wNy05LjQgOS40Mi0uNzkgNC41Ny0uNzkgNC41N3pNMjIuNzUgNy4xMWwtNS40Ni01LjQ2Yy0uNzYtLjc2LTEuOTktLjc2LTIuNzUgMGwtMi4zMyAyLjMzIDguMjggOC4yMyAyLjMzLTIuMzNjLjc2LS43Ni43Ni0xLjk5IDAtMi43NXoiLz48L3N2Zz4=')
        no-repeat center center;
    background-size: 16px 16px;
}

.icon-disabled {
    background: url('data:image/svg+xml;base64,PHN2ZyBmaWxsPSIjY2NjIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxNiIgaGVpZ2h0PSIxNiIgdmlld0JveD0iMCAwIDI0IDI0Ij48cGF0aCBkPSJNMiAyMC42MmwuNzggNC41NyA0LjU3LS43OSA5LjQtOS40M2MuNTMtLjUzLjgtMS44NC4wNy0yLjU3bC02LjY4LTYuNjhjLS43My0uNzMtMS44My0uNDYtMi41Ny4wNy05LjQgOS40Mi0uNzkgNC41Ny0uNzkgNC41N3pNMjIuNzUgNy4xMWwtNS40Ni01LjQ2Yy0uNzYtLjc2LTEuOTktLjc2LTIuNzUgMGwtMi4zMyAyLjMzIDguMjggOC4yMyAyLjMzLTIuMzNjLjc2LS43Ni43Ni0xLjk5IDAtMi43NXoiLz48L3N2Zz4=')
        no-repeat center center !important;
    background-size: 16px 16px !important;
}

/* Инпут при редактировании */
.editable-input {
    width: 100%;
    border: 1px solid #ccc;
    padding: 4px 6px;
    font-size: 13px;
    border-radius: 4px;
}

/**************************************************
 * Кнопки в таблице (Delete, Replace, Generate Now)
 **************************************************/
.action-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 10px;
    background: linear-gradient(135deg, #6ddb90 0%, #35a79c 100%);
    border: none;
    border-radius: 4px;
    color: #fff;
    font-weight: 600;
    font-size: 12px;
    cursor: pointer;
    margin: 2px;
    transition: background 0.3s ease;
}

.action-btn:hover {
    background: linear-gradient(135deg, #58c172 0%, #2c9584 100%);
}

.action-btn:disabled {
    background: #ccc;
    color: #666;
    cursor: not-allowed;
}

.action-btn .icon-svg {
    width: 16px;
    height: 16px;
}

/**************************************************
 * Кнопка добавления новой темы
 **************************************************/
#content_plan_table_container button#addNewRow.addnewtheme {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background: linear-gradient(135deg, #ffdc15 0%, #d48a06 100%);
    color: #fff;
    border: none;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 6px;
    transition: background-color 0.3s ease;
}

#content_plan_table_container button#addNewRow:hover {
    background: linear-gradient(135deg, #f8c90c 0%, #b86c04 100%);
}

/**************************************************
 * Прелоадер (модальное окно)
 **************************************************/
#preload {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 9999;
    display: none; /* показывать при необходимости */
}

#preload .preloader-content {
    position: relative;
    width: 320px;
    margin: 10% auto;
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
}

#preload h2 {
    margin-top: 0;
    color: #333;
}

#preload #subtitle {
    font-size: 14px;
    color: #666;
    margin-bottom: 10px;
}

#timer {
    font-size: 18px;
    margin: 10px 0;
    font-weight: bold;
}

/* Лоадер */
.ai-loader {
    display: flex;
    gap: 6px;
    justify-content: center;
    margin: 15px 0;
}

.ai-dot {
    width: 12px;
    height: 12px;
    background: #35a79c;
    border-radius: 50%;
    animation: loadingPulse 0.8s infinite alternate;
}

.ai-dot:nth-child(2) {
    animation-delay: 0.2s;
}
.ai-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loadingPulse {
    from { transform: scale(1); }
    to { transform: scale(1.5); }
}

/**************************************************
 * Вкладка Categories
 **************************************************/
#tab-categories .ai-content-plan-categories-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
}

.category-item {
    background: #fafafa;
    border: 1px solid #eee;
    border-radius: 6px;
    padding: 10px;
    flex: 1 1 220px;
    max-width: 340px;
    box-sizing: border-box;
    position: relative;
}

.category-item label {
    cursor: pointer;
}

.category-info {
    display: flex;
    flex-direction: column;
    margin-top: 4px;
}

.category-info label {
    font-size: 14px;
    margin-bottom: 4px;
    color: #333;
}

.category-info input[type="number"] {
    max-width: 100px;
    margin-bottom: 4px;
}

.category-message {
    margin-top: 4px;
    font-size: 12px;
    color: #d71d1d;
}

/**************************************************
 * Адаптив
 **************************************************/
@media (max-width: 768px) {
    .form-row {
        max-width: 100%;
    }

    .plan-actions {
        flex-direction: column;
    }

    .plan-btn {
        width: 100%;
        justify-content: center;
    }

    .ai-content-plan-categories-grid {
        flex-direction: column;
        gap: 12px;
    }

    .category-item {
        max-width: 100%;
    }
}












/*******************************************  05.03.2025 ********************************************************/
/********** Основной блок настроек ***********************/
/* Стили для блока настроек */
.other-settings-block {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    max-width: 100%;
    margin: 0 auto;
}

.header-with-tooltip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.other-settings-block h2 {
    font-size: 22px;
    color: #1a1a1a;
    margin: 0;
    font-weight: 600;
}

.info-icon {
    width: 18px;
    height: 18px;
    fill: #666;
    cursor: pointer;
    transition: fill 0.3s ease;
}

.info-icon:hover {
    fill: #007bff;
}

/* Сетка для основных полей */
.form-grid {
    display: flex;
    gap: 16px;
    margin-bottom: 16px;
    flex-wrap: wrap;
}

.form-row {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #e6f7e6;
    padding: 8px 12px;
    border-radius: 8px;
    flex: 1;
    min-width: 200px;
    flex-direction: row;
    justify-content: space-between;
}

.form-row label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
    white-space: nowrap;
}

.form-icon {
    width: 18px;
    height: 18px;
    fill: #666;
    transition: fill 0.3s ease;
}

.form-row:hover .form-icon {
    fill: #007bff;
}

.form-row select,
.form-row input[type="number"] {
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    width: 200px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-row select:focus,
.form-row input:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
    outline: none;
}

/* Чекбокс */
.switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 18px;
    flex-shrink: 0;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 18px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #007bff;
}

input:checked + .slider:before {
    transform: translateX(18px);
}

/* Поле для дополнительных запросов (textarea) */
.form-row.full-width {
    flex-direction: column;
    align-items: flex-start;
    background: #f9f9f9;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 16px;
    max-width: 100%;
}

.label-with-tooltip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.form-row.full-width textarea {
    width: 100%;
    resize: vertical;
    min-height: 80px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-row textarea:focus {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
    outline: none;
}

/* Статистика */
.plan-stats {
    background: #e6f7e6;
    border-radius: 8px;
    padding: 12px;
    color: #333;
}

.stats-content {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stats-icon {
    width: 24px;
    height: 24px;
    fill: #333;
}

.plan-stats p {
    margin: 0;
    font-size: 14px;
    line-height: 1.4;
    color: #333;
}










/************************** Таблица контент плана ****************************/
/* Обертка таблицы */
.content-plan-table-wrapper {
    overflow-x: auto;
    margin: 20px 0;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 10px;
}

/* Основные стили таблицы */
.content-plan-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    color: #333;
}

.content-plan-table th,
.content-plan-table td {
    padding: 12px 16px;
    text-align: left;
    vertical-align: middle;
}

/* Заголовки */
.content-plan-table thead th {
    background: #f5f5f5;
    font-weight: 600;
    color: #1a1a1a;
    border-bottom: 2px solid #ddd;
}

/* Ширина колонок */
.col-number { width: 5%; }
.col-category { width: 15%; }
.col-topic { width: 25%; }
.col-keyword { width: 20%; }
.col-date { width: 20%; }
.col-status { width: 10%; }
.col-actions { width: 15%; }

/* Строки */
.content-plan-table tbody tr {
    border-bottom: 1px solid #eee;
    transition: background 0.3s ease;
}

.content-plan-table tbody tr:hover {
    background: #f9f9f9;
}

/* Редактируемые поля */
.editable {
    position: relative;
    cursor: pointer;
}

.editable-value {
    display: flex;
    align-items: center;
    gap: 8px;
}

.edit-icon {
    width: 16px;
    height: 16px;
    fill: #666;
    opacity: 0;
    transition: opacity 0.3s ease, fill 0.3s ease;
}

.editable:hover .edit-icon:not(.icon-disabled) {
    opacity: 1;
}

.edit-icon.icon-disabled {
    fill: #ccc;
    cursor: not-allowed;
}

.editable-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

/* Статусы */
.status-label {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    text-transform: uppercase;
}

.status-waiting { background: #fff3e0; color: #f57c00; }
.status-published { background: #e6f7e6; color: #2e7d32; }
.status-generated { background: #e8f5e9; color: #4caf50; }
.status-missed { background: #ffebee; color: #d32f2f; }

.view-link {
    color: #007bff;
    text-decoration: none;
    font-size: 12px;
}

.view-link:hover {
    text-decoration: underline;
}

/* Кнопки действий */
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.action-btn {
    position: relative;
    width: 32px;
    height: 32px;
    border: none;
    border-radius: 50%;
    background: none;
    cursor: pointer;
    transition: background 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.action-btn svg {
    width: 18px;
    height: 18px;
    fill: #666;
    transition: fill 0.3s ease;
}

.action-btn.delete-content { background: rgba(211, 47, 47, 0.1); }
.action-btn.delete-content svg { fill: #d32f2f; }
.action-btn.replace-content { background: rgba(251, 192, 45, 0.1); }
.action-btn.replace-content svg { fill: #fbc02d; }
.action-btn.generate-now { background: rgba(46, 125, 50, 0.1); }
.action-btn.generate-now svg { fill: #2e7d32; }

.action-btn:hover:not([disabled]) {
    background: rgba(0, 0, 0, 0.1);
}

.action-btn:hover svg:not([disabled]) {
    fill: #333;
}

.action-btn[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Tooltip для кнопок */
.action-btn .tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: #fff;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease;
    pointer-events: none;
    margin-bottom: 4px;
}

.action-btn:hover .tooltip {
    opacity: 1;
    visibility: visible;
}

/* Кнопка "Add New Topic" */
.add-new-topic {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #007bff;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease;
    margin-top: 16px;
}

.add-new-topic svg {
    width: 18px;
    height: 18px;
    fill: #fff;
}

.add-new-topic:hover {
    background: #0056b3;
}

/* Адаптивность */
@media (max-width: 768px) {
    .content-plan-table-wrapper {
        padding: 0;
    }

    .content-plan-table thead {
        display: none;
    }

    .content-plan-table tbody tr {
        display: block;
        margin-bottom: 16px;
        border: 1px solid #ddd;
        border-radius: 8px;
        padding: 12px;
        background: #fff;
    }

    .content-plan-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 8px 0;
        border-bottom: 1px solid #eee;
    }

    .content-plan-table td:last-child {
        border-bottom: none;
    }

    .content-plan-table td:before {
        content: attr(data-label);
        font-weight: 600;
        color: #1a1a1a;
        margin-right: 8px;
    }

    .col-number:before { content: "<?php _e('Number', 'ai-content-wizard'); ?>:"; }
    .col-category:before { content: "<?php _e('Category', 'ai-content-wizard'); ?>:"; }
    .col-topic:before { content: "<?php _e('Article Topic', 'ai-content-wizard'); ?>:"; }
    .col-keyword:before { content: "<?php _e('Keyword', 'ai-content-wizard'); ?>:"; }
    .col-date:before { content: "<?php _e('Publish Date & Time', 'ai-content-wizard'); ?>:"; }
    .col-status:before { content: "<?php _e('Status', 'ai-content-wizard'); ?>:"; }
    .col-actions:before { content: "<?php _e('Action', 'ai-content-wizard'); ?>:"; }

    .action-buttons {
        justify-content: flex-start;
    }
}









/**************************** Стили внутри вкладки категории **********************************/
/* Основной контейнер */
.tab-content-inner {
    padding: 20px;
    background: #ffffffc7;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.header-with-tooltip {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.tab-content-inner h2 {
    font-size: 18px;
    color: #1a1a1a;
    margin: 0;
    font-weight: 600;
}

.info-icon {
    width: 18px;
    height: 18px;
    fill: #666;
    cursor: pointer;
    transition: fill 0.3s ease;
}

.info-icon:hover {
    fill: #007bff;
}

.tab-description {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

/* Сетка категорий */
.ai-content-plan-categories-grid {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Блок категории */
.category-block {
    background: #f9f9f9;
    border-radius: 8px;
    padding: 16px;
    max-width: 100%;
    transition: box-shadow 0.3s ease;
}

.category-block:hover:not(.category-block-disabled) {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.category-block-disabled {
    background: #f8d7da; /* Светло-красный фон для отключенных категорий */
    opacity: 0.8;
}

/* Верхний ряд */
.category-row-top {
    display: flex;
    align-items: stretch;
    gap: 12px;
    flex-wrap: nowrap;
}

.cat-name, .cat-frequency, .cat-author, .cat-status, .cat-toggle {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.label-with-tooltip {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: #333;
    font-weight: 500;
}

.field-content {
    display: flex;
    align-items: center;
    gap: 8px;
}

.cat-icon, .field-icon {
    width: 18px;
    height: 18px;
    fill: #666;
    transition: fill 0.3s ease;
}

.category-row-top:hover:not(.category-block-disabled) .field-icon,
.category-row-top:hover:not(.category-block-disabled) .cat-icon {
    fill: #007bff;
}

.category-name-highlight {
    background: #e9ecef;
    padding: 6px 10px;
    border-radius: 4px;
    font-weight: 600;
    color: #1a1a1a;
}

.cat-name span {
    font-size: 16px;
}

.cat-frequency input[type="number"],
.cat-author select,
.cat-status select {
    width: 100%;
    padding: 6px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.cat-frequency input[type="number"]:focus:not(:disabled),
.cat-author select:focus:not(:disabled),
.cat-status select:focus:not(:disabled) {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
    outline: none;
}

/* Тумблер */
.cat-toggle .switch {
    position: relative;
    display: inline-block;
    width: 36px;
    height: 18px;
}

.cat-toggle .switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.cat-toggle .slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 18px;
}

.cat-toggle .slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 2px;
    bottom: 2px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.cat-toggle input:checked + .slider {
    background-color: #007bff;
}

.cat-toggle input:checked + .slider:before {
    transform: translateX(18px);
}

.cat-toggle input:disabled + .slider {
    cursor: not-allowed;
    background-color: #e9ecef;
}

/* Аккордеон */
.category-row-bottom {
    margin-top: 12px;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background: #e9ecef;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    color: #333;
    transition: background 0.3s ease;
}

.accordion-header:hover:not(.category-block-disabled) {
    background: #dee2e6;
}

.category-block-disabled .accordion-header {
    cursor: not-allowed;
    background: #ced4da;
}

.accordion-icon {
    width: 16px;
    height: 16px;
    fill: #666;
    transition: transform 0.3s ease;
}

.accordion-content {
    display: none;
    padding: 12px 0;
}

.accordion-content textarea {
    width: 100%;
    min-height: 80px;
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    resize: vertical;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.accordion-content textarea:focus:not(:disabled) {
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0, 123, 255, 0.1);
    outline: none;
}

.accordion-content textarea:disabled {
    background: #e9ecef;
    cursor: not-allowed;
}

/* Сообщение */
.category-message {
    margin-top: 12px;
    padding: 8px 12px;
    background: #f8d7da;
    border-radius: 4px;
    font-size: 13px;
    color: #721c24;
    line-height: 1.4;
    font-weight: 500;
}

.category-message a {
    color: #0056b3;
    text-decoration: underline;
}

.category-message a:hover {
    color: #003087;
}

/* Кнопка сохранения */
.save-button-row {
    margin-top: 20px;
    text-align: right;
}

/* Стили для подсказок */
.ai-content-wizard-tooltip .warning {
    margin-top: 8px;
    padding: 8px;
    background: #f8d7da;
    color: #721c24;
    border-radius: 4px;
    font-weight: 500;
}

/* Адаптивность */
@media (max-width: 768px) {
    .category-row-top {
        flex-direction: column;
        align-items: stretch;
    }

    .cat-name, .cat-frequency, .cat-author, .cat-status, .cat-toggle {
        flex: none;
    }

    .cat-frequency input[type="number"],
    .cat-author select,
    .cat-status select {
        width: 100%;
    }
}




/*********** ПОП-АП АВТОСОХРАНЕНИЯ *****************/
/* Оверлей для затемнения фона */
.auto-save-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3); /* Лёгкое затемнение */
    opacity: 0;
    z-index: 9998; /* Под попапом */
    transition: opacity 0.5s ease; /* Плавное появление/исчезновение затемнения */
}

.auto-save-overlay.show {
    opacity: 1;
}

/* Попап */
.auto-save-popup {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8); /* Центрирование и начальный масштаб */
    background: linear-gradient(135deg, #2ecc71, #27ae60); /* Градиент */
    color: #fff;
    padding: 20px 40px;
    border-radius: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25); /* Тень */
    backdrop-filter: blur(5px); /* Размытие краёв */
    -webkit-backdrop-filter: blur(5px); /* Поддержка в Webkit-браузерах */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 20px;
    font-weight: 600;
    z-index: 9999;
    display: none;
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease; /* Более плавные переходы */
}

/* Состояние при показе */
.auto-save-popup.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1); /* Полный размер */
}

/* Анимация исчезновения */
@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
    to {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9); /* Лёгкое уменьшение */
    }
}

/* Применяем анимацию при исчезновении */
.auto-save-popup.hiding {
    animation: fadeOut 0.5s ease forwards; /* Увеличенная длительность для плавности */
}

/* Иконка перед текстом */
.auto-save-popup::before {
    content: "✓";
    margin-right: 12px;
    font-size: 24px;
    font-weight: bold;
}

/* Медиа-запрос для мобильных устройств */
@media (max-width: 600px) {
    .auto-save-popup {
        padding: 15px 30px;
        font-size: 18px;
        width: 80%;
        max-width: 300px;
    }
    .auto-save-popup::before {
        font-size: 20px;
    }
}

/*********** ВКЛАДКА ГЕНЕРАЦИИ КОНТЕНТ ПЛАНА *****************/
    .plan-actions {
        display: flex;
        justify-content: center;
        gap: 15px;
        margin-bottom: 20px;
        flex-wrap: wrap;
    }

    .plan-btn {
        display: flex;
        align-items: center;
        padding: 12px 24px;
        font-size: 16px;
        font-weight: 600;
        /* color: #ffffff; */
        border: none;
        border-radius: 12px;
        cursor: pointer;
        transition: all 0.3s ease;
        box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
        position: relative; /* Для улучшения читаемости текста */
    }

    .plan-btn::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(255, 255, 255, 0.1); /* Легкая тень текста */
        border-radius: 12px;
        z-index: 1;
    }

    .plan-btn > * {
        position: relative;
        z-index: 2; /* Убедимся, что текст и иконки над тенью */
    }

    .plan-btn:hover {
        transform: translateY(-2px);
        box-shadow: 0 5px 12px rgba(0, 0, 0, 0.2);
    }

    .generate-btn {
        background: linear-gradient(45deg, #14b8a6, #a3e635, #34d399);
        background-size: 200% 200%;
        animation: gradientFlowTeal 5s ease infinite;
    }

    .update-btn {
        background: linear-gradient(45deg, #93c5fd, #3b82f6, #60a5fa);
        background-size: 200% 200%;
        animation: gradientFlowBlue 5s ease infinite;
    }

    .generate-btn:hover,
    .update-btn:hover {
        background-position: 100% 100%;
    }

    .icon-svg {
        width: 24px;
        height: 24px;
        margin-right: 10px;
        fill: #ffffff;
    }

    @keyframes gradientFlowTeal {
        0% { background-position: 0% 50%; }
        50% { background-position: 100% 50%; }
        100% { background-position: 0% 50%; }
    }

    @keyframes gradientFlowBlue {
        0% { background-position: 0% 50%; }
        50% { background-position: 100% 50%; }
        100% { background-position: 0% 50%; }
    }


/* Добавляем специфический класс для кнопки создания плана */
.create-plan-btn {
    background: linear-gradient(45deg, #f97316, #fb923c, #facc15); /* Оранжевые и желтые оттенки */
    background-size: 200% 200%;
    animation: gradientFlowOrange 5s ease infinite;
}

/* Эффект при наведении */
.create-plan-btn:hover {
    background-position: 100% 100%;
}

/* Анимация переливания */
@keyframes gradientFlowOrange {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Центрирование кнопки в контейнере */
.no-content-plan {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 20px;
    padding: 20px;
}

/* Стили для кнопки импорта */
.import-btn {
    background: linear-gradient(45deg, #8b5cf6, #d946ef, #ec4899); /* Фиолетово-розовая гамма */
    background-size: 200% 200%;
    animation: gradientFlowPurple 5s ease infinite;
}

/* Эффект при наведении */
.import-btn:hover {
    background-position: 100% 100%;
}

/* Анимация переливания */
@keyframes gradientFlowPurple {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

    /* Адаптивность */
    @media (max-width: 768px) {
        .plan-btn {
            padding: 10px 20px;
            font-size: 14px;
        }

        .icon-svg {
            width: 20px;
            height: 20px;
        }

        .plan-actions {
            gap: 10px;
        }
    }

    @media (max-width: 480px) {
        .plan-actions {
            flex-direction: column;
            align-items: center;
        }

        .plan-btn {
            width: 100%;
            justify-content: center;
        }
    }
	
	
	
/*********** Таблица контент-плана УВЕДОМЛЕНИЕ МИГРАЦИИ *****************/
/* Стили для современного уведомления */
.modern-notice {
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #fff7e6 0%, #fff1d6 100%);
    border: 1px solid #ffd700;
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    max-width: 100%;
    
}

.modern-notice:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.notice-migration .notice-icon {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    margin-right: 15px;
}

.notice-migration .notice-icon svg {
    width: 100%;
    height: 100%;
    color: #ffa500;
}

.notice-content {
    flex-grow: 1;
}

.notice-content p {
    margin: 0 0 15px 0;
    color: #333;
    font-size: 16px;
    line-height: 1.5;
}

.modern-button {
    display: inline-flex;
    align-items: center;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 600;
    color: #fff;
    background: linear-gradient(45deg, #ffa500, #ff7f00);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.modern-button:hover {
    background: linear-gradient(45deg, #ff7f00, #ffa500);
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(255, 127, 0, 0.3);
}

.modern-button:disabled {
    background: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
}

.button-loader {
    width: 20px;
    height: 20px;
    border: 3px solid #fff;
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Адаптивность */
@media (max-width: 768px) {
    .modern-notice {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

    .notice-migration .notice-icon {
        margin-right: 0;
        margin-bottom: 10px;
    }

    .notice-content p {
        font-size: 14px;
        margin-bottom: 10px;
    }

    .modern-button {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .modern-notice {
        margin: 10px 0;
    }

    .notice-content p {
        font-size: 13px;
    }

    .modern-button {
        padding: 8px 16px;
        font-size: 13px;
    }
}



