/* ===== Theme toggle ===== */
.header-search {
    display: flex;
    align-items: center;
    gap: 14px;
}

.theme-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    border: 0;
    background: none;
    color: inherit;
    cursor: pointer;
    line-height: 1;
}

.theme-toggle:hover {
    color: #bf994a;
}

.theme-toggle__icon--sun,
html[data-theme="dark"] .theme-toggle__icon--moon {
    display: none;
}

html[data-theme="dark"] .theme-toggle__icon--sun {
    display: block;
}

/* ===== Dark theme ===== */
html[data-theme="dark"] {
    color-scheme: dark;
    --color-highlight: #5a4a1e;
}

html[data-theme="dark"] body {
    color: #e2e2e2;
    background-color: #16181c;
}

html[data-theme="dark"] a,
html[data-theme="dark"] a:visited,
html[data-theme="dark"] .pseudo-link,
html[data-theme="dark"] .site-title,
html[data-theme="dark"] .site-title a,
html[data-theme="dark"] .comment-list .comment-author {
    color: #e2e2e2;
}

html[data-theme="dark"] .entry-tag a,
html[data-theme="dark"] .entry-content a,
html[data-theme="dark"] .home-text a {
    color: #7fb0e8;
}

html[data-theme="dark"] a:hover,
html[data-theme="dark"] a:focus,
html[data-theme="dark"] a:active,
html[data-theme="dark"] .spanlink:hover,
html[data-theme="dark"] .pseudo-link:hover,
html[data-theme="dark"] .comment-reply-link:hover {
    color: #ff5a5a;
}

html[data-theme="dark"] .humburger span {
    background: #e2e2e2;
}

html[data-theme="dark"] .site-description,
html[data-theme="dark"] .entry-meta,
html[data-theme="dark"] .entry-meta a,
html[data-theme="dark"] .meta-source,
html[data-theme="dark"] .meta-source a,
html[data-theme="dark"] .comment-list .comment-time {
    color: #9a9a9a;
}

html[data-theme="dark"] .breadcrumb,
html[data-theme="dark"] .breadcrumb a,
html[data-theme="dark"] .author-box__author em,
html[data-theme="dark"] .entry-content .wp-caption-text,
html[data-theme="dark"] .home-text .wp-caption-text,
html[data-theme="dark"] .entry-content .wp-element-caption,
html[data-theme="dark"] .post-thumbnail--inline figcaption,
html[data-theme="dark"] .post-thumbnail--wide figcaption,
html[data-theme="dark"] .entry-footer__comments sup,
html[data-theme="dark"] .widget_archive ul ul li a,
html[data-theme="dark"] .widget_categories ul ul li a,
html[data-theme="dark"] .widget_nav_menu ul ul li a,
html[data-theme="dark"] .widget_pages ul ul li a {
    color: #a8a8a8;
}

/* Forms */
html[data-theme="dark"] .input,
html[data-theme="dark"] input[type=email],
html[data-theme="dark"] input[type=number],
html[data-theme="dark"] input[type=password],
html[data-theme="dark"] input[type=search],
html[data-theme="dark"] input[type=tel],
html[data-theme="dark"] input[type=text],
html[data-theme="dark"] input[type=url],
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
    color: #e2e2e2;
    background-color: #1f2228;
    border-color: #3a3e46;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
    color: rgba(226, 226, 226, .45);
}

html[data-theme="dark"] .search-screen {
    background: rgba(22, 24, 28, .94);
}

html[data-theme="dark"] .search-screen .search-form .search-field {
    background: transparent;
    border-color: #3a3e46;
}

/* Surfaces */
html[data-theme="dark"] .site-footer {
    background: #1d2025;
}

html[data-theme="dark"] .scrolltop {
    background: #262a31;
    box-shadow: 0 3px 30px -5px rgba(0, 0, 0, .7);
}

html[data-theme="dark"] .footer-navigation ul li .sub-menu,
html[data-theme="dark"] .main-navigation ul li .sub-menu {
    background: #1f2228;
    box-shadow: 0 2px 30px rgba(0, 0, 0, .6);
}

html[data-theme="dark"] .footer-navigation ul li.current-menu-item span,
html[data-theme="dark"] .main-navigation ul li.current-menu-item span,
html[data-theme="dark"] .pagination .nav-links .current,
html[data-theme="dark"] .comments-pagination .current {
    background: #5a4a1e;
    color: #fff;
}

html[data-theme="dark"] .spoiler-box,
html[data-theme="dark"] .table-of-contents,
html[data-theme="dark"] .entry-content table th,
html[data-theme="dark"] .home-text table th {
    background: #1f2228;
}

html[data-theme="dark"] .spoiler-box__body {
    background: #1a1d22;
}

html[data-theme="dark"] .table td,
html[data-theme="dark"] .table th {
    background-color: #16181c !important;
}

/* Borders */
html[data-theme="dark"] .footer-navigation ul li,
html[data-theme="dark"] .main-navigation ul li,
html[data-theme="dark"] .post-box--no-thumb a,
html[data-theme="dark"] .entry-content table,
html[data-theme="dark"] .entry-content table td,
html[data-theme="dark"] .entry-content table th,
html[data-theme="dark"] .home-text table,
html[data-theme="dark"] .home-text table td,
html[data-theme="dark"] .home-text table th,
html[data-theme="dark"] .comments-area,
html[data-theme="dark"] .author-box,
html[data-theme="dark"] .widget_archive ul li,
html[data-theme="dark"] .widget_categories ul li,
html[data-theme="dark"] .widget_meta ul li,
html[data-theme="dark"] .widget_nav_menu ul li,
html[data-theme="dark"] .widget_pages ul li,
html[data-theme="dark"] .widget_recent_comments ul li,
html[data-theme="dark"] .table-bordered td,
html[data-theme="dark"] .table-bordered th {
    border-color: #2e3238 !important;
}

html[data-theme="dark"] hr,
html[data-theme="dark"] .table-of-contents__list .level-1 a {
    border-color: rgba(255, 255, 255, .12);
}

html[data-theme="dark"] .post-box--card {
    box-shadow: inset 0 0 0 1px #2e3238;
}

html[data-theme="dark"] .child-categories ul li a {
    color: #e2e2e2;
    border-color: #7fb0e8;
}

html[data-theme="dark"] .comment-respond {
    border-color: #5a4a1e;
}

html[data-theme="dark"] .comment-respond .comment-form-author input,
html[data-theme="dark"] .comment-respond .comment-form-comment textarea {
    border-color: #3a3e46;
}

/* Code */
html[data-theme="dark"] code {
    color: #ff8a8f;
    background-color: #262a31;
}

html[data-theme="dark"] pre {
    color: #e2e2e2;
    background-color: #1f2228;
}

html[data-theme="dark"] blockquote,
html[data-theme="dark"] pre {
    border-color: #3a3e46;
}

/* Styled blockquotes */
html[data-theme="dark"] .entry-content blockquote.is-style-warning,
html[data-theme="dark"] .entry-content blockquote.warning,
html[data-theme="dark"] .archive-description blockquote.is-style-warning,
html[data-theme="dark"] .archive-description blockquote.warning,
html[data-theme="dark"] .home-text blockquote.is-style-warning,
html[data-theme="dark"] .home-text blockquote.warning {
    background: #3a2e1a;
}

html[data-theme="dark"] .entry-content blockquote.is-style-question,
html[data-theme="dark"] .entry-content blockquote.question,
html[data-theme="dark"] .entry-content blockquote.is-style-info,
html[data-theme="dark"] .entry-content blockquote.info,
html[data-theme="dark"] .archive-description blockquote.is-style-question,
html[data-theme="dark"] .archive-description blockquote.question,
html[data-theme="dark"] .archive-description blockquote.is-style-info,
html[data-theme="dark"] .archive-description blockquote.info,
html[data-theme="dark"] .home-text blockquote.is-style-question,
html[data-theme="dark"] .home-text blockquote.question,
html[data-theme="dark"] .home-text blockquote.is-style-info,
html[data-theme="dark"] .home-text blockquote.info {
    background: #1b2c38;
}

html[data-theme="dark"] .entry-content blockquote.is-style-danger,
html[data-theme="dark"] .entry-content blockquote.danger,
html[data-theme="dark"] .entry-content blockquote.is-style-thumbs-down,
html[data-theme="dark"] .entry-content blockquote.thumbs-down,
html[data-theme="dark"] .archive-description blockquote.is-style-danger,
html[data-theme="dark"] .archive-description blockquote.danger,
html[data-theme="dark"] .archive-description blockquote.is-style-thumbs-down,
html[data-theme="dark"] .archive-description blockquote.thumbs-down,
html[data-theme="dark"] .home-text blockquote.is-style-danger,
html[data-theme="dark"] .home-text blockquote.danger,
html[data-theme="dark"] .home-text blockquote.is-style-thumbs-down,
html[data-theme="dark"] .home-text blockquote.thumbs-down {
    background: #3a221d;
}

html[data-theme="dark"] .entry-content blockquote.is-style-check,
html[data-theme="dark"] .entry-content blockquote.check,
html[data-theme="dark"] .entry-content blockquote.is-style-thumbs-up,
html[data-theme="dark"] .entry-content blockquote.thumbs-up,
html[data-theme="dark"] .archive-description blockquote.is-style-check,
html[data-theme="dark"] .archive-description blockquote.check,
html[data-theme="dark"] .archive-description blockquote.is-style-thumbs-up,
html[data-theme="dark"] .archive-description blockquote.thumbs-up,
html[data-theme="dark"] .home-text blockquote.is-style-check,
html[data-theme="dark"] .home-text blockquote.check,
html[data-theme="dark"] .home-text blockquote.is-style-thumbs-up,
html[data-theme="dark"] .home-text blockquote.thumbs-up {
    background: #1c3324;
}

html[data-theme="dark"] .entry-content blockquote.is-style-quote,
html[data-theme="dark"] .entry-content blockquote.quote,
html[data-theme="dark"] .archive-description blockquote.is-style-quote,
html[data-theme="dark"] .archive-description blockquote.quote,
html[data-theme="dark"] .home-text blockquote.is-style-quote,
html[data-theme="dark"] .home-text blockquote.quote {
    background: #20262b;
}

html[data-theme="dark"] blockquote.zloj-irp p a {
    color: #f0c674;
}

html[data-theme="dark"] blockquote.zloj-irp p:after {
    background: linear-gradient(to right, rgba(22, 24, 28, 0) 0, #16181c 70%, #16181c 100%);
}

html[data-theme="dark"] .entry-content .mark,
html[data-theme="dark"] .entry-content mark,
html[data-theme="dark"] .home-text .mark,
html[data-theme="dark"] .home-text mark {
    background-color: #6b6420;
    color: #fff;
}

/* Images: slightly dim in dark mode */
html[data-theme="dark"] .entry-content img {
    filter: brightness(.92);
}

/* WPRemark blocks (plugin sets light backgrounds per block) */
html[data-theme="dark"] .wpremark {
    background-color: #3a2e1a !important;
    color: #e2e2e2;
}

html[data-theme="dark"] .wpremark .wpremark-content,
html[data-theme="dark"] .wpremark .wpremark-title {
    color: #e2e2e2;
}

html[data-theme="dark"] .wpremark a {
    color: #f0c674;
}
