/**
 * EVE Industry Tracker - Custom Styles
 * Enhanced for full dark/EVE theme, overriding Bootstrap/DataTables defaults.
 */

/* General styling */
body {
    background-color: #181a20 !important;
    color: #c7c7c7 !important;
    font-family: "Orbitron", "Segoe UI", "Arial", sans-serif;
    padding-bottom: 30px;
    background-image: url("https://images.evetech.net/backgrounds/nebula.jpg");
    background-size: cover;
    background-attachment: fixed;
}

.main-content {
    padding-top: 30px;
    padding-bottom: 50px;
    background: rgba(24, 26, 32, 0.98);
    border-radius: 12px;
    box-shadow: 0 0 24px 0 #000a;
}

/* Dashboard styling */
.character-card {
    margin-bottom: 20px;
    transition: transform 0.2s;
    background: linear-gradient(135deg, #23272b 60%, #181a20 100%);
    border: 1px solid #23272b;
    color: #c7c7c7;
    box-shadow: 0 2px 8px #000a;
}

.character-card:hover {
    transform: translateY(-5px) scale(1.03);
    box-shadow: 0 6px 16px #000c;
    border-color: #2176ae;
}

.character-avatar {
    width: 128px;
    height: 128px;
    margin: 0 auto;
    display: block;
    border-radius: 50%;
    border: 2px solid #2176ae;
    box-shadow: 0 0 8px #2176ae33;
    background: #23272b;
}

.card-header {
    font-weight: bold;
    background: linear-gradient(90deg, #23272b 80%, #2176ae 100%) !important;
    color: #2176ae !important;
    border-bottom: 1px solid #23272b !important;
    letter-spacing: 1px;
    font-family: "Orbitron", "Segoe UI", "Arial", sans-serif;
}

.stat-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: #2176ae;
    text-shadow: 0 0 4px #2176ae22;
}

/* Table styling */
.table th {
    background-color: #23272b !important;
    color: #2176ae !important;
    border-bottom: 2px solid #2176ae !important;
    font-family: "Orbitron", "Segoe UI", "Arial", sans-serif;
}
.table td {
    background-color: #181a20 !important;
    color: #c7c7c7 !important;
    border-color: #23272b !important;
}
.table-striped > tbody > tr:nth-of-type(odd) {
    background-color: #23272b !important;
}
.table-striped > tbody > tr:nth-of-type(odd) > td {
    background-color: #23272b !important;
}
.table-striped > tbody > tr:nth-of-type(even) > td {
    background-color: #181a20 !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.current {
    background: #2176ae !important;
    color: #181a20 !important;
    border-color: #2176ae !important;
    font-weight: bold;
    box-shadow: 0 0 8px rgba(33, 118, 174, 0.3) !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button:hover {
    background: #2176ae !important;
    color: #181a20 !important;
    border-color: #2176ae !important;
    text-decoration: none !important;
}

.dataTables_wrapper .dataTables_paginate .paginate_button {
    background: #23272b !important;
    color: #c7c7c7 !important;
    border: 1px solid #2176ae !important;
    padding: 0.5em 1em;
    margin-left: 3px;
    border-radius: 4px;
    box-shadow: 0 0 4px rgba(33, 118, 174, 0.13);
    transition: all 0.2s ease;
}

.dataTables_wrapper .dataTables_paginate .paginate_button.disabled,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:hover,
.dataTables_wrapper .dataTables_paginate .paginate_button.disabled:active {
    background: #181a20 !important;
    color: #555555 !important;
    border: 1px solid #333333 !important;
    cursor: default;
    box-shadow: none !important;
}

/* Progress bar styling */
.progress {
    height: 20px;
    margin-bottom: 10px;
    background: #23272b !important;
    border-radius: 10px;
    box-shadow: 0 0 4px #2176ae22;
}

/* Job status colors */
.status-active {
    color: #2176ae !important;
    font-weight: bold;
    text-shadow: 0 0 2px #2176ae22;
}

.status-completed {
    color: #00ffae !important;
    font-weight: bold;
    text-shadow: 0 0 2px #00ffae22;
}

.status-delivered {
    color: #c7c7c7 !important;
    font-weight: bold;
}

.status-cancelled {
    color: #ff003c !important;
    font-weight: bold;
    text-shadow: 0 0 2px #ff003c22;
}

.status-paused {
    color: #ffe600 !important;
    font-weight: bold;
    text-shadow: 0 0 2px #ffe60022;
}

.status-ready {
    color: #00ffae !important;
    font-weight: bold;
    text-shadow: 0 0 2px #00ffae22;
}

/* Blueprint styling */
.bpo {
    color: #2176ae !important;
    font-weight: bold;
    text-shadow: 0 0 2px #2176ae22;
}

.bpc {
    color: #c7c7c7 !important;
}

/* Login page */
.login-container {
    max-width: 500px;
    margin: 50px auto;
    padding: 20px;
    background: rgba(24, 26, 32, 0.98);
    border-radius: 12px;
    box-shadow: 0 0 24px 0 #000a;
    border: 1px solid #2176ae;
}

.eve-login-btn {
    display: block;
    width: 100%;
    padding: 15px;
    background: linear-gradient(90deg, #2176ae 0%, #23272b 100%);
    color: #181a20;
    text-align: center;
    text-decoration: none;
    font-size: 18px;
    border-radius: 5px;
    margin-top: 20px;
    transition:
        background 0.3s,
        color 0.3s;
    font-family: "Orbitron", "Segoe UI", "Arial", sans-serif;
    font-weight: bold;
    box-shadow: 0 0 8px #2176ae22;
    border: none;
}

.eve-login-btn:hover {
    background: linear-gradient(90deg, #23272b 0%, #2176ae 100%);
    color: #2176ae;
    text-decoration: none;
    box-shadow: 0 0 8px #2176ae22;
    border: none;
}

/* Toon page */
.loading-spinner {
    display: inline-block;
    width: 1.5rem;
    height: 1.5rem;
    vertical-align: middle;
    border: 3px solid #23272b;
    border-top: 3px solid #00c3ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    background: transparent;
}
@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

.character-slot-table th {
    cursor: pointer;
    background: #23272b !important;
    color: #2176ae !important;
    font-family: "Orbitron", "Segoe UI", "Arial", sans-serif;
}

.character-slot-table th:hover {
    background-color: #2176ae !important;
    color: #181a20 !important;
}

/* Nav tabs on login page */
.nav-tabs {
    border-bottom: 1px solid #2176ae !important;
}

.nav-tabs .nav-link {
    background-color: #23272b !important;
    color: #2176ae !important;
    border-color: #2176ae !important;
    margin-right: 4px;
}

.nav-tabs .nav-link.active {
    background-color: #181a20 !important;
    color: #2176ae !important;
    border-color: #2176ae !important;
    border-bottom-color: #181a20 !important;
}

.nav-tabs .nav-link:hover {
    border-color: #2176ae !important;
    background-color: #2176ae22 !important;
}

/* Alert styling */
.alert {
    margin-top: 20px;
    background: #23272b !important;
    color: #2176ae !important;
    border: 1px solid #2176ae !important;
    box-shadow: 0 0 4px #2176ae22;
}
.alert-danger {
    background: #23272b !important;
    color: #ff003c !important;
    border-color: #ff003c !important;
}
.alert-success {
    background: #23272b !important;
    color: #00ffae !important;
    border-color: #00ffae !important;
}

/* Footer */
.footer {
    margin-top: 30px;
    padding: 20px 0;
    background: linear-gradient(90deg, #23272b 80%, #2176ae 100%);
    color: #2176ae;
    border-top: 2px solid #2176ae;
    box-shadow: 0 0 8px #2176ae22;
    font-family: "Orbitron", "Segoe UI", "Arial", sans-serif;
}

/* Responsive tweaks */
@media (max-width: 768px) {
    .character-avatar {
        width: 64px;
        height: 64px;
    }

    .stat-value {
        font-size: 1.2rem;
    }

    .main-content {
        padding: 10px;
    }
}

/* Bootstrap/EVE dark theme overrides */
.navbar,
.navbar-dark,
.navbar.bg-dark,
.navbar .dropdown-menu {
    background-color: #181a20 !important;
    color: #c7c7c7 !important;
    border: none !important;
}
.navbar-brand,
.navbar-nav .nav-link,
.navbar-nav .nav-link.active {
    color: #2176ae !important;
    font-family: "Orbitron", "Segoe UI", "Arial", sans-serif;
    letter-spacing: 1px;
}
.navbar-nav .nav-link:hover,
.navbar-nav .nav-link:focus {
    color: #ffe600 !important;
}
.dropdown-menu {
    background-color: #23272b !important;
    color: #c7c7c7 !important;
    border: 1px solid #2176ae !important;
}
.dropdown-item {
    color: #c7c7c7 !important;
}
.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #2176ae !important;
    color: #181a20 !important;
}

/* DataTables specific overrides */
.dataTables_wrapper .dataTables_length,
.dataTables_wrapper .dataTables_filter,
.dataTables_wrapper .dataTables_info,
.dataTables_wrapper .dataTables_processing,
.dataTables_wrapper .dataTables_paginate {
    color: #c7c7c7 !important;
    padding: 8px 0;
    margin-top: 8px;
}

.dataTables_wrapper .dataTables_length select,
.dataTables_wrapper .dataTables_filter input {
    background-color: #23272b !important;
    color: #c7c7c7 !important;
    border: 1px solid #2176ae !important;
}

/* Custom stripe classes for DataTables */
.stripe-dark-1 {
    background-color: #181a20 !important;
}

.stripe-dark-1 td {
    background-color: #181a20 !important;
    color: #c7c7c7 !important;
    border-color: #23272b !important;
}

.stripe-dark-2 {
    background-color: #23272b !important;
}

.stripe-dark-2 td {
    background-color: #23272b !important;
    color: #c7c7c7 !important;
    border-color: #23272b !important;
}

/* Table styling overrides with !important to defeat inline styles */
table.dataTable,
table.dataTable.no-footer {
    border-color: #23272b !important;
}

table.dataTable thead th,
table.dataTable thead td {
    background-color: #23272b !important;
    color: #2176ae !important;
    border-color: #2176ae !important;
}

table.dataTable tbody tr {
    background-color: #181a20 !important;
}

table.dataTable tbody tr.odd,
table.dataTable.stripe tbody tr.odd {
    background-color: #23272b !important;
}

table.dataTable tbody tr.even,
table.dataTable.stripe tbody tr.even {
    background-color: #181a20 !important;
}

table.dataTable tbody tr.odd > .sorting_1,
table.dataTable.stripe tbody tr.odd > .sorting_1,
table.dataTable.display tbody tr.odd > .sorting_1 {
    background-color: #2a303a !important;
}

table.dataTable tbody tr.even > .sorting_1,
table.dataTable.stripe tbody tr.even > .sorting_1,
table.dataTable.display tbody tr.even > .sorting_1 {
    background-color: #1e2229 !important;
}

/* Override specifically any inline style */
table.dataTable tbody tr td[style*="background-color"] {
    background-color: inherit !important;
}

/* Hover states */
table.dataTable.hover tbody tr:hover,
table.dataTable.display tbody tr:hover {
    background-color: #2176ae22 !important;
}

table.dataTable.hover tbody tr:hover td,
table.dataTable.display tbody tr:hover td {
    background-color: inherit !important;
}

/* Form controls and inputs */
.form-control,
.form-select {
    background-color: #23272b !important;
    color: #c7c7c7 !important;
    border: 1px solid #2176ae !important;
}

.form-control:focus,
.form-select:focus {
    border-color: #2176ae !important;
    box-shadow: 0 0 0 0.25rem rgba(33, 118, 174, 0.25) !important;
}

.form-text {
    color: #aaaaaa !important;
}

::placeholder {
    color: #777777 !important;
}
.card {
    background-color: #181a20 !important;
    color: #c7c7c7 !important;
    border: 1px solid #23272b !important;
    box-shadow: 0 2px 8px #000a !important;
}
.btn,
.btn-outline-secondary,
.btn-outline-light,
.btn-outline-primary,
.btn-outline-success,
.btn-outline-info,
.btn-outline-warning,
.btn-outline-danger {
    background-color: #23272b !important;
    color: #2176ae !important;
    border-color: #2176ae !important;
    font-family: "Orbitron", "Segoe UI", "Arial", sans-serif;
    font-weight: bold;
    box-shadow: 0 0 4px #2176ae22;
}
.btn:hover,
.btn:focus {
    background-color: #2176ae !important;
    color: #181a20 !important;
    border-color: #2176ae !important;
}
.modal-content {
    background-color: #23272b !important;
    color: #c7c7c7 !important;
    border: 1px solid #2176ae !important;
}

/* Skeleton loading styles */
.skeleton-item {
    position: relative;
    overflow: hidden;
}

.skeleton-text {
    width: 70%;
    height: 16px;
    background-color: #2a303a !important;
    border-radius: 4px;
    display: inline-block;
    animation: skeleton-pulse 1.5s infinite ease-in-out;
}

.skeleton-badge {
    width: 30px;
    height: 16px;
    background-color: #2a303a !important;
    animation: skeleton-pulse 1.5s infinite ease-in-out;
}

@keyframes skeleton-pulse {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        opacity: 0.6;
    }
}

.loading-indicator {
    color: #2176ae;
    font-size: 0.9rem;
}

#loading-progress-container {
    height: 10px;
    background-color: #181a20;
    border: 1px solid #2176ae;
    margin-top: 10px;
}

#loading-progress {
    transition: width 0.5s ease;
    background: linear-gradient(90deg, #181a20, #2176ae, #181a20);
    background-size: 200% 100%;
    animation: progress-animation 2s linear infinite;
}

@keyframes progress-animation {
    0% {
        background-position: 100% 0;
    }
    100% {
        background-position: -100% 0;
    }
}

/* List group styling for dark theme */
.theme-dark-list .list-group-item {
    background-color: #181a20 !important;
    color: #c7c7c7 !important;
    border-color: #2176ae !important;
    margin-bottom: 3px;
    border-radius: 4px !important;
    transition: all 0.2s ease;
    box-shadow: 0 0 4px rgba(0, 0, 0, 0.2);
}

.theme-dark-list .list-group-item:hover {
    background-color: #23272b !important;
    border-color: #2176ae !important;
    box-shadow: 0 0 8px rgba(33, 118, 174, 0.3);
}

.list-group-item.bg-dark {
    background-color: #181a20 !important;
}

.bg-dark {
    background-color: #181a20 !important;
}

.list-group-item.border-secondary {
    border-color: #2176ae !important;
}

.card .list-group-item {
    background-color: #181a20 !important;
    color: #c7c7c7 !important;
    border-color: #2176ae !important;
}

h5 {
    color: #2176ae !important;
    font-family: "Orbitron", "Segoe UI", "Arial", sans-serif;
    font-weight: bold;
    margin-bottom: 10px;
    border-bottom: 1px solid #2176ae;
    padding-bottom: 5px;
}

.text-theme-blue {
    color: #2176ae !important;
}

.modal-header {
    background-color: #181a20 !important;
    border-bottom: 1px solid #2176ae !important;
}

.modal-header .modal-title {
    color: #2176ae !important;
    font-family: "Orbitron", "Segoe UI", "Arial", sans-serif;
    font-weight: bold;
    letter-spacing: 1px;
}

.modal-header .btn-close {
    background-color: #2176ae !important;
    opacity: 0.7;
}

.modal-header .btn-close:hover {
    opacity: 1;
}

.modal-footer {
    border-top: 1px solid #2176ae !important;
    background-color: #181a20 !important;
}

.job-details-container {
    background-color: #181a20 !important;
    border: 1px solid #2176ae !important;
    border-radius: 4px;
    padding: 10px;
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.3);
}

.job-details-container > div {
    border-bottom: 1px solid #333 !important;
}

.job-details-container > div:last-child {
    border-bottom: none !important;
}

#debugModal .debug-info h6 {
    color: #2176ae !important;
    margin-top: 1rem;
    font-weight: bold;
}

#debugModal .debug-info ul {
    background-color: #181a20;
    padding: 10px 10px 10px 30px;
    border-radius: 4px;
    border: 1px solid #333;
}

#debugModal .debug-info li {
    margin-bottom: 5px;
}
