/* ================================================================== */
/* Settings Panel                                                     */
/* ================================================================== */
/* Settings panel sits slightly lower than other panels */
#settings-panel {
    top: 228px;
}
#settings-panel.settings-panel--open {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
    transition:
        opacity 0.22s ease,
        transform 0.22s ease;
}

/* .stp-inner - Settings Panel inner scroll container (named to avoid
   collision with .sp-inner used by the Ship Panel) */
.stp-inner {
    padding: 32px 30px 40px;
    height: 100%;
    overflow-y: auto;
    box-sizing: border-box;
}

.sp-header {
    font-size: var(--font-size-lg);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--gold);
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
    padding-bottom: 12px;
    margin-bottom: 24px;
}

/* Diverges intentionally from .panel-section-title - muted white, recurring sub-heading with top margin, no border. */
.sp-section-title {
    font-size: var(--font-size-base);
    font-weight: 700;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 14px;
    margin-top: 24px;
}
.sp-section-title:first-of-type {
    margin-top: 0;
}

/* Styled versions of the original control-panel elements */
#settings-panel label {
    display: block;
    font-size: var(--font-size-base);
    color: rgba(255, 255, 255, 0.45);
    margin-bottom: 5px;
    margin-top: 12px;
    letter-spacing: 0.04em;
}
#settings-panel label:first-child {
    margin-top: 0;
}
#settings-panel input[type='range'] {
    width: 100%;
    accent-color: var(--gold);
    cursor: pointer;
}
#settings-panel input[type='color'] {
    width: 100%;
    height: 28px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 3px;
    background: none;
    cursor: pointer;
    padding: 0 2px;
}
#settings-panel .val-display {
    color: var(--gold);
    font-family: var(--font-body);
    font-size: var(--font-size-base);
}
#settings-panel .ctrl-group {
    margin-top: 16px;
}

.sp-map-btns {
    display: flex;
    gap: var(--space-xs);
    margin-top: 10px;
}
.sp-map-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.5);
    font-size: var(--font-size-base);
    font-weight: 600;
    letter-spacing: 0.05em;
    padding: 7px 0;
    border-radius: 3px;
    cursor: pointer;
    transition:
        background 0.15s,
        border-color 0.15s,
        color 0.15s;
}
.sp-map-btn:hover {
    background: rgba(197, 160, 89, 0.1);
    border-color: rgba(197, 160, 89, 0.3);
    color: var(--gold);
}

.sp-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.05);
    margin: 28px 0;
}

.sp-logout-btn {
    width: 100%;
    background: rgba(180, 40, 40, 0.1);
    border: 1px solid rgba(180, 40, 40, 0.35);
    color: rgba(220, 80, 80, 0.85);
    font-size: var(--font-size-lg);
    font-weight: 700;
    letter-spacing: 0.07em;
    text-transform: uppercase;
    padding: 11px;
    border-radius: 4px;
    cursor: pointer;
    transition:
        background 0.15s,
        border-color 0.15s;
    margin-top: 8px;
}
.sp-logout-btn:hover {
    background: rgba(180, 40, 40, 0.22);
    border-color: rgba(220, 80, 80, 0.6);
}

/* ================================================================== */
/* Notification System                                                */
/* ================================================================== */
#notif-panel {
    position: fixed;
    top: 228px;
    right: 0;
    width: min(300px, 94vw);
    bottom: 0;
    z-index: calc(var(--z-system-popup) + 500);
    background: #080b10;
    border-left: 1px solid rgba(197, 160, 89, 0.15);
    box-shadow: -8px 0 30px rgba(0, 0, 0, 0.6);
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transform: translateX(12px);
    pointer-events: none;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease,
        visibility 0s linear 0.2s;
}
#notif-panel.notif-panel--open {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    pointer-events: auto;
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.notif-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    flex-shrink: 0;
}

.notif-panel-title {
    font-family: var(--font-heading);
    font-size: var(--font-size-lg);
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--gold);
}

.notif-panel-close {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.35);
    font-size: var(--font-size-xl);
    cursor: pointer;
    padding: 2px 6px;
    border-radius: 3px;
    transition: color 0.15s;
}
.notif-panel-close:hover {
    color: #fff;
}

.notif-clear-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.25);
    font-size: var(--font-size-base);
    letter-spacing: 0.04em;
    cursor: pointer;
    padding: 0;
    transition: color 0.15s;
}
.notif-clear-btn:hover {
    color: rgba(197, 160, 89, 0.7);
}

#notifications-log {
    flex: 1;
    overflow-y: auto;
    padding: 8px 0;
}

/* .notif-empty - migrated to canonical .empty-state (base.css) */

.notif-item {
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
    padding: 9px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    transition: background 0.12s;
}
.notif-item:hover {
    background: rgba(255, 255, 255, 0.03);
}

.notif-item-icon {
    font-size: var(--font-size-2xl);
    flex-shrink: 0;
    margin-top: 1px;
}

.notif-item-body {
    flex: 1;
    min-width: 0;
}

.notif-item-title {
    font-size: var(--font-size-lg);
    color: #c8d0da;
    font-weight: 600;
    line-height: 1.3;
    white-space: pre-line;
}

.notif-item-desc {
    font-size: var(--font-size-base);
    color: rgba(255, 255, 255, 0.38);
    margin-top: 2px;
    white-space: pre-line;
}

.notif-item-age {
    font-size: var(--font-size-base);
    color: rgba(255, 255, 255, 0.2);
    font-family: var(--font-body);
    flex-shrink: 0;
    margin-top: 2px;
}

/* #notif-badge styling handled by .hact-badge in the header action bar */

/* ================================================================== */
/* Time Allocation System - Task Config Modal                         */
/* ================================================================== */
#task-config-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: var(--z-system-popup);
    align-items: center;
    justify-content: center;
}
#task-config-modal.task-modal--open {
    display: flex;
}

/* .btn { display: inline-flex } overrides the UA [hidden] rule - hide footer actions explicitly */
#task-config-modal .ms-footer .btn[hidden] {
    display: none !important;
}

/* Inputs/materials line */
.task-modal-inputs-line {
    padding: 6px 20px 10px;
    font-size: var(--font-size-base);
    color: rgba(160, 190, 220, 0.6);
    letter-spacing: 0.03em;
    display: flex;
    flex-direction: column;
    gap: var(--space-md);
    align-items: stretch;
}
.task-io-grid {
    width: 100%;
}
/* Insufficient material state on inventory-style IO slots */
.sp-hold-slot.task-io-slot--insufficient {
    background: rgba(180, 40, 40, 0.15);
    border-color: rgba(200, 60, 60, 0.45);
}
.sp-hold-slot.task-io-slot--insufficient .sp-hold-slot-name {
    color: rgba(255, 120, 100, 0.9);
}
/* task-io-label styled like task-modal-qty-divider - horizontal rule with centred text */
.task-io-label {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
    font-size: var(--font-size-xs);
    letter-spacing: 0.12em;
    color: rgba(255, 255, 255, 0.28);
    text-transform: uppercase;
}
.task-io-label::before,
.task-io-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: rgba(255, 255, 255, 0.07);
}
.task-modal-warning {
    margin: 6px 20px 0;
    padding: 12px 14px;
    background: rgba(130, 25, 25, 0.35);
    border: 1px solid rgba(180, 50, 50, 0.4);
    border-radius: 5px;
    display: flex;
    align-items: flex-start;
    gap: var(--space-sm);
}
.task-modal-warning-icon {
    font-size: var(--font-size-lg);
    color: rgba(255, 150, 130, 0.7);
    flex-shrink: 0;
    margin-top: 1px;
}
.task-modal-warning-body {
    display: flex;
    flex-direction: column;
    gap: var(--space-2xs);
    flex: 1;
}
.task-modal-warning-title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: rgba(255, 220, 210, 0.95);
}
.task-modal-warning-sub {
    font-size: var(--font-size-base);
    color: rgba(255, 170, 155, 0.75);
}
.task-modal-warning--queue-ready {
    background: color-mix(in srgb, var(--gold) 12%, transparent);
    border-color: color-mix(in srgb, var(--gold) 35%, transparent);
}
.task-modal-warning--queue-ready .task-modal-warning-icon {
    color: var(--gold);
}
.task-modal-warning--queue-ready .task-modal-warning-title {
    color: color-mix(in srgb, var(--gold) 85%, white);
}
.task-modal-warning--queue-ready .task-modal-warning-sub {
    color: color-mix(in srgb, var(--gold) 55%, var(--text-muted));
}
/* Smithing: stacked alerts (unknown recipe + level) */
#task-modal-warning.task-modal-warnings-stack {
    margin: 6px 20px 0;
    padding: 0;
    background: transparent;
    border: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
    align-items: stretch;
}
#task-modal-warning.task-modal-warnings-stack > .task-modal-warning {
    margin: 0;
}

/* ================================================================== */
/* Fuel Source Cards                                                  */
/* ================================================================== */
.task-fuel-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-sm);
}
.task-fuel-cards:has(.task-fuel-card:only-child) {
    grid-template-columns: 1fr;
}

.task-fuel-card {
    position: relative;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 12px 12px 10px;
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
    transition:
        background 0.15s,
        border-color 0.15s;
}
.task-fuel-card--selectable {
    cursor: pointer;
}
.task-fuel-card--selectable:hover {
    background: rgba(197, 160, 89, 0.07);
    border-color: rgba(197, 160, 89, 0.25);
}
.task-fuel-card--active {
    background: rgba(197, 160, 89, 0.1);
    border-color: rgba(197, 160, 89, 0.55);
}
.task-fuel-card--insufficient {
    background: rgba(180, 40, 40, 0.1);
    border-color: rgba(200, 60, 60, 0.4);
}

.task-fuel-card__radio {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 18px;
    height: 18px;
    border: 1.5px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.task-fuel-card--active .task-fuel-card__radio {
    border-color: var(--gold);
    background: rgba(197, 160, 89, 0.15);
}
.task-fuel-card__check {
    width: 11px;
    height: 9px;
    color: var(--gold);
    display: block;
    flex-shrink: 0;
}

.task-fuel-card__main {
    display: flex;
    align-items: center;
    gap: 10px;
}

.task-fuel-card__icon {
    width: 36px;
    height: 36px;
    flex-shrink: 0;
}
.task-fuel-card__icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.task-fuel-card__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}
.task-fuel-card__title {
    font-size: var(--font-size-lg);
    font-weight: 700;
    color: rgba(255, 255, 255, 0.9);
    letter-spacing: 0.02em;
    padding-right: 22px;
}
.task-fuel-card--active .task-fuel-card__title {
    color: var(--gold);
}
.task-fuel-card--insufficient .task-fuel-card__title {
    color: rgba(255, 120, 100, 0.9);
}
.task-fuel-card__sub {
    font-size: var(--font-size-base);
    color: rgba(255, 255, 255, 0.45);
}
.task-fuel-card__avail {
    font-size: var(--font-size-base);
    color: rgba(255, 255, 255, 0.3);
}

.task-fuel-card__footer {
    font-size: var(--font-size-base);
    color: rgba(255, 255, 255, 0.28);
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 8px;
    margin-top: 2px;
    display: flex;
    align-items: center;
    gap: 5px;
}
.task-fuel-card__footer img {
    width: 13px;
    height: 13px;
    opacity: 0.5;
    flex-shrink: 0;
}
