/* Overlay for the Hall of Balance */
.balancehall-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3;
    overflow: hidden;
}

.balancehall-overlay-content {
    background-image: url('imgs/textures/hall_of_balance.jpg');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-height: 90%;
    overflow-y: auto;
    text-align: center;
}

/* Overlay for the Hall of Balance */
.balancehall-overlay-content h1,
.balancehall-overlay-content h4,
.balance-disclaimer,
.current-multiplier,
.new-multiplier {
    color: #b0c4de; /* Light steel blue for visibility */
    background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent dark background */
    padding: 5px;
    border-radius: 5px;
    display: inline-block;
    max-width: fit-content;
    margin: 0 auto;
}

.balance-disclaimer {
    margin-top: 20px; /* Adds spacing between Hall text and disclaimer */
}

/* Main container for the balance sliders and skills */
#balanceHallSkills {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    margin: 0 auto;
}

.balancehall-row {
    width: 100%;
    margin: 10px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Left column for sliders and balance button */
.balancehall-left-column {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 10px;
}

.current-multiplier,
.new-multiplier {
    font-weight: bold;
    color: #b0c4de;
    font-size: 0.9em;
    min-width: 100px; /* Fixed width to prevent resizing */
    text-align: center;
}

.slider-container {
    position: relative;
    width: 100%;
}

.balance-slider {
    width: 100%;
}

.balance-button {
    width: 150px;
    padding: 5px 10px;
    background-color: #b8860b; /* Gold color */
    color: #1a1a1a;
    font-weight: bold;
    text-align: center;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.balance-button:hover {
    background-color: #ffcc00;
}

/* Skill Grid */
.balance-skill-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    width: 100%;
    margin-top: 20px;
}

.balance-skill-button {
    padding: 10px;
    border-radius: 5px;
    cursor: pointer;
    text-align: center; /* Center-aligns text */
    transition: background-color 0.3s ease, transform 0.3s ease;
    white-space: pre-line; /* Allows line breaks in the content */
}

.balance-skill-button strong {
    font-weight: bold;
    font-size: 1.1em;
    display: block;
    margin-bottom: 5px;
}

/* base cost styling (blocks, yellow by default) */
.balance-skill-button .skill-cost {
    display: block;            /* each cost on its own line */
    color: #ffc107;            /* yellow */
    font-size: 0.9em;
    margin-bottom: 5px;
}

/* override when you can’t afford */
.balance-skill-button .skill-cost.insufficient {
    color: #FF6F91;            /* reddish-pink */
}

.balance-skill-button .skill-description {
    font-size: 0.85em;
    color: #ddd; /* Light color for description */
}


.balance-skill-button:disabled {
    background-color: #555;
    cursor: not-allowed;
}

.balance-skill-button.disabled-skill {
    opacity: 0.9;
    pointer-events: none; /* Prevent clicking on disabled skills */
}

.dot-indicator {
    position: absolute;
    top: 50%;  /* Center the dot on the slider */
    width: 18px;
    height: 18px;
    background-color: #D3D3D3;  /* Lighter gray */
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
}

#closeBalanceHallButton {
    margin: 10px auto;
    display: block;
}

/* Toggle Switch Container */
#suppressToggleContainer {
    background-color: rgba(0, 0, 0, 0.6); /* Semi-transparent dark background */
    margin: 20px 0;
    text-align: center;
    font-size: 1.2em;
    padding: 5px;
    border-radius: 5px;
}

/* Toggle Switch */
.balance-toggle-switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.balance-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.balance-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.4s;
    border-radius: 34px;
}

.balance-toggle-slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.4s;
    border-radius: 50%;
}

.balance-toggle-switch input:checked + .balance-toggle-slider {
    background-color: #4CAF50;
}

.balance-toggle-switch input:checked + .balance-toggle-slider:before {
    transform: translateX(26px);
}



/* Mobile responsiveness */
@media (max-width: 768px) {
    .balancehall-row {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    .slider-container {
        width: 100%;
    }

    .balancehall-left-column {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
    }

    /* Row for Curr and New displays to keep them side-by-side */
    .current-new-row {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-top: 10px;
    }

    .current-multiplier,
    .new-multiplier {
        text-align: center;
        margin: 0 5px; /* Space between Curr and New displays */
        flex: 1; /* Optional: allow equal space if needed */
    }

    .balance-button {
        text-align: center;
        margin-top: -5px;
        margin-bottom: 35px;
    }

    .balance-skill-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .balance-skill-button {
        width: 100%;
    }

        /* Toggle Switch Container */
    #suppressToggleContainer {
        font-size: 1em;
    }

}
