/* EVE Haul – Public Styles */

/* ── Shared ─────────────────────────────────────────────────────────────── */
.eve-haul-login-prompt {
    background: #1a1d2b;
    border: 1px solid #3a3f5c;
    border-radius: 6px;
    padding: 30px;
    text-align: center;
    color: #c9d2f0;
    font-family: 'Segoe UI', sans-serif;
}
.eve-haul-login-prompt p { font-size: 15px; margin-bottom: 16px; }
.eve-haul-btn {
    display: inline-block;
    background: #4a90d9;
    color: #fff;
    padding: 10px 24px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    transition: background 0.2s;
}
.eve-haul-btn:hover { background: #3478c3; color: #fff; }

/* ── Calculator ──────────────────────────────────────────────────────────── */
.eve-haul-calculator {
    background: #0d0f1a;
    border: 1px solid #2a2f4a;
    border-radius: 8px;
    padding: 28px 32px;
    font-family: 'Segoe UI', Tahoma, sans-serif;
    color: #c9d2f0;
    max-width: 820px;
    margin: 0 auto;
    box-sizing: border-box;
    width: 100%;
}

.eve-haul-calc-form { display: flex; flex-direction: column; gap: 18px; }

.eve-haul-field { display: flex; flex-direction: column; gap: 6px; }

.eve-haul-field label {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #7a8ab0;
}

.eve-haul-field select,
.eve-haul-field input[type="number"],
.eve-haul-field input[type="text"] {
    background: #161929;
    border: 1px solid #2e3558;
    border-radius: 4px;
    color: #e8ecf8;
    padding: 10px 14px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    transition: border-color 0.2s;
}

.eve-haul-field select:focus,
.eve-haul-field input:focus {
    outline: none;
    border-color: #4a90d9;
}

.eve-haul-hint {
    font-size: 11px;
    color: #5a6890;
    font-weight: normal;
    text-transform: none;
    letter-spacing: 0;
}

/* Warning box */
.eve-haul-warning {
    background: rgba(214, 54, 56, 0.12);
    border: 1px solid #d63638;
    border-left: 4px solid #d63638;
    border-radius: 4px;
    padding: 10px 14px;
    color: #f08080;
    font-size: 13px;
}

/* Output section */
.eve-haul-calc-output {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #2a2f4a;
}

.eve-haul-calc-output h3 {
    margin: 0 0 18px 0;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #4a90d9;
}

.eve-haul-output-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 540px) {
    .eve-haul-output-grid { grid-template-columns: 1fr; }
}

.eve-haul-output-item {
    background: #161929;
    border: 1px solid #2e3558;
    border-radius: 5px;
    padding: 12px 14px;
    position: relative;
}

.eve-haul-output-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #5a6890;
    margin-bottom: 4px;
}

.eve-haul-output-value {
    font-size: 16px;
    font-weight: 600;
    color: #e8ecf8;
    padding-right: 32px;
    word-break: break-word;
}

.eve-haul-no-copy .eve-haul-output-value { padding-right: 0; }

.eve-haul-copy-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    background: transparent;
    border: 1px solid #2e3558;
    border-radius: 3px;
    color: #5a6890;
    cursor: pointer;
    padding: 3px 6px;
    font-size: 13px;
    transition: color 0.2s, border-color 0.2s;
    line-height: 1;
}
.eve-haul-copy-btn:hover { color: #4a90d9; border-color: #4a90d9; }
.eve-haul-copy-btn.copied { color: #46b450; border-color: #46b450; }

.eve-haul-min-warning {
    font-size: 11px;
    color: #f0a030;
    margin-top: 4px;
}

.eve-haul-premium-notice {
    font-size: 11px;
    color: #7a9fd4;
    margin-top: 4px;
    line-height: 1.4;
}

/* ── Contracts shortcode ─────────────────────────────────────────────────── */
.eve-haul-contracts {
    font-family: 'Segoe UI', Tahoma, sans-serif;
}

/* Stats row */
.eve-haul-stats-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 700px) {
    .eve-haul-stats-row { grid-template-columns: 1fr; }
}

.eve-haul-stat-card {
    background: #0d0f1a;
    border: 1px solid #2a2f4a;
    border-radius: 8px;
    padding: 18px 20px;
    color: #c9d2f0;
}

.eve-haul-stat-card h3,
.eve-haul-stat-card h4 {
    margin: 0 0 14px 0;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #4a90d9;
}

/* Queue card */
.eve-haul-queue-stats {
    display: flex;
    gap: 0;
    flex-wrap: wrap;
    justify-content: space-around;
    align-items: center;
    height: calc(100% - 40px);
    padding: 10px 0;
}
.eve-haul-queue-stat {
    text-align: center;
    flex: 1;
    padding: 10px;
}
.eve-haul-queue-count {
    display: block;
    font-size: 52px;
    font-weight: 700;
    color: #e8ecf8;
    line-height: 1;
    margin-bottom: 8px;
}
.eve-haul-count-progress { color: #f0a030; }
.eve-haul-count-done     { color: #46b450; }
.eve-haul-queue-label {
    font-size: 11px;
    color: #5a6890;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* Overall stats table — aggressive overrides against WP theme styles.
   Applies to both the contracts shortcode and the standalone stats widget. */
.eve-haul-contracts .eve-haul-stat-table,
.eve-haul-stats-widget .eve-haul-stat-table,
.eve-haul-contracts .eve-haul-stat-table tbody,
.eve-haul-stats-widget .eve-haul-stat-table tbody,
.eve-haul-contracts .eve-haul-stat-table tr,
.eve-haul-stats-widget .eve-haul-stat-table tr,
.eve-haul-contracts .eve-haul-stat-table td,
.eve-haul-stats-widget .eve-haul-stat-table td {
    background: transparent !important;
    background-color: transparent !important;
    border: none !important;
    box-shadow: none !important;
    color: inherit;
}
.eve-haul-contracts .eve-haul-stat-table,
.eve-haul-stats-widget .eve-haul-stat-table {
    width: 100%;
    font-size: 13px;
    border-collapse: collapse !important;
}
.eve-haul-contracts .eve-haul-stat-table td,
.eve-haul-stats-widget .eve-haul-stat-table td {
    padding: 7px 0 !important;
    border-bottom: 1px solid #1e2235 !important;
    color: #c9d2f0 !important;
    vertical-align: middle !important;
}
.eve-haul-contracts .eve-haul-stat-table tr:last-child td,
.eve-haul-stats-widget .eve-haul-stat-table tr:last-child td {
    border-bottom: none !important;
}
.eve-haul-contracts .eve-haul-stat-table td:first-child,
.eve-haul-stats-widget .eve-haul-stat-table td:first-child { color: #7a8ab0 !important; }
.eve-haul-contracts .eve-haul-stat-table td:last-child,
.eve-haul-stats-widget .eve-haul-stat-table td:last-child {
    text-align: right !important;
    color: #e8ecf8 !important;
    font-weight: 600 !important;
}

/* Per-route cards */
.eve-haul-route-stats-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.eve-haul-route-stat-card {
    flex: 1 1 180px;
    min-width: 150px;
    padding: 14px 16px;
}
.eve-haul-route-orders { font-size: 20px; font-weight: 700; color: #e8ecf8; margin: 0 0 4px 0; }
.eve-haul-route-reward { font-size: 13px; color: #46b450; margin: 0; }

/* Tabs */
.eve-haul-tabs {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #2a2f4a;
    margin-bottom: 0;
}
.eve-haul-tab {
    padding: 10px 20px;
    font-size: 13px;
    font-weight: 600;
    color: #7a8ab0;
    text-decoration: none;
    border: 2px solid transparent;
    border-bottom: none;
    margin-bottom: -2px;
    border-radius: 4px 4px 0 0;
    transition: color 0.2s;
}
.eve-haul-tab:hover { color: #c9d2f0; }
.eve-haul-tab.active {
    color: #4a90d9;
    border-color: #2a2f4a;
    border-bottom-color: #0d0f1a;
    background: #0d0f1a;
}

/* Contracts table */
.eve-haul-table-wrap {
    overflow-x: auto;
    background: #0d0f1a;
    border: 1px solid #2a2f4a;
    border-top: none;
    border-radius: 0 0 6px 6px;
}

.eve-haul-contracts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    color: #c9d2f0;
}

.eve-haul-contracts-table th {
    background: #161929;
    padding: 10px 14px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    color: #5a6890;
    border-bottom: 1px solid #2a2f4a;
    white-space: nowrap;
}
.eve-haul-contracts-table th a {
    color: inherit;
    text-decoration: none;
}
.eve-haul-contracts-table th a:hover { color: #4a90d9; }

.eve-haul-contracts-table td {
    padding: 10px 14px;
    border-bottom: 1px solid #1e2235;
    vertical-align: top;
    background: #0d0f1a !important;
    background-color: #0d0f1a !important;
    color: #c9d2f0 !important;
}

.eve-haul-contracts-table tbody tr:nth-child(odd) td,
.eve-haul-contracts-table tbody tr:nth-child(even) td {
    background: #0d0f1a !important;
    background-color: #0d0f1a !important;
}

.eve-haul-contracts-table tbody tr:hover td {
    background: #1a1f35 !important;
    background-color: #1a1f35 !important;
}

.eve-haul-location-warn {
    display: block;
    font-size: 11px;
    color: #f0a030;
    margin-top: 3px;
}

/* Route mismatch warnings in contract rows */
.eve-haul-row-warnings-cell {
    min-width: 200px;
}
.eve-haul-row-warning {
    font-size: 11px;
    color: #f0a030;
    background: rgba(240, 160, 48, 0.08);
    border-left: 2px solid #f0a030;
    padding: 3px 7px;
    margin-bottom: 3px;
    border-radius: 0 3px 3px 0;
    line-height: 1.4;
}

.eve-haul-row-ok {
    font-size: 11px;
    color: #46b450;
    background: rgba(70, 180, 80, 0.08);
    border-left: 2px solid #46b450;
    padding: 3px 7px;
    border-radius: 0 3px 3px 0;
    line-height: 1.4;
}

/* Delete button */
.eve-haul-delete-cell {
    width: 32px;
    text-align: center;
    padding: 10px 8px !important;
}
.eve-haul-delete-btn {
    background: transparent;
    border: 1px solid transparent;
    border-radius: 3px;
    color: #6b2c2c;
    cursor: pointer;
    font-size: 14px;
    line-height: 1;
    padding: 3px 6px;
    transition: color 0.15s, border-color 0.15s, background 0.15s;
}
.eve-haul-delete-btn:hover {
    color: #e05555;
    border-color: #e05555;
    background: rgba(224, 85, 85, 0.1);
}
.eve-haul-delete-btn:disabled { opacity: 0.4; cursor: not-allowed; }

/* Pagination */
.eve-haul-pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    padding: 16px;
    background: #0d0f1a;
    border: 1px solid #2a2f4a;
    border-top: none;
    border-radius: 0 0 6px 6px;
}
.eve-haul-page-btn {
    background: #161929;
    border: 1px solid #2e3558;
    border-radius: 4px;
    color: #7a8ab0;
    padding: 6px 14px;
    text-decoration: none;
    font-size: 13px;
    transition: color 0.2s, border-color 0.2s;
}
.eve-haul-page-btn:hover { color: #4a90d9; border-color: #4a90d9; }
.eve-haul-page-info { color: #5a6890; font-size: 13px; }

.eve-haul-empty-table {
    background: #0d0f1a;
    border: 1px solid #2a2f4a;
    border-top: none;
    padding: 30px;
    text-align: center;
    color: #5a6890;
    font-style: italic;
    border-radius: 0 0 6px 6px;
}

/* ── Max collateral warning ──────────────────────────────────────────────── */
.eve-haul-max-col-warning {
    font-size: 12px;
    color: #e05555;
    background: rgba(224, 85, 85, 0.08);
    border-left: 2px solid #e05555;
    padding: 5px 8px;
    margin-top: 6px;
    border-radius: 0 3px 3px 0;
}

/* ── Coupon input ────────────────────────────────────────────────────────── */
#ehc-coupon {
    background: #161929;
    border: 1px solid #2e3558;
    border-radius: 4px;
    color: #e8ecf8;
    padding: 10px 14px;
    font-size: 14px;
    box-sizing: border-box;
    transition: border-color 0.2s;
}
#ehc-coupon:focus { outline: none; border-color: #4a90d9; }

/* ── Hauler stats table ──────────────────────────────────────────────────── */
.eve-haul-hauler-stats .eve-haul-table-wrap { border-radius: 6px; }
.eve-haul-hauler-stats .eve-haul-contracts-table th { cursor: pointer; user-select: none; white-space: nowrap; }
.eve-haul-hauler-stats .eve-haul-contracts-table th:hover { color: #4a90d9; }
.eh-sort-icon { color: #4a90d9; }

/* ── Stats widget (standalone shortcode) ─────────────────────────────────── */
.eve-haul-stats-widget { font-family: 'Segoe UI', Tahoma, sans-serif; }
.eve-haul-stats-widget .eve-haul-stat-card {
    margin-bottom: 16px;
    background: #0d0f1a !important;
    background-color: #0d0f1a !important;
    border: 1px solid #2a2f4a;
    color: #c9d2f0;
}
.eve-haul-stats-widget .eve-haul-stat-card h3 {
    color: #4a90d9;
    margin: 0 0 14px 0;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.eve-haul-in-progress-widget { font-family: 'Segoe UI', Tahoma, sans-serif; }
.eve-haul-in-progress-widget .eve-haul-stat-card {
    background: #0d0f1a !important;
    background-color: #0d0f1a !important;
    border: 1px solid #2a2f4a;
    color: #c9d2f0;
}
.eve-haul-in-progress-widget .eve-haul-stat-card h3 {
    color: #4a90d9;
    margin: 0 0 14px 0;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

/* ── Pink warning messages ───────────────────────────────────────────────── */
.eve-haul-row-pink {
    font-size: 11px;
    color: #ff69b4;
    background: rgba(255, 105, 180, 0.08);
    border-left: 2px solid #ff69b4;
    padding: 3px 7px;
    margin-bottom: 3px;
    border-radius: 0 3px 3px 0;
    line-height: 1.4;
    font-weight: 700;
}

/* ── Word boundary wrapping — no mid-word breaks ─────────────────────────── */
.eve-haul-contracts-table td {
    word-break: normal !important;
    overflow-wrap: break-word;
    word-wrap: break-word;
}

/* Priority shipping toggle switch */
#ehc-priority-field label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    color: #c9d2f0;
    font-size: 14px;
    user-select: none;
}

/* Hide native checkbox */
#ehc-priority-field input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

/* Toggle track */
.eve-haul-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    background: #2e3558;
    border-radius: 13px;
    border: 1px solid #4a90d9;
    transition: background 0.2s;
    flex-shrink: 0;
}

/* Toggle knob */
.eve-haul-toggle::after {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #5a6890;
    border-radius: 50%;
    transition: left 0.2s, background 0.2s;
}

/* Checked state — input is sibling before label */
#ehc-priority:checked + label .eve-haul-toggle {
    background: #4a90d9;
}
#ehc-priority:checked + label .eve-haul-toggle::after {
    left: 25px;
    background: #fff;
}

/* ── EveWho character/corporation links ──────────────────────────────────── */
.eve-haul-contracts-table .eve-haul-evewho-link,
.eve-haul-hauler-stats .eve-haul-evewho-link,
.eve-haul-top-customers .eve-haul-evewho-link {
    color: inherit !important;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 2px;
    word-break: normal;
}
.eve-haul-contracts-table .eve-haul-evewho-link:hover,
.eve-haul-hauler-stats .eve-haul-evewho-link:hover,
.eve-haul-top-customers .eve-haul-evewho-link:hover {
    text-decoration-style: solid;
}
