/* =========================================================
   LAN Hardware Explorer
   Topic 2.04 LAN Hardware
   ========================================================= */

.lan-hardware-widget {
    margin-top: 1.5rem;
    padding: 1.35rem;
    border: 1px solid #e2e8f0;
    border-radius: 24px;
    background: #f8fafc;
    box-shadow: 0 14px 35px rgba(15, 23, 42, 0.06);
}

.lan-mode-row,
.lan-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.65rem;
    margin-bottom: 1rem;
}

.lan-mode-btn {
    appearance: none;
    border: 1px solid #cbd5e1;
    border-radius: 999px;
    padding: 0.6rem 1rem;
    background: white;
    color: #334155;
    font-size: 0.92rem;
    font-weight: 650;
    cursor: pointer;
    transition: all 0.2s ease;
}

.lan-mode-btn:hover {
    transform: translateY(-1px);
    border-color: #94a3b8;
}

.lan-mode-btn.active {
    background: #0f172a;
    border-color: #0f172a;
    color: white;
}

.lan-secondary-btn {
    background: white;
    color: #334155;
    border: 1px solid #cbd5e1;
}

.lan-secondary-btn:hover {
    background: #f8fafc;
    border-color: #94a3b8;
    color: #0f172a;
}

.lan-visual-card {
    overflow: hidden;
    border: 1px solid #e2e8f0;
    border-radius: 22px;
    background: white;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.9);
}

.lan-hardware-svg {
    display: block;
    width: 100%;
    height: auto;
    min-height: 390px;
}

.lan-explanation-panel {
    margin-top: 1rem;
    padding: 1rem 1.15rem;
    border-radius: 18px;
    background: white;
    border: 1px solid #e2e8f0;
}

.lan-explanation-panel h3 {
    margin-top: 0;
    margin-bottom: 0.4rem;
}

.lan-explanation-panel p {
    margin-bottom: 0.45rem;
}

.lan-hardware-status {
    font-weight: 650;
    color: #475569;
}

.lan-hardware-legend {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-top: 1rem;
    color: #475569;
    font-size: 0.9rem;
}

.lan-hardware-legend span {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.lan-legend-device,
.lan-legend-special,
.lan-legend-signal {
    display: inline-block;
    width: 14px;
    height: 14px;
    border-radius: 999px;
}

.lan-legend-device {
    background: #dbeafe;
    border: 2px solid #2563eb;
}

.lan-legend-special {
    background: #dcfce7;
    border: 2px solid #16a34a;
}

.lan-legend-signal {
    background: #fef3c7;
    border: 2px solid #f59e0b;
}

.lan-legend-link {
    display: inline-block;
    width: 24px;
    height: 0;
    border-top: 3px solid #64748b;
}

/* SVG elements */
.lan-link {
    stroke: #64748b;
    stroke-width: 5;
    stroke-linecap: round;
}

.lan-link-muted {
    stroke: #cbd5e1;
}

.lan-link-dashed {
    stroke-dasharray: 10 10;
}

.lan-signal {
    fill: none;
    stroke: #f59e0b;
    stroke-width: 7;
    stroke-linecap: round;
    stroke-dasharray: 18 12;
    animation: lan-signal-move 0.9s linear infinite;
}

.lan-signal-weak {
    stroke: #fb923c;
    opacity: 0.55;
}

.lan-signal-strong {
    stroke: #f59e0b;
}

@keyframes lan-signal-move {
    to {
        stroke-dashoffset: -30;
    }
}

.lan-device {
    fill: #dbeafe;
    stroke: #2563eb;
    stroke-width: 3;
}

.lan-special-device {
    fill: #dcfce7;
    stroke: #16a34a;
    stroke-width: 3;
}

.lan-terminator {
    fill: #fee2e2;
    stroke: #dc2626;
    stroke-width: 3;
}

.lan-device-label,
.lan-small-label,
.lan-hardware-label {
    font-family: Inter, Arial, sans-serif;
    fill: #0f172a;
}

.lan-device-label {
    font-size: 18px;
    font-weight: 700;
}

.lan-hardware-label {
    font-size: 16px;
    font-weight: 750;
}

.lan-small-label {
    font-size: 14px;
    font-weight: 650;
    fill: #475569;
}

.lan-nic-badge {
    fill: #ede9fe;
    stroke: #7c3aed;
    stroke-width: 2;
}

.lan-nic-text {
    font-size: 13px;
    font-weight: 750;
    fill: #5b21b6;
}

.lan-address-text {
    font-size: 12px;
    font-weight: 650;
    fill: #475569;
}

.lan-radio-wave {
    fill: none;
    stroke: #38bdf8;
    stroke-width: 4;
    stroke-linecap: round;
    opacity: 0.8;
}

.lan-wireless-signal {
    fill: none;
    stroke: #38bdf8;
    stroke-width: 5;
    stroke-linecap: round;
    stroke-dasharray: 16 12;
    animation: lan-signal-move 0.9s linear infinite;
}

.lan-highlight-ring {
    fill: none;
    stroke: #f59e0b;
    stroke-width: 4;
    stroke-dasharray: 10 8;
}

@media (max-width: 720px) {
    .lan-hardware-widget {
        padding: 1rem;
    }

    .lan-hardware-svg {
        min-height: 320px;
    }

    .lan-hardware-legend {
        gap: 0.75rem;
        font-size: 0.82rem;
    }
}

.lan-secondary-btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
    background: #f8fafc;
    color: #94a3b8;
    border-color: #e2e8f0;
    box-shadow: none;
    transform: none;
}

.lan-secondary-btn:disabled:hover {
    background: #f8fafc;
    color: #94a3b8;
    border-color: #e2e8f0;
    transform: none;
}
