/* ----------------------------------------------
   Root / Variablen
------------------------------------------------- */

:root {
    --tu-red: #be1d3c;
    --tu-red-dark: #8a0000;
    --tu-green: #008000;
    --tu-soft: #f8f9fa;
    --tu-border: #e9ecef;
    --tu-text: #373737;
    --tu-text-soft: #6c757d;
    --tu-light: #fbfbfb;
    --tu-gray: #ababab;
}

/* ----------------------------------------------
   General
------------------------------------------------- */

.btn.btn-secondary,
.btn.btn-delete {
    position: absolute;
    right: 10px;
}

.btn.btn-delete {
    background-color: var(--tu-red);
}

.btn.btn-create {
    display: block;
    position: relative;
    margin-right: 0;
    margin-left: auto;
    margin-bottom: 15px;
    background-color: var(--tu-green);
    color: #fff;
}

.header-netbridge {
    padding-right: 15px;
}

.link-tu-red {
    color: var(--tu-red);
    text-decoration: none;
    font-weight: 600;
}

.link-tu-red:hover {
    color: var(--tu-red-dark);
}

/* ----------------------------------------------
   Adressbereiche
------------------------------------------------- */

div[class$="_optional"],
div[class$="_invisible"],
div.firewall_policy_optional,
div[id$="_visible_when_chosen"] {
    display: none;
}

select option:disabled {
    display: none;
}

.pre_dvk {
    font-family: inherit;
    font-size: inherit;
}

/* ----------------------------------------------
   Home
------------------------------------------------- */

.card.border-info {
    border-color: var(--tu-red) !important;
}

/* ----------------------------------------------
   Navbar
------------------------------------------------- */

.bi#person {
    margin-right: 2%;
}

.dropdown-menu#navbar-dropdown {
    min-width: fit-content !important;
}

img#nav-img {
    width: 100% !important;
}

#navbarNav {
    margin-left: auto;
}

/* ----------------------------------------------
   Sidebar-Nav
------------------------------------------------- */

.list-unstyled {
    padding-left: 0 !important;
    background-color: rgb(235, 235, 235);
}

.list-unstyled a:hover {
    background-color: var(--tu-red);
}

.col-lg-2#sidebar-nav {
    background-color: #f7f7f7;
    padding-left: 0;
    padding-right: 0;
    margin-top: -57px;
    position: relative;
    z-index: 100;
}

a.nav-link {
    text-decoration: none !important;
}

.sidebar-container {
    height: 100%;
    left: 0;
    overflow-x: hidden;
    overflow-y: auto;
    background: #f8f9fa;
}

.row.netbridge-nav-row {
    min-height: 100vh;
}

.sidebar-navigation {
    padding: 0;
    margin: 0;
    list-style-type: none;
    position: relative;
}

.sidebar-navigation .sidebar-list {
    position: relative;
    display: inline-block;
    width: 100%;
    line-height: 20px;
    background-color: transparent;
}

.sidebar-navigation .sidebar-list a {
    display: block;
    padding: 10px 15px 10px 30px;
    color: black;
}


/* .sidebar-navigation .sidebar-list .fa {
    margin-right: 10px;
} */

.sidebar-navigation .sidebar-list a:active,
.sidebar-navigation .sidebar-list a:hover,
.sidebar-navigation .sidebar-list a:focus {
    text-decoration: none;
    outline: none;
}

.sidebar-navigation .sidebar-list::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    width: 3px;
    height: 100%;
    background-color: var(--tu-red);
    transition: width 0.2s ease-in;
}

.sidebar-navigation .sidebar-list:hover::before {
    width: 100%;
    color: black !important;
}

.sidebar-navigation .sidebar-title{
    font-weight: 400;
    padding: 8px 20px 0px 20px;
}

.sidebar-navigation .header {
    padding: 20px 20px 4px 20px;
    font-size: 12px;
    /* text-transform: uppercase; */
}

.sidebar-navigation .header::before {
    background-color: transparent;
}

a[data-toggle="collapse"] {
    position: relative;
}

.dropdown-toggle#sidebar::after {
    display: block;
    position: absolute;
    top: 50%;
    right: 20px;
    transform: translateY(-50%);
}

a,
a:hover,
a:focus {
    color: inherit;
    text-decoration: none !important;
    transition: all 0.3s;
}

#sidebar-nav li.dropdown-item a:hover {
    color: black;
    background: #fff;
}

@media (max-width: 991.98px) {
    #sidebar-nav {
        display: none !important;
    }

    .btn-secondary {
        position: relative !important;
    }

    .sidebar-logo.d-lg-none img {
        height: 40px;
        width: auto !important;
    }

    .mobile-header-left {
        gap: 0.5rem;
    }

    .mobile-menu-btn {
        width: 40px;
        height: 40px;
        padding: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        border: 0;
        background: transparent;
        box-shadow: none;
    }

    .mobile-header-logo a {
        display: inline-flex;
        align-items: center;
        margin: 0;
        padding: 0;
    }

    .mobile-header-logo img {
        display: block;
        height: 32px;
        width: auto;
    }

    #mobileSidebar {
        width: 300px;
        max-width: 85%;
    }

    .mobile-sidebar-header {
        padding: 1rem 1rem 0.85rem;
        border-bottom: 1px solid #e9ecef;
    }

    .mobile-sidebar-header h3 {
        font-size: 1.5rem;
        font-weight: 400;
    }

    .mobile-user-section {
        padding: 1rem;
        border-bottom: 1px solid #e9ecef;
        background: #fff;
    }

    .mobile-user-row {
        margin-bottom: 0.75rem;
    }

    .mobile-user-info {
        display: flex;
        align-items: center;
        gap: 0.75rem;
    }

    .mobile-user-name {
        font-size: 1.05rem;
        font-weight: 600;
        color: #212529;
        line-height: 1.2;
    }

    .mobile-user-subtitle {
        font-size: 0.85rem;
        color: #6c757d;
    }

    .mobile-user-actions {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
    }

    .mobile-user-actions .btn {
        border-radius: 0.5rem;
        min-width: 100px;
    }

    .mobile-user-logout {
        padding: 0.5rem;
    }

    .mobile-logout-link {
        background: none;
        border: 0;
        padding: 0;
        color: #be1d3c;
        font-size: 0.95rem;
        font-weight: 500;
    }

    .mobile-nav-section {
        padding: 0.75rem 0;
    }

    .mobile-nav-label {
        padding: 0 1rem 0.5rem;
        font-size: 0.78rem;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        color: #6c757d;
    }

    .mobile-nav-list {
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .mobile-nav-item {
        position: relative;
    }

    .mobile-nav-item a {
        display: block;
        padding: 0.95rem 1rem;
        color: #212529;
        font-size: 1.05rem;
        text-decoration: none;
    }

    .mobile-nav-item+.mobile-nav-item {
        border-top: 1px solid #f1f3f5;
    }

    .mobile-nav-item:hover a {
        background: #f8f9fa;
    }

    .mobile-nav-item.active a {
        background: rgba(190, 29, 60, 0.08);
        font-weight: 600;
    }

    .mobile-nav-item.active::before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 4px;
        height: 100%;
        background: #be1d3c;
        border-radius: 0 4px 4px 0;
    }

    .profile-trigger {
        padding: 0.4rem 0.75rem !important;
        border-radius: 0.5rem;
        cursor: pointer;
        transition: background-color 0.2s ease, box-shadow 0.2s ease;
    }

    .profile-trigger:hover {
        background-color: #f8f9fa !important;
    }

    .profile-trigger:focus,
    .profile-trigger:focus-visible {
        outline: none;
        background-color: #f8f9fa !important;
        box-shadow: 0 0 0 0.2rem rgba(190, 29, 60, 0.15);
    }

    .profile-trigger-chevron {
        font-size: 1.1rem;
        color: #6c757d;
        line-height: 1;
    }
}

/* ----------------------------------------------
   Login
------------------------------------------------- */

.input-group-text {
    display: block !important;
}

.input-group.mb-3#login {
    width: 90%;
    margin: auto;
    text-align: center;
}

.login {
    width: 40%;
    margin: auto;
    text-align: center;
    background-color: var(--tu-light);
    border: 0.5px solid var(--tu-light);
}

.login.local_login {
    width: 20%;
    max-width: 100%;
    padding: 0.5rem;
    font-size: 0.8rem;
    line-height: 1.2;
}

.login.local_login .input-group-text,
.login.local_login .form-control,
.login.local_login .btn {
    margin-bottom: 0.3rem;
    padding: 0.25rem 0.5rem;
    font-size: x-small;
}

.headline#login {
    padding: 10px;
    color: var(--tu-text);
    text-align: center;
    font-size: x-large;
}

.headline#local_login {
    padding: 10px;
    color: var(--tu-text);
    text-align: center;
    font-size: x-small;
}

#lost-pwd {
    color: var(--tu-text);
    font-size: medium;
}

#alert-login {
    width: 40%;
    margin: auto;
    text-align: center;
}

#login-button {
    color: var(--tu-light) !important;
    background-color: var(--tu-text) !important;
}

#basic-addon-login {
    color: var(--tu-text);
    background-color: var(--tu-gray);
}

.tu-brand {
    width: 15% !important;
}

/* ----------------------------------------------
   WLAN-Diagnose
------------------------------------------------- */

.circle-1 {
    background-color: #3cadd4;
}

.circle-2 {
    background-color: #add43c;
}

.circle-3 {
    background-color: #d43c61;
}

.circle-4 {
    background-color: #af3cd4;
}

.circle-tu-red {
    background-color: var(--tu-red);
}

.rounded-circle {
    padding: 0.1em 0;
}

svg use {
    transform-box: fill-box;
    transform-origin: center;
}

.list-group-item.netbridge-diagnose {
    display: flex !important;
    align-items: center !important;
    gap: 10px !important;
}

.list-group-item.netbridge-diagnose svg {
    flex-shrink: 0 !important;
}

/* ----------------------------------------------
   Hero / allgemeine Karten
------------------------------------------------- */

.hero-wrapper {
    background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
}

.hero-card,
.speedtest-card {
    border-radius: 1rem;
}

.hero-side {
    background: #fff;
}

.btn-tu {
    color: #fff !important;
    background-color: var(--tu-red) !important;
    border-color: var(--tu-red) !important;
}

.btn-tu:hover {
    color: #fff;
    background-color: var(--tu-red-dark);
    border-color: var(--tu-red-dark);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-icon svg {
    width: 18px;
    height: 18px;
}

/* ----------------------------------------------
   Speedtest
------------------------------------------------- */

.speedtest-section {
    width: 100%;
    padding-bottom: 3rem;
}

.section-label {
    color: var(--tu-red);
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.speedtest-card {
    width: 100%;
    border: 0;
    border-radius: 16px;
    box-shadow: 0 0.125rem 0.5rem rgba(0, 0, 0, 0.06);
}

.speedtest-head {
    border-bottom: 1px solid var(--tu-border);
}

.speedtest-metric {
    height: 100%;
    padding: 1rem;
    background: #fff;
    border: 1px solid var(--tu-border);
    border-radius: 12px;
}

.speedtest-metric h5 {
    margin-bottom: 0.75rem;
    font-size: 1rem;
}

.meterText {
    min-height: 2.5rem;
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.1;
    color: #212529;
    word-break: break-word;
}

.meterText:empty::before {
    content: "0.00";
    color: #505050 !important;
}

#dlText {
    color: #6060aa;
}

#ulText {
    color: #309030;
}

#pingText,
#jitText {
    color: #aa6060;
}

.unit {
    margin-top: 0.5rem;
    font-size: 0.95rem;
    color: var(--tu-text-soft);
}

#progressBar {
    width: 100%;
    height: 12px;
    margin: 0 auto 2em;
    overflow: hidden;
    background: #e9ecef;
    border-radius: 999px;
}

#progress {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, var(--tu-red), #d63333);
    transition: width 0.2s ease;
}

#startStopBtn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 180px;
    min-height: 48px;
    margin-top: 1rem;
    padding: 0.75rem 1.25rem;
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    background: var(--tu-red);
    border-radius: 10px;
    transition: all 0.3s ease;
}

#startStopBtn::before {
    content: "Start the test";
}

#startStopBtn:hover {
    filter: brightness(0.95);
}

#startStopBtn.running {
    background: #495057;
}

#startStopBtn.running::before {
    content: "Test abbrechen";
}

#serverId,
#ipArea {
    color: var(--tu-text-soft);
}

.speedtest-footer {
    font-size: 0.95rem;
    color: var(--tu-text-soft);
}

/* ----------------------------------------------
   Responsive
------------------------------------------------- */

@media (max-width: 991.98px) {
    .speedtest-head h2 {
        font-size: 1.75rem;
    }

    .meterText {
        font-size: 1.8rem;
    }

    #serverId,
    #ipArea {
        text-align: left;
    }

    #startStopBtn {
        width: 100%;
    }

    .login,
    #alert-login {
        width: 70%;
    }

    .login.local_login {
        width: 40%;
    }

    .tu-brand {
        width: 25% !important;
    }
}

@media (max-width: 575.98px) {
    .speedtest-section {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }

    .card-body {
        padding: 1rem !important;
    }

    .speedtest-head h2 {
        font-size: 1.5rem;
    }

    .speedtest-head p {
        font-size: 0.95rem;
    }

    .meterText {
        font-size: 1.6rem;
    }

    .unit {
        font-size: 0.85rem;
    }

    .speedtest-metric {
        padding: 1rem !important;
    }

    .login,
    #alert-login {
        width: 90%;
    }

    .login.local_login {
        width: 90%;
    }

    .tu-brand {
        width: 40% !important;
    }
}