/*
 * RealGaming – společná kompaktní vrstva vzhledu
 * Načítá se globálně přes _inc/content/head.php, takže platí na všech stránkách.
 * Jemné zmenšení typografie a ovládacích prvků bez změny HTML jednotlivých stránek.
 */
:root {
    font-size: 15px;
}

body {
    font-size: .9rem;
    line-height: 1.5;
}

/* Navigace a uživatelské menu */
.navbar .nav-link,
.navbar .dropdown-button {
    font-size: .9rem;
}

.navbar .dropdown-content {
    padding: 9px 10px !important;
    min-width: 155px;
    border-radius: 8px !important;
}

.navbar .dropdown-content > li {
    margin: 2px 0;
}

.navbar .dropdown-link {
    display: block;
    padding: 6px 9px;
    font-size: .84rem !important;
    line-height: 1.35;
    border-radius: 5px;
}

.navbar .avatar {
    font-size: .88rem;
}

/* Jednotná velikost běžných ovládacích prvků napříč webem */
button,
.btn,
input,
select,
textarea,
.form-control,
.form-select {
    font-size: .9rem;
}

.btn {
    padding-top: .42rem;
    padding-bottom: .42rem;
}

.form-control,
.form-select {
    min-height: 38px;
}

.card-body {
    font-size: .92rem;
}

/* Zmenšení výchozích nadpisů, ale zachování jejich hierarchie */
h1 { font-size: clamp(1.65rem, 3vw, 2.15rem); }
h2 { font-size: clamp(1.4rem, 2.5vw, 1.8rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
h4 { font-size: 1.15rem; }
h5 { font-size: 1rem; }

/* Mobilní menu má zůstat pohodlně ovladatelné prstem */
@media (max-width: 991.98px) {
    .rg-mobile-links .nav-link {
        font-size: .92rem;
    }
    .rg-mobile-auth a,
    .rg-mobile-user {
        font-size: .9rem;
    }
}

@media (max-width: 575.98px) {
    :root { font-size: 14px; }
    body { font-size: .92rem; }
}


/* Mobilní verze – kompaktní rozměry napříč všemi stránkami */
@media (max-width: 767.98px) {
    body { font-size: .86rem; line-height: 1.45; }
    h1 { font-size: clamp(1.35rem, 5vw, 1.8rem); }
    h2 { font-size: clamp(1.2rem, 4.3vw, 1.55rem); }
    h3 { font-size: clamp(1.05rem, 3.8vw, 1.3rem); }
    h4 { font-size: 1.02rem; }
    h5 { font-size: .94rem; }

    .container, .container-fluid { padding-left: 12px; padding-right: 12px; }
    .card-body { padding: 12px; font-size: .86rem; }
    .btn, button { font-size: .84rem; }
    .btn { padding: .36rem .65rem; }
    input, select, textarea, .form-control, .form-select {
        font-size: .86rem !important;
        min-height: 36px;
    }
    table { font-size: .78rem; }
    .table td, .table th { padding: .42rem; }

    /* Mobilní vysouvací menu: menší texty a mezery, ale stále pohodlné cíle pro prst */
    .rg-mobile-drawer { padding: 18px 16px 22px !important; }
    .rg-mobile-drawer-head { margin-bottom: 24px !important; gap: 10px; }
    .rg-mobile-drawer-head img { max-width: 128px !important; max-height: 42px !important; }
    .rg-mobile-close { width: 42px !important; height: 42px !important; font-size: 19px !important; }
    .rg-mobile-menu-label { font-size: 9px !important; margin-bottom: 8px !important; }
    .rg-mobile-links { gap: 3px !important; }
    .rg-mobile-links .nav-link {
        min-height: 46px !important;
        padding: 9px 10px !important;
        gap: 11px !important;
        font-size: 14px !important;
    }
    .rg-mobile-links .nav-link i { width: 20px !important; font-size: 16px !important; }
    .rg-mobile-auth { margin-top: 22px !important; padding-top: 15px !important; }
    .rg-mobile-login { min-height: 46px !important; padding: 9px 12px !important; font-size: 13px !important; }
    .rg-mobile-user { gap: 10px !important; margin-bottom: 8px !important; padding: 9px !important; }
    .rg-mobile-user strong { font-size: 13px !important; }
    .rg-mobile-user span { font-size: 10px !important; }
    .rg-mobile-account-link { min-height: 42px !important; padding: 8px 10px !important; font-size: 12px !important; }
    .rg-mobile-drawer-footer { margin-top: 22px !important; font-size: 8px !important; }
}

@media (max-width: 380px) {
    .rg-mobile-drawer { padding: 14px 12px 18px !important; }
    .rg-mobile-drawer-head img { max-width: 112px !important; }
    .rg-mobile-links .nav-link { min-height: 44px !important; font-size: 13px !important; }
    .card-body { padding: 10px; }
}


/* Stabilní vykreslení při přechodu mezi stránkami – bez poskakování obsahu */
html {
    scrollbar-gutter: stable;
}
body {
    transition: none !important;
}
#bodyContent {
    opacity: 1 !important;
    transition: none !important;
}
#bodyLoading {
    transition: none !important;
}


/* Stabilizace rozložení při navigaci mezi stránkami (desktop i mobil). */
html {
    overflow-y: scroll;
    scrollbar-gutter: stable;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}
body {
    overflow-x: hidden !important;
    min-width: 0;
}
/* Ikony mají pevnou typografickou šířku ještě před/po nahrazení SVG. */
i[class*="fa-"],
.rg-icon-svg {
    display: inline-block !important;
    width: 1.15em !important;
    min-width: 1.15em !important;
    height: 1em !important;
    line-height: 1 !important;
    vertical-align: -0.12em !important;
    flex: 0 0 1.15em !important;
}
/* Font se při přechodu mezi stránkami nesmí měnit podle okamžiku načtení. */
body, button, input, select, textarea {
    font-family: "Rubik", sans-serif;
    font-synthesis: none;
}
@media (max-width: 767.98px) {
    html { scrollbar-gutter: auto; }
}
