.ui-keyboard-actionkey:not(.ui-keyboard-dec):not(.ui-keyboard-combo) span {
  font-size: 0.8em;
  position: relative;
  top: auto;
  left: auto;
}

.ui-keyboard-actionkey:not(.ui-keyboard-dec):not(.ui-keyboard-combo) {
  min-width: 3em;
}

button[data-value="bksp"] {
  background: red !important;
  background-image: none;
}

button[data-value="accept"] {
  background: green !important;
  background-image: none;
}

/* Tablet optimization for Navbar buttons */
@media (max-width: 1450px) {
    /* Center the content of the navbar */
    .navbar-main .container-fluid {
        justify-content: center !important;
    }
    
    /* Ensure the Right-hand side cluster stays flex-row but centered */
    .navbar-main .d-flex.align-items-center {
        justify-content: center;
        flex-wrap: wrap; 
    }

    /* Username larger but inline */
    .navbar-main .d-flex.align-items-center > span.text-white {
        font-size: 1.2rem;
        margin-right: 15px !important;
        margin-bottom: 0 !important; 
    }

    /* Buttons larger than original but contained */
    .navbar-main a[data-bs-target="#fichajeModal"], 
    .navbar-main a[href*="logout.php"] {
        padding: 15px 35px !important; 
        font-size: 1.25rem !important; 
        margin: 0 5px !important;
    }
    
    /* Ensure no weird auto margins are pushing things apart */
    .navbar-main .d-flex.align-items-center > div.ms-md-auto {
        margin-left: 0 !important;
        margin-right: 0 !important;
        padding-right: 0 !important;
    }
}

/* Mobile optimization: Keep buttons side-by-side but compact */
@media (max-width: 700px) {
    /* Increase the blue background height to fit the taller navbar */
    .min-height-100 {
        min-height: 180px !important;
    }

    .navbar-main {
        min-height: 120px !important; 
        padding-top: 20px !important;
        padding-bottom: 10px !important;
        display: flex !important;
        align-items: center !important;
    }

    .navbar-main .container-fluid {
        flex-direction: column !important; 
        justify-content: center !important;
        gap: 12px !important;
    }

    .navbar-main nav[aria-label="breadcrumb"] h6:empty {
        display: none !important;
    }

    /* This targets the container with Usuari and buttons */
    .navbar-main .d-flex.align-items-center {
        justify-content: center !important;
        flex-direction: row !important;
        flex-wrap: wrap !important;
        width: 100% !important;
        gap: 8px !important;
    }

    /* Username centered but compact - forces wrap for buttons */
    .navbar-main .d-flex.align-items-center > span.text-white {
        width: 100%;
        text-align: center;
        margin-right: 0 !important;
        margin-bottom: 5px !important;
        font-size: 1.1rem;
        display: block !important;
    }

    /* Wrapper for 'Fitxar' button in fichaje_modal.php */
    .navbar-main .d-flex.align-items-center > div.ms-md-auto {
        margin: 0 !important;
        padding: 0 !important;
        display: inline-flex !important;
    }

    /* Buttons proportional and strictly side-by-side */
    .navbar-main a[data-bs-target="#fichajeModal"], 
    .navbar-main a[href*="logout.php"] {
        flex: 0 1 auto !important;
        padding: 10px 15px !important;
        font-size: 0.9rem !important; 
        margin: 0 !important;
        white-space: nowrap;
        border-radius: 8px !important;
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
    }
}
