/* Windrammers Industry Helper - Custom Styles */

.navbar-brand {
    font-weight: bold;
}

/* Active Page Indicator */
.navbar-nav .nav-link.active {
    font-weight: 600;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.25rem;
}

.dropdown-menu .dropdown-item.active {
    background-color: var(--bs-primary);
    font-weight: 600;
}

.hero-section {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
    color: white;
    padding: 4rem 0;
}

/* Dark mode hero section */
[data-bs-theme="dark"] .hero-section {
    background: linear-gradient(135deg, #0d1421 0%, #1a365d 100%);
}

.card-hover:hover {
    transform: translateY(-2px);
    transition: transform 0.2s ease-in-out;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

/* Dark mode hover effect */
[data-bs-theme="dark"] .card-hover:hover {
    box-shadow: 0 4px 8px rgba(255,255,255,0.1);
}

/* Help Mode Toggle */
/* Help Mode Toggle */
#helpModeToggle {
    transition: all 0.2s ease-in-out;
}

#helpModeToggle.active {
    background-color: rgba(13, 110, 253, 0.2);
    color: #0d6efd;
    font-weight: 600;
}

#helpModeToggle.active:hover {
    background-color: rgba(13, 110, 253, 0.3);
}

/* Help Mode Popovers */
.help-mode-popover {
    --bs-popover-max-width: 300px;
    --bs-popover-border-color: var(--bs-border-color);
    --bs-popover-bg: var(--bs-card-bg);
    --bs-popover-header-bg: var(--bs-card-bg);
    --bs-popover-header-color: var(--bs-body-color);
    --bs-popover-body-color: var(--bs-body-color);
    --bs-popover-body-padding-x: 1rem;
    --bs-popover-body-padding-y: 0.75rem;
    opacity: 1 !important;
    border-color: var(--bs-border-color) !important;
}

.help-mode-popover .popover-header {
    font-weight: 500;
    font-size: 1rem;
    border-bottom: 1px solid var(--bs-border-color);
}

.help-mode-popover .popover-body {
    font-size: 0.875rem;
    line-height: 1.5;
}

/* Highlight elements with help when help mode is active */
[data-help] {
    position: relative;
}

body.help-mode-active [data-help]:hover {
    cursor: help;
}

/* Settings Page - Vertical Nav Pills */
.nav-pills .nav-link {
    border-radius: 0.375rem;
    margin-bottom: 0.25rem;
    transition: all 0.15s ease-in-out;
}

.nav-pills .nav-link:hover:not(.active) {
    background-color: var(--bs-secondary-bg);
}

.nav-pills .nav-link.active {
    font-weight: 500;
}

/* Ensure sticky positioning works properly */
@media (min-width: 768px) {
    .sticky-top {
        position: sticky;
        top: 20px;
        z-index: 1020;
    }
}

.step-card {
    border-left: 4px solid #0d6efd;
}

.manufacturing-step {
    border-left: 4px solid #3c7ca7;
}

.reaction-step {
    border-left: 4px solid #dc3545;
}

.fuel-block-step {
    border-left: 4px solid #0dcaf0;
}

.simple-reaction-step {
    border-left: 4px solid #6c757d;
}

.complex-reaction-step {
    border-left: 4px solid #dda577;
}

.ship-hull-step {
    border-left: 4px solid #0d6efd;
}

.component-step {
    border-left: 4px solid #dda577;
}

.capital-component-step {
    border-left: 4px solid #6d4ea7;
}

/* Logistics step styles */
.logistics-raw-materials-step {
    border-left: 4px solid #0dcaf0; /* Bootstrap info color */
}

.logistics-intermediate-step {
    border-left: 4px solid #ffc107; /* Bootstrap warning color */
}

.raw-material {
    background-color: #f8f9fa;
}

/* Dark mode raw material */
[data-bs-theme="dark"] .raw-material {
    background-color: #343a40;
}

.cost-positive {
    color: #198754;
}

.cost-negative {
    color: #dc3545;
}

/* Dark mode cost colors */
[data-bs-theme="dark"] .cost-positive {
    color: #20c997;
}

[data-bs-theme="dark"] .cost-negative {
    color: #fd7e14;
}

.progress-step {
    position: relative;
}

.progress-step::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 50px;
    height: calc(100% - 50px);
    width: 2px;
    background-color: #dee2e6;
}

/* Dark mode progress step line */
[data-bs-theme="dark"] .progress-step::before {
    background-color: #495057;
}

.progress-step:last-child::before {
    display: none;
}

.loading-spinner {
    display: none;
}

.loading .loading-spinner {
    display: block;
}

.loading .content {
    display: none;
}

/* Dark mode toggle button styling */
.theme-toggle {
    border: none;
    background: none;
    font-size: 1.2rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
}

.theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Theme selector dropdown styling */
.theme-selector {
    border: none;
    background: none;
    font-size: 1rem;
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
}

.theme-selector:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

#themeDropdown {
    min-width: 200px;
    max-height: 400px;
    overflow-y: auto;
}

#themeDropdown .dropdown-header {
    font-weight: 600;
    color: var(--bs-primary, #0d6efd);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

#themeDropdown .theme-option {
    transition: all 0.2s ease;
}

#themeDropdown .theme-option:hover {
    background-color: var(--bs-primary, #0d6efd);
    color: white;
}

#themeDropdown .theme-option.active {
    background-color: var(--bs-success, #198754);
    color: white;
    font-weight: 600;
}

#themeDropdown .theme-option.active::after {
    content: " ✓";
    float: right;
}

/* Custom theme indicators */
#themeDropdown .theme-option[data-theme="eve-dark"]::before {
    content: "🚀 ";
}

#themeDropdown .theme-option[data-theme="industrial"]::before {
    content: "🏭 ";
}

#themeDropdown .theme-option[data-theme="neon"]::before {
    content: "💫 ";
}

/* Theme selector dropdown styling */
.theme-selector {
    border: none;
    background: none;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    transition: all 0.15s ease-in-out;
    color: rgba(255, 255, 255, 0.75);
}

.theme-selector:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.9);
}

.theme-selector:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(255, 255, 255, 0.25);
}

/* Style the dropdown menu */
.theme-selector + .dropdown-menu {
    max-height: 400px;
    overflow-y: auto;
    min-width: 200px;
}

/* Active theme option styling */
.theme-option.active {
    background-color: var(--bs-primary);
    color: white;
}

.theme-option.active::after {
    content: ' ✓';
    float: right;
}
/* Advanced Options Toggle */
#advancedOptions .card {
    border: 1px solid var(--bs-border-color);
    background-color: var(--bs-body-bg);
}

#advancedOptions .card-title {
    font-weight: 600;
    color: var(--bs-emphasis-color);
}

#saveAdvancedOptionsBtn {
    transition: opacity 0.2s ease-in-out, transform 0.2s ease-in-out;
    padding: 0.25rem 0.5rem;
    font-size: 0.875rem;
}

#saveAdvancedOptionsBtn:hover {
    transform: translateY(-1px);
}

#saveAdvancedOptionsBtn:active {
    transform: translateY(0);
}

.btn-link[data-bs-toggle='collapse'] {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--bs-link-color);
}

.btn-link[data-bs-toggle='collapse']:hover {
    color: var(--bs-link-hover-color);
}

.btn-link[data-bs-toggle='collapse'] i {
    transition: transform 0.2s ease-in-out;
    display: inline-block;
    width: 1rem;
}

[data-bs-theme='dark'] .btn-link[data-bs-toggle='collapse'] {
    color: var(--bs-link-color);
}

/* Manufacturing and Reactions Toggle Buttons */
#manufacturingOnlyToggle.active {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

#manufacturingOnlyToggle.active:hover {
    background-color: var(--bs-primary-hover, #0b5ed7);
    border-color: var(--bs-primary-hover, #0b5ed7);
}

#reactionsOnlyToggle.active {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

#reactionsOnlyToggle.active:hover {
    background-color: var(--bs-primary-hover, #0b5ed7);
    border-color: var(--bs-primary-hover, #0b5ed7);
}

#showLogisticsToggle.active {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

#showLogisticsToggle.active:hover {
    background-color: var(--bs-primary-hover, #0b5ed7);
    border-color: var(--bs-primary-hover, #0b5ed7);
}

#singleStepModeToggle.active {
    background-color: var(--bs-primary);
    border-color: var(--bs-primary);
    color: white;
}

#singleStepModeToggle.active:hover {
    background-color: var(--bs-primary-hover, #0b5ed7);
    border-color: var(--bs-primary-hover, #0b5ed7);
}

/* Warning Card Pulsing Animation */
@keyframes warning-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(255, 193, 7, 0.7);
    }
    50% {
        box-shadow: 0 0 20px 10px rgba(255, 193, 7, 0);
    }
}

.warning-pulse {
    animation: warning-pulse 2s ease-in-out infinite;
}

/* Remove animation when user hovers (they've noticed it) */
.warning-pulse:hover {
    animation: none;
}

/* Material completion styling */
tr.material-completed {
    text-decoration-color: var(--bs-secondary-color) !important; /* Use muted color for strikethrough */
}

/* Apply opacity to cells except the checkbox cell */
tr.material-completed td:not(:first-child) {
    opacity: 0.4; /* Make it very muted */
}

/* Keep the checkbox and labels interactive and visible even when material is completed */
tr.material-completed td:first-child,
tr.material-completed td label {
    opacity: 1; /* Keep checkbox at full opacity */
}

/* Remove hover effect from completed material rows */
.table-hover tbody tr.material-completed:hover {
    background-color: transparent !important;
}

/* Single Step Mode Progress Bar */
#stepProgressBar {
    transition: width 0.3s ease-in-out;
}

/* Jump to Step Dropdown Button */
#jumpToStepBtn {
    min-width: 250px;
    font-weight: 500;
}

#jumpToStepBtn #stepCounter {
    font-weight: 500;
}

/* Jump to Step Dropdown Menu */
#jumpToStepMenu {
    min-width: 300px;
}

#jumpToStepMenu .dropdown-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
}

#jumpToStepMenu .dropdown-item:hover {
    background-color: var(--bs-secondary-bg);
}

#jumpToStepMenu .dropdown-item.active {
    background-color: var(--bs-primary);
    color: white;
}

#jumpToStepMenu .dropdown-item.active:hover {
    background-color: var(--bs-primary);
    opacity: 0.9;
}

#jumpToStepMenu .badge {
    min-width: 2rem;
}

/* Skeleton Loader Styles */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bs-secondary-bg) 25%,
        var(--bs-tertiary-bg) 50%,
        var(--bs-secondary-bg) 75%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: 0.25rem;
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-text:last-child {
    margin-bottom: 0;
}

.skeleton-title {
    height: 1.5rem;
    width: 60%;
    margin-bottom: 1rem;
}

.skeleton-line {
    height: 1rem;
    margin-bottom: 0.75rem;
}

.skeleton-line-short {
    width: 75%;
}

.skeleton-line-medium {
    width: 85%;
}

.skeleton-card {
    padding: 1rem;
}

.skeleton-table-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 0.75rem;
    align-items: center;
}

.skeleton-table-cell {
    height: 1rem;
    flex: 1;
}

.skeleton-table-cell-small {
    height: 1rem;
    width: 60px;
}

.skeleton-button {
    height: 2.5rem;
    width: 120px;
}

.skeleton-input {
    height: 2.5rem;
}

/* Dark mode skeleton adjustments */
[data-bs-theme="dark"] .skeleton {
    background: linear-gradient(
        90deg,
        rgba(255, 255, 255, 0.05) 25%,
        rgba(255, 255, 255, 0.1) 50%,
        rgba(255, 255, 255, 0.05) 75%
    );
    background-size: 200% 100%;
}

