/* Edge Smoothing and Curve Type Explorer
 * ======================================
 * Full-width vis-network canvas with an overlay control panel and a caption
 * strip below. Overlays are siblings of #network (never children).
 */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background-color: aliceblue;
}

/* ===========================================
   CONTAINER & NETWORK CANVAS
   =========================================== */
.container {
    position: relative;
    width: 100%;
    height: 100vh;
}

#network {
    width: 100%;
    height: 100%;
    background-color: aliceblue;
}

/* ===========================================
   TITLE
   =========================================== */
.title {
    position: absolute;
    top: 8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 19px;
    font-weight: bold;
    color: #0d3b66;
    background-color: aliceblue;
    padding: 4px 12px;
    white-space: nowrap;
    z-index: 10;
}

/* ===========================================
   LEGEND (Upper Left)
   =========================================== */
.legend {
    position: absolute;
    top: 44px;
    left: 10px;
    padding: 8px 10px;
    background-color: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
    z-index: 10;
    max-width: 220px;
}

.legend-item {
    display: flex;
    align-items: center;
    margin: 4px 0;
    font-size: 11px;
    line-height: 1.3;
}

.legend-swatch {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    margin-right: 6px;
    border-radius: 4px;
    border: 1px solid #333;
}

.swatch-node {
    background-color: #a7d3f2;
    border-color: #2f6fb0;
    border-radius: 50%;
}

.swatch-normal {
    background-color: #6b7c8d;
    height: 4px;
    border-radius: 2px;
}

.swatch-problem {
    background-color: #e53935;
    height: 4px;
    border-radius: 2px;
    border-color: #b71c1c;
}

/* ===========================================
   RIGHT CONTROL PANEL
   =========================================== */
.right-panel {
    position: absolute;
    top: 44px;
    right: 10px;
    width: 260px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 10;
}

.control-group {
    background-color: rgba(255, 255, 255, 0.96);
    border-radius: 8px;
    padding: 10px 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12);
}

.control-label {
    font-size: 13px;
    font-weight: bold;
    color: #1c2b3a;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.radio-row {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #33475b;
    margin: 5px 0;
    cursor: pointer;
}

.radio-row input {
    cursor: pointer;
}

.value-badge {
    font-size: 12px;
    font-weight: bold;
    color: #ffffff;
    background-color: #2f6fb0;
    padding: 2px 8px;
    border-radius: 10px;
}

input[type="range"] {
    width: 100%;
    cursor: pointer;
    accent-color: #2f6fb0;
}

select {
    width: 100%;
    padding: 6px 8px;
    font-size: 13px;
    border: 1px solid #b0c4d4;
    border-radius: 6px;
    background-color: #ffffff;
    color: #1c2b3a;
    cursor: pointer;
}

.control-hint {
    font-size: 10.5px;
    color: #6b7c8d;
    margin-top: 6px;
    line-height: 1.4;
}

.control-hint code,
code {
    font-family: 'Courier New', monospace;
    background-color: #eef3f8;
    color: #17456f;
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 10.5px;
}

/* Disabled state for controls that do not apply to the current mode */
.control-group.disabled {
    opacity: 0.45;
    pointer-events: none;
}

/* ===========================================
   CAPTION (below canvas)
   =========================================== */
.caption {
    position: absolute;
    bottom: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100% - 40px);
    max-width: 720px;
    background-color: rgba(255, 255, 255, 0.97);
    border-left: 4px solid #2f6fb0;
    border-radius: 6px;
    padding: 9px 14px;
    font-size: 13px;
    line-height: 1.45;
    color: #1c2b3a;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.14);
    z-index: 10;
    text-align: center;
}

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 720px) {
    .title {
        font-size: 15px;
    }
    .right-panel {
        width: 210px;
    }
    .legend {
        max-width: 170px;
        font-size: 10px;
    }
    .caption {
        font-size: 12px;
    }
}
