/**
 * UI Enhancements for the LISP Node Flow application
 */

/* Dark Mode Toggle - Positioned down as requested */
.dark-mode-toggle {
    position: absolute !important;
    top: 80px !important;  /* Moved down as requested */
    right: 20px !important;
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background-color: #34495e !important;
    color: white !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    cursor: pointer !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3) !important;
    z-index: 1001 !important;
    transition: all 0.3s ease !important;
    font-size: 20px !important;
}

.dark-mode-toggle:hover {
    transform: scale(1.1) !important;
    background-color: #2c3e50 !important;
}

/* Enhanced connection points */
.input-point, .output-point {
    width: 12px !important;
    height: 12px !important;
    border-radius: 50% !important;
    background-color: #3498db !important;
    border: 2px solid white !important;
    box-shadow: 0 0 0 1px #3498db !important;
    display: block !important;
    z-index: 10 !important;
    position: absolute !important;
    cursor: pointer !important;
    transition: transform 0.2s ease, background-color 0.2s ease !important;
}

/* Input connection point */
.input {
    position: relative !important;
    padding-left: 16px !important;
}

.input-point {
    left: -6px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

/* Output connection point */
.output {
    position: relative !important;
    padding-right: 16px !important;
}

.output-point {
    right: -6px !important;
    top: 50% !important;
    transform: translateY(-50%) !important;
}

/* Hover states */
.input-point:hover, .output-point:hover {
    transform: translateY(-50%) scale(1.2) !important;
    background-color: #2ecc71 !important;
}

/* Connection in progress */
.input-point.active, .output-point.active {
    background-color: #e74c3c !important;
    transform: translateY(-50%) scale(1.2) !important;
}

/* Connected state */
.input-point.connected, .output-point.connected {
    background-color: #f39c12 !important;
}

/* Enhanced Node Tooltips */
.node-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.85);
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    font-size: 13px;
    z-index: 9999;
    max-width: 300px;
    pointer-events: none;
    box-shadow: 0 3px 10px rgba(0,0,0,0.3);
    backdrop-filter: blur(2px);
    border: 1px solid rgba(255,255,255,0.1);
}

.node-tooltip strong {
    color: #3498db;
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
}

.node-tooltip p {
    margin: 5px 0;
    line-height: 1.4;
}

/* Enhanced Node Styling */
.node {
    transition: box-shadow 0.2s ease, transform 0.2s ease, opacity 0.2s ease !important;
}

.node:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.2) !important;
    transform: translateY(-2px) !important;
}

.node.dragging {
    opacity: 0.95 !important;
    transform: scale(1.02) !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3) !important;
}

/* Node Type Icons */
.node-icon {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 14px !important;
}

/* Node Header Controls */
.node-controls {
    display: flex !important;
    gap: 4px !important;
}

.node-controls button {
    background: transparent !important;
    border: none !important;
    width: 20px !important;
    height: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 !important;
    cursor: pointer !important;
    color: rgba(255, 255, 255, 0.7) !important;
    transition: color 0.2s ease !important;
}

.node-controls button:hover {
    color: white !important;
}

/* Info button specific styling */
.info-node {
    color: rgba(255, 255, 255, 0.8) !important;
}

.info-node:hover {
    color: white !important;
}

/* Connection Path Styling */
.connection path {
    stroke: #3498db !important;
    stroke-width: 2px !important;
    transition: stroke 0.2s ease, stroke-width 0.2s ease !important;
}

.connection:hover path {
    stroke: #e74c3c !important;
    stroke-width: 3px !important;
}