/* ============================================
   ALLOY CALCULATOR STYLES - Cobalt Theme
   ============================================ */

/* Calculator Card */
.calculator-card {
    background-color: #161616;
    overflow: visible;
}

.calculator-card .card-body {
    overflow: visible;
}

.calculator-notice {
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-left: 4px solid var(--p-color);
    border-radius: 0.25rem;
    padding: 1rem 1.25rem;
    color: rgb(189, 189, 189);
    margin-bottom: 1.5rem;
}

/* Selector Section */
.calculator-selector-section {
    margin-bottom: 1.5rem;
}

.calculator-select {
    max-width: 400px;
    background-color: #202020;
    border: 2px solid rgba(255, 255, 255, 0.1);
    color: rgb(189, 189, 189);
    font-size: 1rem;
    transition: all 0.2s ease;
}

.calculator-select:hover,
.calculator-select:focus {
    border-color: var(--p-color);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
    background-color: #252525;
    color: #fff;
}

/* Calculator Panels */
.calculator-panel {
    background-color: #0d0d0d;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 0.25rem;
    padding: 1.25rem;
    height: 100%;
    position: relative;
}

.calculator-panel .panel-title {
    color: #fff;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    font-weight: 600;
}

/* Metal Sliders */
.metal-sliders {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.metal-slider-container {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background-color: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 0.25rem;
}

.metal-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 120px;
}

.metal-img {
    width: 48px;
    height: 48px;
    image-rendering: pixelated;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.metal-img:hover {
    transform: scale(1.1);
}

.metal-name {
    font-weight: 600;
    color: #fff;
}

.slider-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex: 1;
}

.slider-wrapper {
    flex: 1;
    min-width: 120px;
}

.percentage-display {
    min-width: 50px;
    text-align: center;
    font-weight: 600;
    color: var(--p-color);
    font-size: 1.1rem;
}

/* Result Section */
.alloy-result {
    margin-bottom: 1.5rem;
}

.alloy-image {
    text-align: center;
    margin-bottom: 1.5rem;
}

.alloy-img {
    width: 96px;
    height: 96px;
    image-rendering: pixelated;
    margin-bottom: 0.5rem;
}

.alloy-name {
    font-weight: 600;
    color: #fff;
    font-size: 1.2rem;
}

/* Ingot Controls */
.ingot-controls {
    text-align: center;
}

.ingot-controls label {
    display: block;
    margin-bottom: 0.75rem;
    font-weight: 500;
    color: rgb(189, 189, 189);
}

.ingot-input-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    justify-content: center;
    margin-bottom: 0.75rem;
}

.ingot-min,
.ingot-max {
    font-weight: 600;
    color: var(--p-color);
    min-width: 30px;
}

.ingot-slider-container {
    width: 200px;
}

.current-count {
    font-size: 1.1rem;
    font-weight: 600;
    color: #fff;
}

/* Crucible Section */
.crucible-section {
    margin-top: 1.5rem;
}

.crucible-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
}

.crucible-slot {
    aspect-ratio: 1;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
    background-color: rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 0.5rem;
    transition: all 0.3s ease;
    min-height: 100px;
}

.crucible-slot.filled {
    border-color: var(--p-color);
    background-color: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.1);
}

.crucible-image {
    margin-bottom: 0.25rem;
}

.crucible-nugget-img {
    width: 64px;
    height: 64px;
    image-rendering: pixelated;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.crucible-nugget-img:hover {
    transform: scale(1.1);
}

.crucible-count {
    font-size: 1.2rem;
    font-weight: 600;
    color: #fff;
}

/* Custom Range Slider */
.custom-range-slider {
    position: relative;
    width: 100%;
    height: 36px;
    margin: 0.5rem 0;
    cursor: pointer;
    outline: none;
}

.custom-range-slider:focus {
    outline: 2px solid var(--p-color);
    outline-offset: 2px;
    border-radius: 3px;
}

.custom-range-slider.disabled {
    opacity: 0.5;
    cursor: not-allowed;
    pointer-events: none;
}

.range-track {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 10px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 5px;
    transform: translateY(-50%);
    overflow: hidden;
}

.range-fill {
    height: 100%;
    background: var(--p-color);
    border-radius: 4px;
    transition: width 0.1s ease;
}

.range-thumb {
    position: absolute;
    top: 50%;
    width: 20px;
    height: 20px;
    background: var(--p-color);
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    cursor: grab;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.range-thumb:hover {
    filter: brightness(1.2);
    transform: translate(-50%, -50%) scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.5);
}

.custom-range-slider.dragging .range-thumb {
    cursor: grabbing;
    transform: translate(-50%, -50%) scale(0.95);
}

.thumb-inner {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3) 0%, transparent 50%);
    border-radius: 50%;
}

/* Tooltip */
.calculator-tooltip {
    position: fixed;
    background-color: #1a1a1a;
    border: 2px solid var(--p-color);
    border-radius: 0.25rem;
    padding: 0.75rem 1rem;
    color: rgb(189, 189, 189);
    font-size: 0.9rem;
    z-index: 10000;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
    max-width: 280px;
    pointer-events: none;
}

.calculator-tooltip h6 {
    color: #fff;
    margin: 0.5rem 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
}

/* Mobile Responsiveness */
@media (max-width: 991px) {
    .calculator-panel {
        margin-bottom: 1.5rem;
    }
}

@media (max-width: 768px) {
    .metal-slider-container {
        flex-direction: column;
        text-align: center;
        gap: 0.75rem;
    }

    .metal-info {
        justify-content: center;
        min-width: auto;
    }

    .slider-controls {
        width: 100%;
        flex-direction: column;
        gap: 0.5rem;
    }

    .slider-wrapper {
        width: 100%;
        min-width: unset;
    }

    .crucible-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .crucible-slot {
        min-height: 90px;
    }

    .crucible-nugget-img {
        width: 48px;
        height: 48px;
    }

    .calculator-select {
        width: 100%;
        max-width: 100%;
    }

    .ingot-slider-container {
        width: 100%;
        max-width: 200px;
    }

    .alloy-img {
        width: 80px;
        height: 80px;
    }
}