/* Disk Capacity Bar Component Styles */

:root {
    --bar-height: 18px;
    --bar-radius: 9px;
    --bar-bg: #e9ecef;
    --bar-fill-low: #28a745;
    --bar-fill-medium: #ffc107;
    --bar-fill-high: #dc3545;
    --bar-fill-critical: #721c24;
    --os-overlay: rgba(0, 0, 0, 0.15);
    --transition-speed: 0.1s;
}

/* Component Container */
.disk-bar-component {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    padding: 12px 0 14px 0;
    transition: all var(--transition-speed) ease;
    position: relative;
}

/* Disk Information Row */
.disk-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
    position: relative;
}

.disk-name {
    font-weight: 600;
    color: #212529;
}

.disk-stats {
    color: #6c757d;
    font-size: 13px;
}

/* Bar Track (Background) */
.bar-track {
    height: var(--bar-height);
    background-color: var(--bar-bg);
    border-radius: var(--bar-radius);
    overflow: visible;
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Bar Fill */
.bar-fill {
    height: 100%;
    border-radius: var(--bar-radius);
    position: relative;
    transition: width var(--transition-speed) ease, background-color var(--transition-speed) ease;
    background: linear-gradient(to bottom,
        rgba(255, 255, 255, 0.2) 0%,
        rgba(255, 255, 255, 0) 50%,
        rgba(0, 0, 0, 0.1) 100%);
    width: 0%;
}

/* OS Usage Overlay */
.os-usage {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: var(--os-overlay);
    border-radius: var(--bar-radius) 0 0 var(--bar-radius);
    transition: width var(--transition-speed) ease;
    width: 0%;
}

/* Color states based on usage percentage */
.disk-bar-component[data-state="low"] .bar-fill {
    background-color: var(--bar-fill-low);
}

.disk-bar-component[data-state="medium"] .bar-fill {
    background-color: var(--bar-fill-medium);
}

.disk-bar-component[data-state="high"] .bar-fill {
    background-color: var(--bar-fill-high);
}

.disk-bar-component[data-state="critical"] .bar-fill {
    background-color: var(--bar-fill-critical);
}

/* Hover Effects */

/* Card Styling */
.card {
    border: 1px solid #dee2e6;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: box-shadow 0.2s ease;
}

.card-body {
    padding: 1.5rem 2rem 0.8rem 2rem;
}


.card-title {
    color: #495057;
    font-size: 16px;
    font-weight: 600;
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Form Controls for Interactive Example */
.form-range {
    margin-bottom: 5px;
}

.form-label {
    font-size: 14px;
    font-weight: 500;
    color: #495057;
}

#usedValue, #totalValue, #systemValue {
    display: inline-block;
    font-size: 13px;
    color: #6c757d;
    margin-left: 8px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .disk-info {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .disk-stats {
        font-size: 12px;
    }
}

/* Animation for initial load */
@keyframes slideIn {
    from {
        width: 0;
    }
}

.bar-fill {
    animation: slideIn 0.2s ease-out forwards;
}

.os-usage {
    animation: slideIn 0.25s ease-out forwards;
}

/* Inline Info Display */
.disk-info-display {
    position: absolute;
    width: calc(100% - 16px);
    left: 8px;
    top: 100%;
    margin-top: 2px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.08s ease;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Helvetica Neue', Arial, sans-serif;
    font-size: 11px;
    height: 20px;
}

.disk-info-display.visible {
    opacity: 1;
}

.disk-info-item {
    display: inline-flex;
    gap: 4px;
    align-items: baseline;
    position: absolute;
    white-space: nowrap;
}

.disk-info-label {
    color: #6c757d;
    font-weight: 500;
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.disk-info-value {
    font-weight: 600;
    font-size: 12px;
    color: #212529;
}


/* Increase Disk Size Button */
.increase-disk-btn {
    background-color: #ff336c;
    color: white;
    border: none;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--transition-speed) ease;
    white-space: nowrap;
    display: none;
    margin-left: auto;
}

.increase-disk-btn:hover {
    background-color: #e6005a;
}

.increase-disk-btn.visible {
    display: block;
}

/* Print Styles */
@media print {
    .disk-bar-component {
        page-break-inside: avoid;
    }

    .card {
        border: 1px solid #000;
        box-shadow: none;
    }

    .increase-disk-btn {
        display: none !important;
    }
}