/*
 * StarshipOS — Targeting Solution Puzzle Styles (CC_066 P3)
 * Military-tactical theme: dark navy, amber text, grid overlays.
 */

/* ── Container ─────────────────────────────────────────────────────────── */
.targeting-puzzle-container {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    color: #c8a84b;
    background: #0b0f1c;
    font-family: 'Courier New', Courier, monospace;
    border: 1px solid #1a2a4a;
    border-radius: var(--puzzle-radius);
    background-image:
        linear-gradient(rgba(26, 42, 74, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 42, 74, 0.3) 1px, transparent 1px);
    background-size: 40px 40px;
}

/* ── Header ─────────────────────────────────────────────────────────────── */
.targeting-puzzle-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0.75rem;
    background: rgba(26, 42, 74, 0.7);
    border: 1px solid #2a4a7a;
    border-radius: var(--puzzle-radius);
}

.targeting-puzzle-title {
    font-size: 0.85rem;
    font-weight: 700;
    color: #fbbf24;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    text-shadow: 0 0 8px rgba(251, 191, 36, 0.4);
}

.targeting-score-badge {
    font-size: 0.8rem;
    color: #c8a84b;
    font-weight: 700;
    letter-spacing: 0.06em;
}

/* ── Panel Label ────────────────────────────────────────────────────────── */
.targeting-panel-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: #fbbf24;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin: 0 0 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #2a4a7a;
}

.targeting-section-label {
    font-size: 0.7rem;
    color: #8a7a4a;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0.5rem 0 0.25rem;
}

/* ── Main Grid Layout ───────────────────────────────────────────────────── */
.targeting-main-grid {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 1rem;
    align-items: start;
}

/* ── Profile Panel ──────────────────────────────────────────────────────── */
.targeting-profile-panel {
    background: rgba(10, 15, 30, 0.8);
    border: 1px solid #2a4a7a;
    border-radius: var(--puzzle-radius);
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.targeting-silhouette {
    display: flex;
    justify-content: center;
    padding: 0.25rem;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid #1a3a6a;
    border-radius: 4px;
}

.targeting-ship-svg { width: 100%; max-width: 120px; }

/* ── Stats Table ────────────────────────────────────────────────────────── */
.targeting-stats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.72rem;
}

.targeting-stat-label {
    padding: 0.2rem 0.3rem;
    color: #8a7a4a;
    text-transform: uppercase;
    font-size: 0.65rem;
    letter-spacing: 0.05em;
    width: 50%;
}

.targeting-stat-value {
    padding: 0.2rem 0.3rem;
    color: #fbbf24;
    font-weight: 600;
    font-size: 0.72rem;
}

/* ── Weakness / Strength ────────────────────────────────────────────────── */
.targeting-label--weakness { color: #e63946 !important; }
.targeting-label--strength { color: #2ecc71 !important; }

.targeting-trait-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.targeting-trait {
    padding: 0.15rem 0.4rem;
    font-size: 0.68rem;
    border-radius: 2px;
}

.targeting-trait--weakness {
    background: rgba(230, 57, 70, 0.1);
    color: #e88;
    border-left: 2px solid #e63946;
}

.targeting-trait--strength {
    background: rgba(46, 204, 113, 0.1);
    color: #8e8;
    border-left: 2px solid #2ecc71;
}

/* ── Hints ──────────────────────────────────────────────────────────────── */
.targeting-hints-section { margin-top: 0.25rem; }

.targeting-hint-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.targeting-hint-item {
    font-size: 0.68rem;
    color: #a09060;
    padding: 0.1rem 0.25rem;
    border-left: 1px solid #4a3a1a;
}

/* ── Selection Panel ────────────────────────────────────────────────────── */
.targeting-selection-panel {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

/* ── Weapon Carousel ────────────────────────────────────────────────────── */
.targeting-weapon-section {
    background: rgba(10, 15, 30, 0.8);
    border: 1px solid #2a4a7a;
    border-radius: var(--puzzle-radius);
    padding: 0.75rem;
}

.targeting-weapon-carousel {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.4rem;
}

.targeting-weapon-card {
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    padding: 0.4rem 0.5rem;
    background: rgba(26, 42, 74, 0.5);
    border: 1px solid #2a4a7a;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}

.targeting-weapon-card:hover {
    background: rgba(42, 74, 122, 0.7);
    border-color: #4a7aaa;
}

.targeting-weapon-card--selected {
    background: rgba(251, 191, 36, 0.1) !important;
    border-color: #fbbf24 !important;
    box-shadow: 0 0 8px rgba(251, 191, 36, 0.2);
}

.targeting-weapon-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fbbf24;
    letter-spacing: 0.04em;
}

.targeting-weapon-desc {
    font-size: 0.62rem;
    color: #8a7a4a;
    line-height: 1.3;
}

.targeting-weapon-stats {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.2rem;
}

.targeting-weapon-dmg,
.targeting-weapon-ammo {
    font-size: 0.62rem;
    color: #c8a84b;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.1rem 0.3rem;
    border-radius: 2px;
}

/* ── Compass ────────────────────────────────────────────────────────────── */
.targeting-vector-section {
    background: rgba(10, 15, 30, 0.8);
    border: 1px solid #2a4a7a;
    border-radius: var(--puzzle-radius);
    padding: 0.75rem;
}

.targeting-compass-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}

.targeting-compass-svg {
    width: 160px;
    height: 160px;
    cursor: pointer;
}

.targeting-sector {
    cursor: pointer;
    transition: fill 0.15s;
}

.targeting-sector:hover {
    fill: rgba(251, 191, 36, 0.15) !important;
    stroke: #fbbf24 !important;
}

.targeting-sector--active {
    fill: rgba(251, 191, 36, 0.2) !important;
    stroke: #fbbf24 !important;
    stroke-width: 2 !important;
}

.targeting-vector-label {
    font-size: 0.75rem;
    color: #fbbf24;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-align: center;
}

/* ── Firing Sequence ────────────────────────────────────────────────────── */
.targeting-sequence-section {
    background: rgba(10, 15, 30, 0.8);
    border: 1px solid #2a4a7a;
    border-radius: var(--puzzle-radius);
    padding: 0.75rem;
}

.targeting-sequence-options {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.targeting-sequence-option {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.4rem 0.5rem;
    background: rgba(26, 42, 74, 0.4);
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.15s;
}

.targeting-sequence-option:hover {
    background: rgba(42, 74, 122, 0.5);
    border-color: #2a4a7a;
}

.targeting-sequence-option input[type="radio"] {
    accent-color: #fbbf24;
    margin-top: 0.1rem;
    flex-shrink: 0;
}

.targeting-seq-name {
    font-size: 0.75rem;
    font-weight: 700;
    color: #fbbf24;
    white-space: nowrap;
}

.targeting-seq-desc {
    font-size: 0.65rem;
    color: #8a7a4a;
    line-height: 1.4;
}

/* ── Confirm Button ─────────────────────────────────────────────────────── */
.targeting-confirm-section {
    display: flex;
    justify-content: flex-end;
}

.targeting-confirm-btn {
    padding: 0.6rem 1.5rem;
    background: rgba(251, 191, 36, 0.12);
    border: 1px solid #fbbf24;
    border-radius: var(--puzzle-radius);
    color: #fbbf24;
    font-family: 'Courier New', Courier, monospace;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    cursor: pointer;
    transition: background 0.2s;
}

.targeting-confirm-btn:hover:not(:disabled) {
    background: rgba(251, 191, 36, 0.25);
    box-shadow: 0 0 12px rgba(251, 191, 36, 0.3);
}

.targeting-confirm-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* ── Result Area ────────────────────────────────────────────────────────── */
.targeting-result-area { min-height: 0; }

/* ── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 600px) {
    .targeting-main-grid {
        grid-template-columns: 1fr;
    }

    .targeting-weapon-carousel {
        grid-template-columns: repeat(2, 1fr);
    }
}
