/* Стили для админ-панели */
#tm_tooltip_word {
    width: 500px; /* Увеличенная ширина поля ввода */
}

.widefat {
    border-collapse: collapse;
}

.widefat th,
.widefat td {
    border: 1px solid #ddd;
    padding: 8px;
    vertical-align: top;
}

.widefat th {
    background: #f9f9f9;
}

.tm_copy_shortcode {
    color: #0073aa;
    text-decoration: underline;
    cursor: pointer;
}

.tm_copy_shortcode:hover {
    color: #005177;
}

.tm_shortcode_container {
    margin: 20px 0;
}

#tm_shortcode_input {
    width: 300px;
    padding: 5px;
    font-family: monospace;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#tm_shortcode_input:focus {
    outline: none;
    border-color: #0073aa;
    box-shadow: 0 0 5px rgba(0, 115, 170, 0.5);
}

#tm_selected_word {
    margin-left: 10px;
    font-style: italic;
    color: #555;
}

#tm_progress_container {
    margin: 20px 0;
}

#tm_progress_bar {
    width: 0%;
    height: 20px;
    background: #0073aa;
    border-radius: 4px;
    transition: width 0.3s ease;
}

#tm_progress_text {
    margin: 5px 0;
}

#tm_lost_shortcodes_result {
    margin-top: 20px;
}

#tm_lost_shortcodes_result table {
    width: 100%;
    margin-top: 10px;
}

#tm_lost_shortcodes_result p {
    font-style: italic;
}

/* Стили для таблицы коротких тултипов (админка) */
#tm_short_tooltips_table .widefat {
    margin-top: 20px;
}

#tm_short_tooltips_table .widefat th,
#tm_short_tooltips_table .widefat td {
    padding: 8px 10px;
    vertical-align: middle;
}

.tm_short_tooltip_id {
    color: #0073aa;
    text-decoration: underline;
    cursor: pointer;
}

.tm_short_tooltip_id:hover {
    color: #005177;
    text-decoration: none;
}

.tm_short_tooltip_word {
    color: #0073aa;
    text-decoration: underline;
    cursor: pointer;
}

.tm_short_tooltip_word:hover {
    color: #005177;
    text-decoration: none;
}

.tm_delete_short_tooltip {
    color: #dc3232;
    text-decoration: underline;
    cursor: pointer;
}

.tm_delete_short_tooltip:hover {
    color: #a00;
    text-decoration: none;
}

#tm_short_tooltip_shortcode_container {
    display: flex;
    align-items: center;
}

#tm_short_tooltip_shortcode {
    margin-left: 10px;
    padding: 5px;
    border: 1px solid #ddd;
    background: #f7f7f7;
    width: 200px;
}

.tablenav-pages {
    margin-top: 10px;
    text-align: right;
}

.tablenav-pages .current-page {
    font-weight: bold;
    padding: 0 5px;
}

.tablenav-pages a {
    text-decoration: none;
    padding: 0 5px;
}

.tablenav-pages a:hover {
    text-decoration: underline;
}

/* Стили для фронтенда */
span.tm_tooltip {
    cursor: help !important;
    color: #8b3b06 !important;
    text-decoration: none;
    border-bottom: 1px dashed #813909;
}

span.tm_tooltip:hover {
    color: #3134C2 !important;
    text-decoration: none !important;
    text-shadow: 3px 3px 3px rgba(0, 12, 0, 0.4);
}

span.tm_short_tooltip {
    cursor: help !important;
    color: #8b3b06  !important; /* Немного темнее оттенок для коротких тултипов */
    text-decoration: none;
    border-bottom: 1px dashed #6e3f1d;
}

span.tm_short_tooltip:hover {
    color: #2A2AA5 !important; /* Соответствующий темный синий для наведении */
    text-decoration: none !important;
    text-shadow: 3px 3px 3px rgba(0, 12, 0, 0.4);
}

/* Стили для модального окна */
.tm_modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5); /* Полупрозрачный серый фон для обычных тултипов */
    z-index: 1000;
    overflow: auto;
    justify-content: center;
    align-items: center;
}

/* Прозрачный фон для коротких тултипов */
.tm_modal.tm_short_tooltip_modal {
    background: transparent;
}

/* Базовые стили для .pop */
.pop {
    background: #fff;
    padding: 20px;
    border: 2px solid rgb(12, 165, 101);
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
    position: relative;
    min-width: 300px;
    min-height: 100px;
    max-height: 90vh;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
    overflow-y: auto; 
}

/* Стили для модального окна обычных тултипов (Manage Tooltips) */
.tm_modal:not(.tm_short_tooltip_modal) .pop {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 16px;
    line-height: 1.7;
    background: #fff;
    padding: 30px;
    width: 70vw;
    height: 90vh;
    box-sizing: border-box;
    border: 2px solid rgb(12, 165, 101);
    border-radius: 8px;
    overflow-y: auto;
}

/* Стили для содержимого обычных тултипов */
.tm_modal:not(.tm_short_tooltip_modal) .pop .tm_modal_content {
    padding-left: 0; /* Без дополнительного отступа для обычных тултипов */
}

/* Стили для модального окна коротких тултипов (Manage Short Tooltips) */
.tm_short_tooltip_modal .pop {
    width: 35vw;
    min-width: 200px;
    max-width: 400px;
    margin: 0; /* Убираем автоматическое центрирование */
    overflow: hidden; /* Убираем полосы прокрутки */
    height: auto; /* Высота подстраивается под содержимое */
}

/* Адаптивность для малых экранов */
@media screen and (max-width: 600px) {
    .tm_short_tooltip_modal .pop {
        width: 80vw;
        min-width: 150px;
        max-width: 300px;
    }

    .tm_short_tooltip_modal .pop .tm_modal_content {
        padding-left: 20px; /* Меньший отступ для малых экранов */
    }

    .tm_modal:not(.tm_short_tooltip_modal) .pop {
        width: 90vw;
        max-width: 500px;
        height: 80vh;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
    }

    .tm_modal:not(.tm_short_tooltip_modal) .pop .tm_modal_content {
        padding-left: 0; /* Без дополнительного отступа для обычных тултипов */
    }
}

.tm_close {
    color: #ee1010;
    font-size: 28px;
    font-weight: bold;
    position: absolute;
    top: 10px;
    right: 15px;
    cursor: pointer;
}

.tm_close:hover,
.tm_close:focus {
    color: black;
    text-decoration: none;
    cursor: pointer;
}

.tm_modal_title {
    font-weight: bold;
    text-align: center;
    font-size: 28px;
    width: 100%;
    margin: 10px 0;
}

.tm_modal_content {
    width: 100%;
    height: 100%;
    font-size: 16px;
    line-height: 1.5;
    padding: 0 15px;
    overflow-y: auto;
}

.tm_modal_content p {
    margin: 0 0 1em 0;
    line-height: 1.6;
}

.tm_modal_content ul {
    list-style-type: disc;
    margin: 0 0 1em 20px;
}

.tm_modal_content ol {
    list-style-type: decimal;
    margin: 0 0 1em 20px;
}

.tm_modal_content h1,
.tm_modal_content h2,
.tm_modal_content h3 {
    font-weight: bold;
    margin: 1em 0;
    font-size: inherit;
}

.tm_modal_content img {
    max-width: 100%;
    height: auto;
    margin: 10px;
}
#tm_post_id,
#tm_short_tooltip_id {
    -webkit-appearance: none; /* Убираем стрелки в Chrome/Safari */
    -moz-appearance: textfield; /* Убираем стрелки в Firefox */
}
.tm-instructions {
    max-width: 800px;
    margin: 20px 0;
    line-height: 1.6;
}

.tm-instructions h3 {
    margin-top: 30px;
    color: #0073aa;
}

.tm-instructions h4 {
    margin-top: 20px;
    font-size: 1.2em;
}

.tm-instructions h5 {
    margin-top: 15px;
    font-size: 1.1em;
}

.tm-instructions ul {
    margin-left: 20px;
    margin-bottom: 15px;
}

.tm-instructions li {
    margin-bottom: 10px;
}

.tm-instructions p {
    margin-bottom: 15px;
}

/* Стили для внутреннего контейнера контента */
.tm_modal_inner_content {
    padding: 15px;
    border: 1px solid #e5e7eb; /* Тонкое серое обрамление */
    border-radius: 4px; /* Закругленные углы */
    background: #f9fafb; /* Легкий серый фон для выделения */
}

.align-center { display: block; margin: 0 auto; max-width: 100%; height: auto; }

.tms_tooltip { display:none; }
.tms_quote_highlight { background:rgb(240, 240, 161); }