html {
  font-size: 14px;
}

@media (min-width: 768px) {
  html {
    font-size: 16px;
  }
}

html {
  position: relative;
  min-height: 100%;
}

body {
  margin-bottom: 60px;
  background: #0a0e1a;
  color: #c5d4e8;
}

#resp-table {
    width: 100%;
    display: table;
}

#resp-table-caption {
    display: table-caption;
    text-align: center;
    font-size: 30px;
    font-weight: bold;
}

#resp-table-header {
    display: table-header-group;
    background-color: #1a2332;
    font-weight: bold;
    font-size: 25px;
}

.table-header-cell {
    display: table-cell;
    padding: 10px;
    text-align: justify;
    border-bottom: 1px solid #2d3f5f;
}

#resp-table-body {
    display: table-row-group;
}

.resp-table-row {
    display: table-row;
}

.table-body-cell {
    display: table-cell;
}

#resp-table-footer {
    display: table-footer-group;
    background-color: #1a2332;
    font-weight: bold;
    font-size: 25px;
    color: rgba(197, 212, 232, 0.45);
}

.table-footer-cell {
    display: table-cell;
    padding: 10px;
    text-align: justify;
    border-bottom: 1px solid #2d3f5f;
}

/* DROP DOWN */
/* Dropdown Button */
.dropbtn {
    background-color: #3a7ca5;
    color: #e8f1f5;
    padding: 6px;
    font-size: 16px;
    border: none;
    cursor: pointer;
}

/* Dropdown button on hover & focus */
.dropbtn:hover, .dropbtn:focus {
    background-color: #2c5f7f;
}

/* The container <div> - needed to position the dropdown content */
.dropdown {
    position: relative;
    display: inline-block;
}

/* Dropdown Content (Hidden by Default) */
.dropdown-content {
    display: none;
    position: absolute;
    background-color: #1a2332;
    min-width: 160px;
    box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.4);
    z-index: 1;
}

    /* Links inside the dropdown */
    .dropdown-content a {
        color: #c5d4e8;
        padding: 12px 16px;
        text-decoration: none;
        display: block;
    }

/* Change color of dropdown links on hover */
.dropdown-content a:hover {
    background-color: #2d3f5f;
}

/* Show the dropdown menu (use JS to add this class to the .dropdown-content container when the user clicks on the dropdown button) */
.show {
    display: block;
}


/* LISTBOXES */
.dropbtn {
    background-color: #3a7ca5;
    color: #e8f1f5;
    padding: 2px;
    font-size: 16px;
    border: none;
    cursor: pointer;
}

.dropbtn:hover, .dropbtn:focus {
    background-color: #2c5f7f;
}

#txtRankF {
    box-sizing: border-box;
    background-image: url('searchicon.png');
    background-position: 14px 12px;
    background-repeat: no-repeat;
    font-size: 16px;
    padding: 14px 20px 12px 45px;
    border: none;
    border-bottom: 1px solid #2d3f5f;
}

#txtRankF:focus {
    outline: 3px solid #3a7ca5;
}

.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-content {
    display: none;
    position: absolute;
    background-color: #1a2332;
    overflow: auto;
    border: 1px solid #2d3f5f;
    z-index: 1;
    width: 100%;
}

.dropdown-content a {
    color: #c5d4e8;
    padding: 12px 16px;
    text-decoration: none;
    display: block;
}

.dropdown a:hover {
    background-color: #2d3f5f;
}
.show {
    display: block;
}

input {
    autocomplete:off;
}


.tab-container {
    margin: 2rem auto 0 auto;
    max-width: 1200px;
}

.tab-header {
    display: flex;
    border-bottom: 2px solid #3a7ca5;
    background: #141b28;
    border-radius: 14px 14px 0 0;
    overflow: hidden;
}

.tab-header button {
    flex: 1;
    padding: 1rem 0.5rem;
    background: none;
    border: none;
    font-size: 1.2em;
    color: #7a8ea8;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
    outline: none;
}

    .tab-header button.active {
        background: #1a2332;
        color: #5eb3e4;
        font-weight: bold;
        border-bottom: 2px solid #5eb3e4;
    }

.tab-content {
    background: #0f1621;
    border: 2px solid #2d3f5f;
    border-radius: 0 0 14px 14px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    padding: 2rem 1.5rem;
    min-height: 400px;
}

.contract-item {
    background: #141b28;
    border: 1.5px solid #2d3f5f;
    border-radius: 10px;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
}

.contract-body {
    border-top: none;
    border-radius: 0 0 7px 7px;
    padding: 1em;
    background: #141b28;
    padding: 0.8rem 0.7rem;
}

.cargo-box {
    background: #1a2332;
    border: 1px solid #3a7ca5; 
    border-radius: 8px;
    margin-bottom: 1rem;
}

.cargo-content-box {
    padding: 0.8rem 0.7rem;
}

.transfer-area {
    background: #0f1621;
    border: 1.5px solid #2d3f5f;
    border-radius: 8px;
    padding: 0.7rem 0.6rem 0.5rem 0.6rem;
    margin-bottom: 0.7rem;
    margin-top: 0.3rem;
}

    .transfer-area label {
        color: #7a8ea8;
    }

.add-btn {
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    padding: 0.2em 0.8em;
    font-size: 1em;
    border-radius: 6px;
    border: 1px solid #3a7ca5;
    background: #1a3a52;
    color: #5eb3e4;
    cursor: pointer;
    transition: background 0.2s;
}

    .add-btn:hover {
        background: #2d5573;
    }

.delete-btn {
    background: none;
    border: none;
    padding: 0;
    margin-right: 0.5em;
    cursor: pointer;
    vertical-align: middle;
}

.delete-btn img {
    width: 18px;
    height: 18px;
    vertical-align: middle;
    filter: brightness(0) saturate(100%) invert(66%) sepia(18%) saturate(1087%) hue-rotate(170deg) brightness(95%) contrast(88%);
}

.location-input {
    width: 100%;
    min-width: 180px;
    max-width: 400px;
    flex: 2 1 0;
}

.location-select {
    width: 80px;
    min-width: 60px;
    flex: 0 0 auto;
}

.transfer-row {
    display: flex;
    align-items: center;
    gap: 0.5em;
    margin-bottom: 0.5em;
}

.add-cargo-btn {
    background: #2d3f5f;
    color: #c5d4e8;
    border: 1px solid #3a7ca5;
    border-radius: 5px;
    padding: 0.5em 1.2em;
    font-size: 1em;
    cursor: pointer;
    margin-bottom: 1em;
    transition: background 0.2s;
}

    .add-cargo-btn:hover {
        background: #3a5173;
    }

.delete-cargo-btn img {
    vertical-align: middle;
    filter: brightness(0) saturate(100%) invert(66%) sepia(18%) saturate(1087%) hue-rotate(170deg) brightness(95%) contrast(88%);
}

.add-contract-btn {
    background: #2d3f5f;
    color: #c5d4e8;
    border: 1px solid #3a7ca5;
    border-radius: 5px;
    padding: 0.7em 1.5em;
    font-size: 1.1em;
    cursor: pointer;
    transition: background 0.2s;
}

    .add-contract-btn:hover {
        background: #3a5173;
    }

.delete-contract-btn img {
    vertical-align: middle;
    filter: brightness(0) saturate(100%) invert(66%) sepia(18%) saturate(1087%) hue-rotate(170deg) brightness(95%) contrast(88%);
}

.autocomplete-list {
    position: absolute;
    background-color: #141b28;
    border: 1px solid #2d3f5f;
    border-radius: 0 0 8px 8px;
    border-top: none;
    max-height: 300px;
    overflow-y: auto;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.4);
    margin-top: 0;
    width: 100%;
    top: 100%;
    left: 0;
}

.autocomplete-wrapper {
    position: relative;
}

.autocomplete-dropdown-icon {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.autocomplete-dropdown-icon:hover {
    background-color: rgba(58, 124, 165, 0.2);
}

.autocomplete-dropdown-icon img {
    width: 12px;
    height: 12px;
    pointer-events: none;
    filter: brightness(0) saturate(100%) invert(66%) sepia(18%) saturate(1087%) hue-rotate(170deg) brightness(95%) contrast(88%);
}

/* Add padding to inputs to make room for the icon */
.autocomplete-wrapper input {
    padding-right: 32px !important;
    caret-color: transparent;
    background-color: #1a2332;
    color: #c5d4e8;
    border: 1px solid #2d3f5f;
}

.autocomplete-wrapper input:focus {
    border-color: #3a7ca5;
    outline: none;
    box-shadow: 0 0 0 2px rgba(58, 124, 165, 0.2);
}

/* Skjul cursor altid på autocomplete input-felter med værdi */
.autocomplete-wrapper input[value]:not(:focus) {
    caret-color: transparent !important;
}

.autocomplete-wrapper input:focus {
    caret-color: auto;
}

/* Skjul cursor når input ikke har fokus */
#shipSelect:not(:focus),
#quantumDriveSelect:not(:focus),
.commodity-input:not(:focus),
.location-input:not(:focus) {
    caret-color: transparent;
}

.autocomplete-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #2d3f5f;
    color: #c5d4e8;
    transition: background-color 0.2s;
}

.autocomplete-item:hover {
    background-color: #2d3f5f;
}

.autocomplete-item:last-child {
    border-bottom: none;
    border-radius: 0 0 8px 8px;
}

.fieldSkipValidate {
}

.fieldError {
    border: 2px solid #e74c3c;
    box-shadow: 0 0 4px rgba(231, 76, 60, 0.5);
}

/* Form controls */
.form-control {
    background-color: #1a2332;
    color: #c5d4e8;
    border: 1px solid #2d3f5f;
    padding: 0.5em;
}

.form-control:focus {
    background-color: #1f2a3d;
    border-color: #3a7ca5;
    outline: none;
    box-shadow: 0 0 0 2px rgba(58, 124, 165, 0.2);
    color: #c5d4e8;
}

/* Custom Checkbox Styling */
input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 1.2em;
    height: 1.2em;
    border: 2px solid #3a7ca5;
    border-radius: 3px;
    background-color: #1a2332;
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

input[type="checkbox"]:hover {
    border-color: #5eb3e4;
    box-shadow: 0 0 5px rgba(94, 179, 228, 0.3);
}

input[type="checkbox"]:checked {
    background-color: #3a7ca5;
    border-color: #5eb3e4;
}

input[type="checkbox"]:checked::after {
    content: '';
    position: absolute;
    left: 0.3em;
    top: 0.05em;
    width: 0.35em;
    height: 0.6em;
    border: solid #e8f1f5;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* Route checkbox specific styling */
.route-checkbox {
    width: 1.2em;
    height: 1.2em;
}

/* Tooltip styles */
.action-tooltip {
    position: absolute;
    z-index: 10000;
    pointer-events: none;
    animation: fadeIn 0.2s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.route-action-refuel {
    color: #5eb3e4;
}

.route-action-loading {
    color: #6fc276;
}

.route-action-offloading {
    color: #e74c3c;
}

.stop-location-header {
    font-weight: bold;
    font-size: 1.15em;
    color: #5eb3e4;
}

.stop-location-describer {
    color: #7a8ea8;
    font-size: 0.9em;
    margin-top: 0.2em;
    font-weight: normal;
}

/* Calculate Route Button */
.calculate-route-btn {
    background: linear-gradient(135deg, #3a7ca5 0%, #2c5f7f 100%);
    border: 1px solid #5eb3e4;
}

.calculate-route-btn:hover {
    background: linear-gradient(135deg, #2c5f7f 0%, #1f4a63 100%);
    box-shadow: 0 0 10px rgba(94, 179, 228, 0.3);
}

.calculate-route-btn:disabled {
    background: #2d3f5f;
    border-color: #1a2332;
    color: #7a8ea8;
    cursor: not-allowed;
}