html,
body {
    width: 100%;
    max-width: 100%;
    font-family: "Nunito Sans", sans-serif;
    background-color: #1a1a2e !important;
}

body {
    background-color: #1a1a2e !important;
    color: white;
    min-height: 100vh;
}

#sidebarHamburger {
    width: 12vw;
    height: 12vw;
}

.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5) url('/img/loading.gif') no-repeat center center;
    display: none;
    z-index: 1000;
}

h3,
h5,
h6,
p {
    color: #edf2f4;
    font-family: "Nunito Sans", sans-serif;
}

.btn {

    font-family: "Nunito Sans", sans-serif;
}

.btn-primary {
    background-color: var(--color-primary);
    border-color: var(--color-primary);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-primary-light);
    border-color: var(--color-primary-light);
    color: var(--color-white);
}

.btn-close {
    filter: invert(1) brightness(2);
}

.row {
    --bs-gutter-x: 0 !important;
}

.card-bg {
    background-color: var(--color-card-bg);
}

.btn-link {
    color: var(--color-primary-light) !important;
}

.btn-link:hover {
    color: var(--primary-color) !important;
}

.form-control,
.form-select {
    background-color: var(--dark-background);
    color: #ffffff;
    border: 1px solid var(--color-primary);
}

.form-control::placeholder,
.form-select::placeholder {
    color: #ffffff;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--color-primary-light);
    box-shadow: none;
    background-color: transparent;
    color: #ffffff;
}

label {
    color: #edf2f4;
}

.btn-primary:disabled {
    background-color: var(--color-grey);
    border-color: var(--color-grey);
}

.btn-primary-small {
    padding-top: 1px !important;
    padding-bottom: 1px !important;
    font-size: 13px !important;
    background: var(--color-primary-light) !important;
    color: #ffffff;
}

.btn-primary-small:hover {
    background: var(--color-primary) !important;
    color: #ffffff;
}

.btn-outline-danger {
    border-color: #ef233c;
    color: #ef233c;
}

.btn-outline-danger:hover {
    background-color: #ef233c;
    color: #edf2f4;
}

.container-fluid {
    background-color: #2b2d42;
    /* Dark background for the entire app */
}

.navbar-toggler {
    border-color: #ef233c;
    /* Red border for toggler */
}

.navbar-toggler-icon {
    background-image: url('data:image/svg+xml;charset=utf8,%3Csvg viewBox%3D"0 0 30 30"%3E%3Cpath stroke%3D"rgba%28%23edf2f4%29" stroke-width%3D"2" stroke-linecap%3D"round" stroke-miterlimit%3D"10" d%3D"M4 7h22M4 15h22M4 23h22"/%3E%3C/svg%3E');
    /* Light bars */
}

.navbar-toggler:hover .navbar-toggler-icon {
    background-image: url('data:image/svg+xml;charset=utf8,%3Csvg viewBox%3D"0 0 30 30"%3E%3Cpath stroke%3D"rgba%28%23ef233c%29" stroke-width%3D"2" stroke-linecap%3D"round" stroke-miterlimit%3D"10" d%3D"M4 7h22M4 15h22M4 23h22"/%3E%3C/svg%3E');
    /* Brighter light on hover */
}

.audio-player,
.transcript-container {
    background-color: #3a3b42;
    color: #edf2f4;
    border: 1px solid #8d99ae;
    border-radius: 15px;
    padding: 10px;
    margin-bottom: 20px;
}

.card {
    background-color: var(--color-card-bg);
    border-radius: var(--card-border-radius);
}

.podcast-card,
.transcript-box,
.question-box,
.knowledge-base-card {
    background-color: #252542;
}

footer {
    position: sticky;
    bottom: 0;
    width: 100%;
}

.footer-sidebar {
    width: 100px;
    position: absolute;
    bottom: 10px;
    left: 10px;
}

.btn-purple {
    background-color: #9467F8;
    border-color: #9467F8;
    color: white;
}

.btn-purple:hover {
    background-color: #9370db;
    border-color: #9370db;
    color: white;
}

.btn-red {
    background-color: #dc3545;
    border-color: #dc3545;
    color: white;
}

.btn-red:hover {
    background-color: #c82333;
    border-color: #bd2130;
    color: white;
}

.action-button {
    background-color: var(--color-primary);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.action-button:hover {
    background-color: var(--color-primary-dark);
}

.list-group-item,
.knowledge-base-list li {
    color: white;
    background-color: #252542;
}

input.form-control::placeholder {
    color: grey;
}

.send-button,
.mic-button {
    background-color: transparent;
    border: none;
    color: #8B5CF6;
    font-size: 16px;
    padding: 0 0 0 12px;
}

.btn-dark {
    background-color: #000000;
}

.btn-primary {
    background-color: #8B5CF6;
    border-color: #8B5CF6;
}

.btn-outline-light {
    color: #E5E7EB;
    border-color: #4B5563;
}

.btn-outline-light:hover {
    background-color: transparent;
    color: #FFFFFF;
}

.container-fluid {
    flex: 1;
}

.content-wrapper {
    flex: 1;
    display: flex;
}

.icon-sup {
    font-size: 0.8em !important;
    vertical-align: super;
    color: #ffc107;
}

.sidebar-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 20vw;
    background: #252542;
    z-index: 1000;
}

.sidebar-wrapper.collapsed {
    width: 70px;
}

.sidebar-logo {
    width: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    height: 80px;
}

.topbar {
    width: 100%;
    position: fixed;
    top: 0;
    right: 0;
    height: 64px;
    border-bottom: 1px solid #ffffff50;
    background-color: var(--dark-background);
    z-index: 900;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 24px;
    transition: left 0.3s;
}

.sidebar-wrapper.collapsed~.topbar {
    left: 70px;
}

#mainContainer {
    overflow: hidden;
}

.main-content {
    margin-left: 20vw;
    padding-top: 64px;
    transition: margin-left 0.3s;
    max-width: calc(100vw - 20vw);
    overflow: hidden !important;
    box-sizing: border-box;
}

#sidebarCollapse {
    position: absolute;
    right: 0;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.sidebar-wrapper.collapsed~.main-content {
    margin-left: 70px;
    max-width: calc(100vw - 70px);
}

.sidebar-logo-expanded {
    display: block;
}

.sidebar-logo-collapsed {
    display: none !important;
}

.sidebar-wrapper.collapsed .sidebar-logo-expanded {
    display: none !important;
}

.sidebar-wrapper.collapsed .sidebar-logo-collapsed {
    display: block !important;
}

/* Centra verticalmente il menu */
.sidebar-menu {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    height: 100%;
    padding-left: 0;
    margin: 0;
    list-style: none;
}

/* Stile delle voci */
.sidebar-menu li {
    width: 100%;
    margin-bottom: 12px;
}

.sidebar-menu .nav-link {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 12px 18px;
    color: #fff;
    font-size: 1.08rem;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.2s, color 0.2s, box-shadow 0.2s;
    background: transparent;
    box-shadow: none;
    position: relative;
}

.sidebar-menu .nav-link:hover,
.sidebar-menu .nav-link.active {
    width: 90%;
    margin-left: 5%;
    background: #191a2e !important;
    color: #fff;
    box-shadow: 0 2px 8px rgba(106, 90, 249, 0.08);
}

.sidebar-menu .nav-link i {
    font-size: 1.3rem;
    margin-right: 16px;
    min-width: 20px;
    text-align: center;
    transition: color 0.2s;
}

.sidebar-label {
    font-size: 15px;
    transition: opacity 0.3s, margin 0.3s;
    margin-left: 0;
    white-space: nowrap;
}

.sidebar-wrapper.collapsed .sidebar-label {
    display: none;
}

.sidebar-wrapper.collapsed .sidebar-menu .nav-link {
    justify-content: center;
    padding-left: 0;
    padding-right: 0;
}

.sidebar-wrapper.collapsed .sidebar-menu .nav-link i {
    margin-right: 0;
}

.sidebar-wrapper.collapsed .sidebar-menu {
    align-items: center !important;
}

/* Swiper Slider */
.swiper {
    padding-top: 1% !important;
    padding-bottom: 1% !important;
}

.swiper-button-next,
.swiper-button-prev {
    padding: 13px !important;
    color: #ffffff !important;
    border-radius: 20px !important;
    background-color: var(--color-primary) !important;
}

.swiper-slide {
    margin-right: 10px !important;
}


@media (max-width: 768px) {
    .sidebar-wrapper {
        display: none;
    }

    .sidebar-wrapper.active {
        display: block;
        width: 100%;
        z-index: 1200;
        box-shadow: 0 0 20px #0008;
    }

    .main-content {
        margin-left: 0 !important;
        max-width: 100vw !important;
    }

    .topbar {
        left: 0 !important;
        justify-content: space-between !important;
    }
}