/* Hover- und Active-Styles für kleine runde Buttons */
.btn-circle.btn-sm:hover,
.btn-circle.btn-sm:focus {
    background-color: #e9ecef;
    color: #0d6efd;
    border-color: #0d6efd;
    cursor: pointer;
    transition: background 0.2s, color 0.2s, border 0.2s;
}

.btn-circle.btn-sm.btn-outline-primary,
.btn-circle.btn-sm.last-opened {
    background-color: #0d6efd;
    color: #fff;
    border-color: #0d6efd;
}
.btn-circle.btn-xl {
    width: 4.2rem;
    height: 4.2rem;
    border-radius: 50%;
    text-align: center;
    font-size: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 0;
    position: relative;
    z-index: 1;
    transition: background 0.2s, color 0.2s, border-color 0.2s;
}

/* Big circles: use the same hover/focus effect as small circles (non-expanded only) */
.btn-circle.btn-xl:not(.animate-to-long):hover,
.btn-circle.btn-xl:not(.animate-to-long):focus {
    background-color: #e9ecef;
    color: #0d6efd;
}

.btn-circle.btn-sm {
    width: 3.2rem;
    height: 3.2rem;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;

}

/* Sub-Buttons: prevent Bootstrap col/row wrapping that stacks circles */
.btn-xl .sub-buttons:not(.d-none) {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin: 0 !important; /* neutralize .row negative margins */
    --bs-gutter-x: 0;
    --bs-gutter-y: 0;
}

/* Ensure Bootstrap's d-none still wins (avoid icon being pushed left) */
.btn-xl .sub-buttons.d-none {
    display: none !important;
}

/* Override Bootstrap .col-4 widths so each circle is auto-sized */
.btn-xl .sub-buttons > [class*="col-"] {
    flex: 0 0 auto;
    padding: 0 !important;
}

/* The sub-buttons are div.col-4.btn-circle.btn-sm; force their intended circle size */
.btn-xl .sub-buttons > .btn-circle.btn-sm {
    width: 3.2rem !important;
    height: 3.2rem !important;
    flex: 0 0 3.2rem;
}

/* The template uses mx-3; use gap instead to avoid wrapping */
.btn-xl .sub-buttons > .btn-sm {
    margin-left: 0 !important;
    margin-right: 0 !important;
}

/* Animation für den Übergang */
.btn-xl.animate-to-long {
    height: 4.2rem;
    border-width: 0.2rem;
    border-radius: 9999px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: fit-content;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
    /* Don't animate border-radius (prevents ellipse phase while expanding) */
    transition-property: width, padding-left, padding-right, background-color, color, border-color;
    transition-duration: 0.3s;
    transition-timing-function: ease-in-out;
}

/* Keep background stable on hover for expanded buttons only (override Bootstrap .btn-light:hover) */
.btn-xl.animate-to-long:hover,
.btn-xl.animate-to-long:focus,
.btn-xl.animate-to-long:active {
    background-color: #fff;
}

.btn-xl.animate-to-long i .main-icon {
    opacity: 0;
    /* Icon ausblenden */
    transition: opacity 0.3s ease-in-out;
    /* Sanftes Ausblenden */
}

.line {
    height: 20px;
    border-radius: 10px;
    position: absolute;
    top: 50%;
    height: 4px;
}

.line.blank {
    width: 95%;
    background-color: #f8f9fa;
    left: 1rem;
    z-index: 0;
}

.line.blue {
    width: 0%;
    background-color: #0d6efd;
    left: 1rem;
    z-index: 0.5;
    transition: width 0.3s ease-in-out;
}

.btn-xl.animate-to-long {
    z-index: 2;
    /* Erweiterte Buttons über die Linie legen */
}

.border-primary{
    border-width: 0.2rem;
    transition: all 0.2s ease-in-out;
}


/* tab-edit-other-files */
.tab-button {
    width: 12rem;
    height: 12rem;
    color: #0d6efd;
}

.tab-button.active,
.tab-button:active {
    background-color: #FFFFFF !important;
}

.big-icon {
    font-size: 5rem;
}
