/*
 * ANDR2026: стилі, які раніше лежали в налаштуваннях теми
 * (General → Additional Style) і дописувалися в кінець stylesheet/style-custom.css.
 * Підключаються в amr-custom/custom-assets.php одразу після style-custom.css,
 * тому порядок правил і їхній пріоритет лишилися такими самими.
 */

/* ---------- Шапка: назва, опис, логотип ---------- */

@media only screen and (min-width: 820px) {
    .amr-custom-header-title,
    .amr-custom-header-description {
        margin-right: 175px;
    }
}

@media only screen and (min-width: 767px) and (max-width: 820px) {
    .amr-custom-header-title,
    .amr-custom-header-description {
        margin-right: 110px;
    }
}

@media only screen and (max-width: 767px) {
    body .gdlr-logo {
        padding-right: 10px;
        padding-top: 10px;
        padding-bottom: 10px;
        margin-left: 0;
        text-align: left;
    }

    body .gdlr-logo img {
        width: 100px;
    }

    .gdlr-logo-right-text.gdlr-align-left {
        margin-top: 10px;
        margin-bottom: 0;
        padding-bottom: 15px;
    }

    .amr-custom-header-title {
        font-size: 30px;
        margin-bottom: 10px;
    }

    .amr-custom-header-description {
        /*opacity: 0.7;
        font-size: 10px;*/
        display: none;
    }

    .gdlr-header-wrapper .gdlr-header-substitute .gdlr-header-inner {
        background-size: cover !important;
        background-position: center;
    }
}

/* ---------- Смуга із заголовком сторінки ---------- */

.archive.tax-document_category .gdlr-header-wrapper.gdlr-header-style-2.gdlr-centered .gdlr-page-title-wrapper,
.post-template-default.single-post.single-format-standard .gdlr-header-wrapper.gdlr-header-style-2.gdlr-centered .gdlr-page-title-wrapper,
.official-documents-template-default.single.single-official-documents .gdlr-header-wrapper.gdlr-header-style-2.gdlr-centered .gdlr-page-title-wrapper {
    display: none;
}

.archive.tag .gdlr-page-title-wrapper,
.archive.category.category-news .gdlr-page-title-wrapper,
.page-template-default.page .gdlr-page-title-wrapper,
.error404 .gdlr-page-title-wrapper,
.search.search-no-results  .gdlr-page-title-wrapper {
    background-image: url('/wp-content/uploads/2020/12/wheat-background.jpg');
    background-size: cover;
    background-position: center;
    padding: 36px 0px;
}

.archive.tag .gdlr-page-title-wrapper .gdlr-page-title,
.archive.category.category-news .gdlr-page-title-wrapper .gdlr-page-title,
.page-template-default.page .gdlr-page-title-wrapper .gdlr-page-title,
.error404 .gdlr-page-title-wrapper .gdlr-page-title {
    color: #ddd;
}

.archive.tag .gdlr-page-title-wrapper .gdlr-page-caption,
.archive.category.category-news .gdlr-page-title-wrapper .gdlr-page-caption,
.page-template-default.page .gdlr-page-title-wrapper .gdlr-page-caption,
.error404 .gdlr-page-title-wrapper .gdlr-page-caption {
    color: #fff;
}

/* ---------- Шапка: "Тестова версія" і посилання на Telegram ---------- */

.andr2020addition-top-nav-alert {
    float: right;
    padding: 20px 0 20px 20px;
    position: relative;
    line-height: 14px;
}
.andr2020addition-top-nav-alert .andr2020addition-top-nav-alert-tooltip {
    display: none;
    font-style: italic;
    position: absolute;
    right: 0;
    top: 54px;
    background: white;
    padding: 10px 15px;
    width: 300px;
    line-height: 18px;
    border: 1px solid black;
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.1);
}
.andr2020addition-top-nav-alert:hover .andr2020addition-top-nav-alert-tooltip {
    display: block;
}
.andr2020addition-top-nav-alert.andr2022addition-top-nav-alert {
    padding: 8px 0 8px 20px;
    top: -50px;
}
.andr2020addition-top-nav-alert.andr2022addition-top-nav-alert a {
    color: white;
}
.andr2020addition-top-nav-alert.andr2022addition-top-nav-alert a:hover {
    color: #ddd;
}
.andr2022addition-top-nav-alert-social-icon {
    height: 36px;
    vertical-align: middle;
}

/* ---------- Таблиці документів ---------- */

.andr2020addition-common-table th,
.andr2020addition-common-table td,
.andr2020addition-common-table img {
    vertical-align:middle;
}
.andr2020addition-common-table th,
.andr2020addition-common-table td {
    padding-left: 15px;
}
.andr2020addition-common-table th:first-child,
.andr2020addition-common-table td:first-child {
    padding-left: 0;
}
.andr2020addition-common-table-padded-left th:first-child,
.andr2020addition-common-table-padded-left td:first-child {
    padding-left: 15px;
}
.andr2020addition-common-table-archive {
    margin-bottom: 40px;
}

/* ---------- Календар подій ---------- */

#wp-calendar .eo-past-date {
    color: rgba(0, 0, 0, 0.2);
}
#wp-calendar .event {
    font-weight: bold;
}
#wp-calendar .today {
    position: relative;
}
#wp-calendar th,
#wp-calendar td {
    width: 14.285%;
}
#wp-calendar .today::before{
    content: '';
    display: block;
    width: 26px;
    height: 26px;
    border-radius: 13px;
    border: 1px solid rgba(0, 0, 0, 0.2);
    position: absolute;
    top: 8px;
    left: 50%;
    margin-left: -14px;
}

.eo-event-tag-test-event-tag1,
.eo-event-tag-test-event-tag1 a {
    color: rgb(255 106 0) !important;
}

#wp-calendar tbody {
    border: 1px solid rgba(245, 190, 59, 0.3);
    border-top-width: 0;
}
#wp-calendar thead {
    border-left: 1px solid rgba(245, 190, 59, 1);
    border-right: 1px solid rgba(245, 190, 59, 1);
}

.andr-special-date-event-holder {
    position: relative;
}
.andr-special-date-event-content {
    display: none;
}
.andr-special-date-event-holder:hover .andr-special-date-event-content {
    position: absolute;
    left: -100px;
    right: -100px;
    top: 25px;
    padding: 10px 15px;
    display: block;
    background: white;
    border: 1px solid black;
    font-weight: normal;
    z-index: 1;
}

/* ---------- Шапка: фон і колір тексту ---------- */

.gdlr-header-wrapper .gdlr-header-substitute .gdlr-header-inner {
    background: url('/wp-content/uploads/2020/12/banner-2020-05-23-DJI_0137-DNG.jpg');
}

.gdlr-header-wrapper .amr-custom-header-description,
.gdlr-header-wrapper .amr-custom-header-title a {
    color: white;
    text-shadow: 2px 2px 2px black;
}

.amr-custom-calendar-month-link {
    cursor: pointer;
}

.gdlr-navigation-wrapper .gdlr-main-menu > li > a {
    padding: 16px 20px;
}

/* ---------- Фільтр офіційних документів ---------- */
/* Уточнення до цих правил — у <style> шорткоду
   amr-custom/official-document-main-filter-shortcode.php. */

.andr-official-document-search-form ul {
    margin: 0;
    display: block;
}

.andr-official-document-search-form ul li {
    width: 33.33%;
    box-sizing: border-box;
    display: block;
    float: left;
}
.andr-documents-search-input-padded,
input.andr-documents-search-input-padded {
    margin-top: 50px;
}

.andr-official-document-search-form select,
.andr-official-document-search-form input[type="date"],
.andr-official-document-search-form input[type="submit"] {
    font-family: "Open Sans";
    padding: 7px 14px;
    display: block;
    width: 90%;
    box-sizing: border-box;
}

.andr-official-document-search-form select,
.andr-official-document-search-form input[type="date"] {
    border: 1px solid rgba(245, 190, 59, 0.6);
    background-color: white;
    color: black;
    transition: outline 0.3s, opacity 0.3s;
    outline: 1px solid rgba(245, 190, 59, 0);
}

.andr-official-document-search-form select:focus,
.andr-official-document-search-form input[type="date"]:focus {
    outline: 1px solid rgba(245, 190, 59, 0.6);
}

.andr-official-document-search-form select:disabled {
    opacity: 0.2;
}

.andr-official-document-search-form input[type="submit"] {
    line-height: 1.8;
}

/* ---------- Різне ---------- */

.andr2020addition-top-nav-social {
    /*float: right;*/
    display: none;
}
.andr2020addition-top-nav-social .social-icon {
    float: left;
    margin-left: 10px;
    margin-top: 15px;
}
.andr2020addition-top-nav-social img {
    width: 24px;
}

.andr-page-not-found-block-inline {
    margin-top: 0;
}
.andr-page-not-found-block-inline .page-not-found-caption {
    margin-bottom: 0;
}

/* Пункт бічного меню для поточної сторінки (клас додає custom.js). */
.andr21-selected-menu-item {
    font-weight: bold;
}

#post-1328 .gdlr-blog-title a {
    color: #a50003;
}

#gdlr-main-navigation {
    margin: 0;
}

/* ---------- Мобільне меню поверх посилання на Telegram ---------- */
/* Посилання на Telegram лежить у смузі навігації (z-index 98), а мобільне
   меню — у шапці (z-index 97). Піднімаємо шапку лише поки меню відкрите
   або закривається (dl-menu-toggle): постійно піднята шапка перекрила б
   посилання, і воно перестало б натискатися. */

.gdlr-header-container:has(.dl-menu.dl-menuopen, .dl-menu.dl-menu-toggle) {
    z-index: 99;
}

/* ---------- Верхнє меню: пункт "Головна" як силует будиночка ---------- */
/* Назва пункту (текст або емодзі) ховається, замість неї малюється іконка
   кольором тексту посилання — тож вона біла, як інші пункти, і підсвічується
   разом із ними. У мобільному меню назва показується як є. */

.gdlr-main-menu > .menu-item-home > a {
    font-size: 0;
}

.gdlr-main-menu > .menu-item-home > a::before {
    content: '';
    display: block;
    width: 18px;
    height: 22px;
    background-color: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E") center / 18px no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M10 20v-6h4v6h5v-8h3L12 3 2 12h3v8z'/%3E%3C/svg%3E") center / 18px no-repeat;
}
