/*
 * APKTemplates Modern UI compatibility
 *
 * The optional UI settings plugin historically injected global body padding,
 * typography and header dimensions. Those rules conflict with the actual theme
 * layout. This file keeps the original theme layout authoritative.
 */

body {
    padding-top: 0 !important;
}

/* The theme already reserves the fixed header space on #page.site. */
#page.site {
    padding-top: 46px;
}

@media (max-width: 380px) {
    #page.site {
        padding-top: 44px;
    }
}

/* Keep the theme's base typography authoritative. */
body {
    font-size: .9375rem !important;
}

/* Do not let the UI plugin's generic heading rules resize the whole site. */
h1, .h1 { font-size: 2.5rem; }
h2, .h2 { font-size: 2rem; }
h3, .h3 { font-size: 1.75rem; }
h4, .h4 { font-size: 1.5rem; }
h5, .h5 { font-size: 1.25rem; }
h6, .h6 { font-size: 1rem; }

/* Restore the theme's responsive heading scale. */
@media (max-width: 767px) {
    h1, .h1 { font-size: 1.625rem; }
    h2, .h2 { font-size: 1.5rem; }
    h3, .h3 { font-size: 1.375rem; }
    h4, .h4 { font-size: 1.25rem; }
    h5, .h5 { font-size: 1.125rem; }
    .display-4 { font-size: 2rem; }
}

/* The plugin's touch-target rule must not resize every button on the site. */
@media (pointer: coarse) {
    button,
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    .btn,
    .page-link {
        min-height: revert;
    }
}

/* Respect the real fixed header dimensions defined by template/header.php. */
.site-header {
    box-sizing: border-box;
}

html.dark-mode-preload,
html.dark-mode-preload body {
    background: #0f1115 !important;
    color: #e8eaed !important;
}
