/* Graph Visualization Styles - Inherits from main.css */

/* ============================================
   LAYOUT & CONTAINERS
   ============================================ */

.graph-container {
    display: grid;
    grid-template-columns: 320px 1fr 300px;
    gap: 1rem;
    height: calc(100vh - 80px);
    margin-top: 0;
    padding: 1rem;
    background: var(--light-gray);
    overflow: hidden;
}

.graph-sidebar {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow-y: auto;
    border: 1px solid rgba(255, 105, 180, 0.1);
}

.graph-main {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 105, 180, 0.1);
    position: relative;
}

.graph-details {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    overflow-y: auto;
    border: 1px solid rgba(255, 105, 180, 0.1);
}

/* ============================================
   SIDEBAR CONTROLS
   ============================================ */

.sidebar-section {
    padding: 1.5rem;
}

.sidebar-section h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1.5rem 0;
    color: var(--dark-gray);
    font-size: 1.1rem;
    font-weight: 600;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--secondary-pink);
}

.sidebar-section h3 .material-icons {
    color: var(--primary-pink);
    font-size: 1.3rem;
}

.control-group {
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.control-group:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.control-group label {
    display: block;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 0.75rem;
    font-size: 0.9rem;
}

/* File Input Styling */
.file-input-container {
    margin-bottom: 1rem;
}

.file-input-container .file-input-label {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 1.25rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.file-input-container .file-input-label:hover {
    border-color: var(--primary-pink);
    background: linear-gradient(135deg, #fff5f7 0%, #ffe6f0 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.15);
}

.file-input-container .file-input-label.has-file {
    border-style: solid;
    border-color: var(--primary-pink);
    background: linear-gradient(135deg, #fff5f7 0%, #ffe6f0 100%);
}

.file-input-container .material-icons {
    color: var(--primary-pink);
    font-size: 2rem;
}

/* Filter Controls */
.filter-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.filter-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--primary-pink);
    cursor: pointer;
}

.filter-checkbox label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    font-weight: 500;
    margin: 0;
}

.node-type-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    display: inline-block;
}

.node-type-indicator.charge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    box-shadow: 0 2px 8px rgba(255, 107, 107, 0.3);
}

.node-type-indicator.claim {
    background: linear-gradient(135deg, #4ecdc4, #26de81);
    box-shadow: 0 2px 8px rgba(78, 205, 196, 0.3);
}

.node-type-indicator.fact {
    background: linear-gradient(135deg, #45b7d1, #2196f3);
    box-shadow: 0 2px 8px rgba(69, 183, 209, 0.3);
}

.node-type-indicator.evidence {
    background: linear-gradient(135deg, #f9ca24, #f0932b);
    box-shadow: 0 2px 8px rgba(249, 202, 36, 0.3);
}

/* Layout Controls */
.layout-controls {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.physics-setting-item {
    margin-bottom: 1.5rem;
}

.physics-setting-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.physics-setting-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.physics-value-display {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    min-width: 80px;
}

.physics-value-text {
    padding: 0.5rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    text-align: center;
    background: white;
    color: var(--text-primary);
    min-width: 50px;
}

.physics-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    overflow: hidden;
}

.physics-bar-fill {
    height: 100%;
    background: var(--primary-pink);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.physics-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #e9ecef;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.slider-value {
    background: var(--primary-pink);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    min-width: 40px;
    text-align: center;
}

.slider-input {
    width: 70px;
    padding: 0.5rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    text-align: center;
    background: white;
    color: var(--text-primary);
    transition: all 0.2s ease;
}

.slider-input:focus {
    outline: none;
    border-color: var(--primary-pink);
    box-shadow: 0 0 0 2px rgba(255, 105, 180, 0.2);
}

.physics-toggle-control {
    margin-bottom: 1rem;
    padding: 0.75rem 1rem;
    background: var(--surface-color);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.toggle-label {
    display: flex !important; /* Override main.css */
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-primary);
    font-weight: 500;
    margin: 0;
    padding: 0;
    height: 24px; /* Explicit height */
    line-height: 24px; /* Match toggle height for perfect alignment */
    width: 100%; /* Ensure full width */
}

.toggle-label span {
    display: flex;
    align-items: center;
    height: 24px;
    line-height: 24px;
    flex-shrink: 0; /* Prevent text from shrinking */
}

.toggle-switch {
    position: relative;
    width: 50px;
    height: 24px;
    flex-shrink: 0; /* Prevent shrinking */
    display: flex;
    align-items: center;
}

/* Override main.css conflicting rules */
.physics-toggle-control .toggle-switch label {
    display: none !important; /* Hide the conflicting label from main.css */
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
    position: absolute;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.toggle-switch input:checked + .toggle-slider {
    background: linear-gradient(135deg, var(--primary-pink) 0%, #ff8ab4 100%);
    box-shadow: inset 0 2px 4px rgba(255, 105, 180, 0.2);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(26px);
    box-shadow: 0 2px 6px rgba(255, 105, 180, 0.3);
}

/* Hover effects */
.toggle-slider:hover {
    transform: scale(1.05);
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.15);
}

.toggle-switch input:checked + .toggle-slider:hover {
    box-shadow: inset 0 2px 4px rgba(255, 105, 180, 0.3);
}

.physics-settings {
    transition: all 0.3s ease;
    max-height: 500px;
    overflow: hidden;
    opacity: 1;
}

.physics-settings.hidden {
    max-height: 0;
    opacity: 0;
    margin-top: 0;
}

.slider {
    flex: 1;
    height: 8px;
    border-radius: 4px;
    background: #e9ecef;
    outline: none;
    cursor: pointer;
    -webkit-appearance: none;
    appearance: none;
}

.slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-pink);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(255, 105, 180, 0.3);
    transition: all 0.3s ease;
}

.slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(255, 105, 180, 0.4);
}

.slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary-pink);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 8px rgba(255, 105, 180, 0.3);
}

/* Button Styles */
.btn-secondary {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--dark-gray);
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
}

.btn-secondary:hover {
    border-color: var(--primary-pink);
    color: var(--primary-pink);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 105, 180, 0.2);
}

.btn-secondary .material-icons {
    font-size: 1.1rem;
}

/* Statistics Display */
.stats-display {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 8px;
    padding: 1rem;
    border: 1px solid #dee2e6;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.stat-item:last-child {
    border-bottom: none;
}

.stat-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.stat-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--primary-pink);
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: 6px;
    min-width: 30px;
    text-align: center;
}

/* ============================================
   GRAPH HEADER
   ============================================ */

.graph-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
}

.graph-header h2 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    color: var(--dark-gray);
    font-size: 1.3rem;
    font-weight: 600;
}

.graph-header h2 .material-icons {
    color: var(--primary-pink);
    font-size: 1.5rem;
}

.graph-actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    cursor: pointer;
    color: #666;
    transition: all 0.3s ease;
    position: relative;
}

.btn-icon:hover {
    border-color: var(--primary-pink);
    color: var(--primary-pink);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 105, 180, 0.2);
}

.btn-icon .material-icons {
    font-size: 1.2rem;
}

/* ============================================
   GRAPH CANVAS
   ============================================ */

.graph-canvas-container {
    flex: 1;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, #fafafa 0%, #f5f5f5 100%);
    min-height: 0; /* Ensure flex child can shrink below content size */
}

.graph-canvas {
    width: 100%;
    height: 100%;
    cursor: grab;
    background: radial-gradient(circle at 50% 50%, rgba(255, 105, 180, 0.02) 0%, transparent 50%);
    max-width: 100%;
    max-height: 100%;
    display: block;
}

.graph-canvas:active {
    cursor: grabbing;
}

/* Loading State */
.graph-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--dark-gray);
    z-index: 10;
}

.graph-loading .loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-pink);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

.graph-loading p {
    font-size: 1.1rem;
    font-weight: 500;
}

/* Empty State */
.graph-empty {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: var(--dark-gray);
    z-index: 10;
}

.graph-empty .empty-icon {
    margin-bottom: 1.5rem;
}

.graph-empty .material-icons {
    font-size: 4rem;
    color: #ccc;
}

.graph-empty h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
    font-weight: 600;
}

.graph-empty p {
    margin: 0 0 2rem 0;
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
}

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--primary-pink);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    text-decoration: none;
}

.btn-primary:hover {
    background: #ff4da6;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.3);
}

/* ============================================
   GRAPH NODES & EDGES
   ============================================ */

/* Node Styles */
.graph-node {
    cursor: pointer;
    transition: filter 0.2s ease, stroke 0.2s ease, stroke-width 0.2s ease, opacity 0.2s ease;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.1));
}

.graph-node:hover {
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.graph-node.selected {
    filter: drop-shadow(0 6px 16px rgba(255, 105, 180, 0.4));
    stroke-width: 4 !important;
}

.graph-node.charge {
    fill: url(#chargeGradient);
    stroke: #ee5a24;
    stroke-width: 3;
}

.graph-node.claim {
    fill: url(#claimGradient);
    stroke: #26de81;
    stroke-width: 2;
}

.graph-node.fact {
    fill: url(#factGradient);
    stroke: #2196f3;
    stroke-width: 2;
}

.graph-node.evidence {
    fill: url(#evidenceGradient);
    stroke: #f0932b;
    stroke-width: 2;
}

/* Node Labels */
.node-label {
    font-family: 'Poppins', sans-serif;
    font-size: 7px;            /* Small text like Obsidian (per user preference) */
    font-weight: 400;          /* Lighter weight */
    text-anchor: middle;
    dominant-baseline: central;
    fill: #888;                /* Slightly darker for better contrast while staying subtle */
    pointer-events: none;
    text-shadow: none;         /* Remove text shadow for cleaner look */
    transition: all 0.2s ease;
}

/* Edge Styles */
.graph-edge {
    transition: all 0.3s ease;
    marker-end: url(#arrowhead);
    cursor: pointer;
    stroke-width: 1.5px;       /* Thinner edges like Obsidian */
}

.graph-edge.selected {
    stroke-width: 4 !important;
    filter: drop-shadow(0 0 8px rgba(255, 105, 180, 0.6));
}

.temp-connection-line {
    pointer-events: none;
    opacity: 0.8;
}

.temp-drag-line {
    pointer-events: none;
    opacity: 0.8;
    animation: dash 1s linear infinite;
}

@keyframes dash {
    to {
        stroke-dashoffset: -10;
    }
}

/* Edge colors now determined by strength in JavaScript */

.graph-edge:hover {
    stroke-width: 4;
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.2));
}

/* Edge strength classes - width and opacity only, color set by JS */
.graph-edge.strength-weak {
    opacity: 0.7;
}

.graph-edge.strength-medium {
    opacity: 0.85;
}

.graph-edge.strength-strong {
    opacity: 1;
}

/* RELATED edge styling - dashed pattern */
.graph-edge.edge-related {
    stroke-dasharray: 8,4;
    stroke-linecap: round;
}

/* Normal edge styling */
.graph-edge.edge-normal {
    stroke-dasharray: none;
}

/* ============================================
   DETAILS PANEL
   ============================================ */

.details-section {
    padding: 1.5rem;
    border-bottom: 1px solid #f0f0f0;
}

.details-section:last-child {
    border-bottom: none;
}

.details-section h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0 0 1rem 0;
    color: var(--dark-gray);
    font-size: 1rem;
    font-weight: 600;
}

.details-section h3 .material-icons {
    color: var(--primary-pink);
    font-size: 1.2rem;
}

/* Node Details */
.node-details {
    min-height: 200px;
}

.no-selection {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 2rem 1rem;
    color: #999;
}

.no-selection .material-icons {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #ddd;
}

.no-selection p {
    font-size: 0.9rem;
    margin: 0;
}

.node-detail-card {
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 1.5rem;
    animation: slideInFromRight 0.3s ease-out;
}

@keyframes slideInFromRight {
    from {
        opacity: 0;
        transform: translateX(20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.node-detail-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.node-detail-type {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.node-detail-type.charge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
}

.node-detail-type.claim {
    background: linear-gradient(135deg, #4ecdc4, #26de81);
    color: white;
}

.node-detail-type.fact {
    background: linear-gradient(135deg, #45b7d1, #2196f3);
    color: white;
}

.node-detail-type.evidence {
    background: linear-gradient(135deg, #f9ca24, #f0932b);
    color: white;
}

.node-detail-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-gray);
    line-height: 1.4;
    margin-bottom: 1rem;
}

.node-detail-meta {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1rem;
}

.meta-item {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.meta-label {
    font-size: 0.75rem;
    color: #666;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.meta-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-gray);
}

.node-connections {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e9ecef;
}

.connections-title {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 0.75rem;
}

.connection-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.connection-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.8rem;
}

.connection-arrow {
    color: var(--primary-pink);
    font-size: 0.9rem;
}

/* Legend */
.legend-category {
    margin-bottom: 1.5rem;
}

.legend-category:last-child {
    margin-bottom: 0;
}

.legend-category h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dark-gray);
    margin: 0 0 0.75rem 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.legend-items {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--dark-gray);
}

.node-preview {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    flex-shrink: 0;
}

.node-preview.charge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
}

.node-preview.claim {
    background: linear-gradient(135deg, #4ecdc4, #26de81);
}

.node-preview.fact {
    background: linear-gradient(135deg, #45b7d1, #2196f3);
}

.node-preview.evidence {
    background: linear-gradient(135deg, #f9ca24, #f0932b);
}

.edge-preview {
    width: 30px;
    height: 3px;
    flex-shrink: 0;
    border-radius: 2px;
}

.edge-preview.constitutes {
    background: #ff6b6b;
}

.edge-preview.supports {
    background: #26de81;
}

.edge-preview.rebuts {
    background: #ff4757;
    background-image: repeating-linear-gradient(
        90deg,
        #ff4757,
        #ff4757 5px,
        transparent 5px,
        transparent 10px
    );
}

.edge-preview.proves {
    background: #3742fa;
}

.edge-preview.impeaches {
    background: #ff3838;
    background-image: repeating-linear-gradient(
        90deg,
        #ff3838,
        #ff3838 3px,
        transparent 3px,
        transparent 6px
    );
}

.edge-preview.strength-weak {
    background: #ccc;
    height: 1px;
}

.edge-preview.strength-medium {
    background: #666;
    height: 2px;
}

.edge-preview.strength-strong {
    background: var(--primary-pink);
    height: 4px;
}

/* Spectrum containers */
.spectrum-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin: 0.5rem 0;
}

.spectrum-bar {
    height: 8px;
    border-radius: 4px;
    position: relative;
}

.confidence-spectrum {
    background: linear-gradient(to right, #ff0000, #ffff00, #00ff00);
}

.spectrum-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.strength-examples {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.strength-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.strength-line {
    width: 40px;
    background: var(--primary-pink);
    border-radius: 1px;
}

.strength-line.weak {
    height: 2px;
}

.strength-line.medium {
    height: 3px;
}

.strength-line.strong {
    height: 5px;
}

.strength-item span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    min-width: 100px;
}

.edge-preview.special-rebuts {
    background: #444444;
}

/* ============================================
   TOOLTIP
   ============================================ */

.graph-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 0.75rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-family: 'Poppins', sans-serif;
    pointer-events: none;
    z-index: var(--z-dropdown);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    max-width: 250px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.graph-tooltip.visible {
    opacity: 1;
    visibility: visible;
}

.tooltip-title {
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--secondary-pink);
}

.tooltip-type {
    font-size: 0.75rem;
    opacity: 0.8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.tooltip-details {
    font-size: 0.8rem;
    line-height: 1.4;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1200px) {
    .graph-container {
        grid-template-columns: 280px 1fr 280px;
    }
}

@media (max-width: 1024px) {
    .graph-container {
        grid-template-columns: 1fr;
        grid-template-rows: auto 1fr auto;
    }
    
    .graph-sidebar,
    .graph-details {
        max-height: 200px;
        overflow-y: auto;
    }
    
    .sidebar-section,
    .details-section {
        padding: 1rem;
    }
}

@media (max-width: 768px) {
    .graph-container {
        padding: 0.5rem;
        gap: 0.5rem;
    }
    
    .graph-header {
        padding: 1rem;
    }
    
    .graph-header h2 {
        font-size: 1.1rem;
    }
    
    .btn-icon {
        width: 36px;
        height: 36px;
    }
}

/* ============================================
   ANIMATIONS & TRANSITIONS
   ============================================ */

@keyframes nodeAppear {
    from {
        opacity: 0;
        transform: scale(0);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes edgeAppear {
    from {
        opacity: 0;
        stroke-dasharray: 1000;
        stroke-dashoffset: 1000;
    }
    to {
        opacity: 1;
        stroke-dasharray: none;
        stroke-dashoffset: 0;
    }
}

/* Removed fly-in animation for immediate positioning */

.graph-edge {
    animation: edgeAppear 0.8s ease-out;
}

/* Hidden state utility */
.hidden {
    display: none !important;
}

/* Active navigation link */
.nav-links a.active {
    color: var(--primary-pink);
    font-weight: 600;
}

/* ============================================
   CONTEXT MENU
   ============================================ */

.context-menu {
    position: fixed;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    padding: 0.5rem 0;
    min-width: 180px;
    z-index: var(--z-modal);
    opacity: 0;
    visibility: hidden;
    transform: scale(0.95);
    transition: all 0.2s ease;
    backdrop-filter: blur(10px);
}

.context-menu.visible {
    opacity: 1;
    visibility: visible;
    transform: scale(1);
}

.context-menu-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9rem;
    color: var(--dark-gray);
    border: none;
    background: none;
    width: 100%;
    text-align: left;
}

.context-menu-item:hover {
    background: #f8f9fa;
    color: var(--primary-pink);
}

.context-menu-item[data-action="delete"]:hover {
    background: #fff5f5;
    color: #dc3545;
}

.context-menu-item .material-icons {
    font-size: 1.1rem;
    color: inherit;
}

.context-menu-divider {
    height: 1px;
    background: #e9ecef;
    margin: 0.5rem 0;
}

/* ============================================
   MODALS
   ============================================ */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: var(--z-modal-backdrop);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    backdrop-filter: blur(5px);
}

.modal-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: white;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: translateY(20px) scale(0.95);
    transition: all 0.3s ease;
}

.modal-overlay.visible .modal-content {
    transform: translateY(0) scale(1);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);
    border-radius: 16px 16px 0 0;
}

.modal-header h3 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 0;
    color: var(--dark-gray);
    font-size: 1.3rem;
    font-weight: 600;
}

.modal-header h3 .material-icons {
    color: var(--primary-pink);
    font-size: 1.4rem;
}

.close-modal {
    background: none;
    border: none;
    color: #666;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-modal:hover {
    background: #f5f5f5;
    color: var(--primary-pink);
}

.modal-body {
    padding: 2rem;
}

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding: 1.5rem 2rem;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    border-radius: 0 0 16px 16px;
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: var(--dark-gray);
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
    font-family: 'Poppins', sans-serif;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-pink);
    box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #666;
    font-size: 0.8rem;
}

/* Connection Modal Specific */
.connection-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.connection-from,
.connection-to {
    flex: 1;
}

.connection-from label,
.connection-to label {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.connection-arrow {
    color: var(--primary-pink);
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.node-preview-card {
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 0.85rem;
}

.node-preview-card .node-type {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.node-preview-card .node-type.charge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
}

.node-preview-card .node-type.claim {
    background: linear-gradient(135deg, #4ecdc4, #26de81);
    color: white;
}

.node-preview-card .node-type.fact {
    background: linear-gradient(135deg, #45b7d1, #2196f3);
    color: white;
}

.node-preview-card .node-type.evidence {
    background: linear-gradient(135deg, #f9ca24, #f0932b);
    color: white;
}

.node-preview-card .node-title {
    font-weight: 500;
    color: var(--dark-gray);
    line-height: 1.3;
}

.node-selection {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    background: white;
}

.node-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    cursor: pointer;
    transition: all 0.2s ease;
    border-bottom: 1px solid #f0f0f0;
}

.node-option:last-child {
    border-bottom: none;
}

.node-option:hover {
    background: #f8f9fa;
}

.node-option.selected {
    background: linear-gradient(135deg, #fff5f7 0%, #ffe6f0 100%);
    border-color: var(--primary-pink);
}

.node-option input[type="radio"] {
    margin: 0;
    accent-color: var(--primary-pink);
}

.node-option-info {
    flex: 1;
}

.node-option-title {
    font-weight: 500;
    color: var(--dark-gray);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.node-option-type {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Button Styles */
.btn-primary,
.btn-secondary {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    font-family: 'Poppins', sans-serif;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-primary {
    background: var(--primary-pink);
    color: white;
}

.btn-primary:hover {
    background: #ff4da6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 105, 180, 0.3);
}

.btn-secondary {
    background: #f8f9fa;
    color: var(--dark-gray);
    border: 2px solid #e9ecef;
}

.btn-secondary:hover {
    background: #e9ecef;
    border-color: #dee2e6;
    transform: translateY(-1px);
}

/* Responsive Modal */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        max-width: none;
        margin: 1rem;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 1rem 1.5rem;
    }
    
    .connection-info {
        flex-direction: column;
        text-align: center;
    }
    
    .connection-arrow {
        transform: rotate(90deg);
    }
}

/* ============================================
   INLINE EDITING
   ============================================ */

.inline-edit-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    padding: 0.75rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.inline-edit-field:hover {
    background: #f8f9fa;
}

.inline-edit-field.editing {
    background: linear-gradient(135deg, #fff5f7 0%, #ffe6f0 100%);
    border: 2px solid var(--primary-pink);
}

.field-label {
    font-weight: 600;
    color: var(--dark-gray);
    min-width: 80px;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field-value {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 0.9rem;
    background: transparent;
    transition: all 0.2s ease;
    cursor: pointer;
}

.field-value:focus {
    outline: none;
    border-color: var(--primary-pink);
    background: white;
    cursor: text;
}

.field-value.textarea {
    min-height: 60px;
    resize: vertical;
    font-family: inherit;
}

.field-value.select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='m6 8 4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

.field-value.readonly {
    background: var(--bg-secondary);
    color: var(--text-secondary);
    border: 1px solid transparent;
    font-style: italic;
    cursor: default;
}

.field-value.readonly.error {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
}

.field-actions {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.inline-edit-field:hover .field-actions {
    opacity: 1;
}

.field-action-btn {
    background: none;
    border: none;
    padding: 0.25rem;
    border-radius: 4px;
    cursor: pointer;
    color: #666;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.field-action-btn:hover {
    background: var(--primary-pink);
    color: white;
}

.field-action-btn .material-icons {
    font-size: 1rem;
}

.item-type-badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
}

.item-type-badge.node {
    background: linear-gradient(135deg, #4ecdc4, #26de81);
    color: white;
}

.item-type-badge.edge {
    background: linear-gradient(135deg, #a55eea, #8c7ae6);
    color: white;
}

.item-type-badge.charge {
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
}

.item-type-badge.claim {
    background: linear-gradient(135deg, #4ecdc4, #26de81);
    color: white;
}

.item-type-badge.fact {
    background: linear-gradient(135deg, #45b7d1, #2196f3);
    color: white;
}

.item-type-badge.evidence {
    background: linear-gradient(135deg, #f9ca24, #f0932b);
    color: white;
}

.strength-confidence-display {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
}

.strength-confidence-item {
    flex: 1;
    text-align: center;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.strength-confidence-item:hover {
    border-color: var(--primary-pink);
    background: white;
}

.strength-confidence-input {
    width: 70px;
    padding: 0.4rem 0.5rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    text-align: center;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--dark-gray);
    background: white;
    margin: 0.5rem auto;
    font-family: 'Poppins', sans-serif;
    display: block;
}

.strength-confidence-input:focus {
    outline: none;
    border-color: var(--primary-pink);
    box-shadow: 0 0 0 2px rgba(255, 105, 180, 0.2);
}

.strength-confidence-label {
    font-size: 0.75rem;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.25rem;
}

.strength-confidence-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark-gray);
}

.strength-confidence-bar {
    height: 4px;
    background: #e9ecef;
    border-radius: 2px;
    margin-top: 0.5rem;
    overflow: hidden;
}

.strength-confidence-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-pink), #ff4da6);
    border-radius: 2px;
    transition: width 0.3s ease;
}

.action-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.connect-btn {
    width: 100%;
    background: linear-gradient(135deg, var(--primary-pink), #ff4da6);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.connect-btn:hover {
    background: linear-gradient(135deg, #ff4da6, #e91e63);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 105, 180, 0.3);
}

.delete-item-btn {
    width: 100%;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.delete-item-btn:hover {
    background: linear-gradient(135deg, #ee5a24, #c44569);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(238, 90, 36, 0.3);
}

/* ============================================
   IMPROVED TITLE AND LAYOUT
   ============================================ */

.title-editor {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.title-editor:hover {
    background: #f8f9fa;
}

.editable-title {
    flex: 1;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--dark-gray);
    line-height: 1.3;
    border: none;
    outline: none;
    background: transparent;
    padding: 0.25rem;
    border-radius: 4px;
    min-height: 1.6rem;
    word-wrap: break-word;
    margin: 0;
}

.editable-title:focus {
    background: white;
    box-shadow: 0 0 0 2px var(--primary-pink);
}

.title-edit-btn {
    background: none;
    border: none;
    color: #999;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    opacity: 0;
    flex-shrink: 0;
}

.title-editor:hover .title-edit-btn {
    opacity: 1;
}

.title-edit-btn:hover {
    background: var(--primary-pink);
    color: white;
}

.compact-fields {
    margin-bottom: 1.5rem;
}

.field-row {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.field-half {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.field-half .field-label {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--dark-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.field-half .field-value {
    padding: 0.6rem;
    border: 2px solid #e9ecef;
    border-radius: 6px;
    font-size: 0.9rem;
}

.notes-section {
    margin-bottom: 1.5rem;
}

.notes-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--dark-gray);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
}

.notes-textarea {
    width: 100%;
    min-height: 100px;
    padding: 0.75rem;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    resize: vertical;
    transition: all 0.2s ease;
    background: white;
}

.notes-textarea:focus {
    outline: none;
    border-color: var(--primary-pink);
    box-shadow: 0 0 0 3px rgba(255, 105, 180, 0.1);
}

.notes-textarea::placeholder {
    color: #999;
    font-style: italic;
}

/* Connection description styling */
.connection-description {
    text-align: center;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    border: 1px solid #dee2e6;
}

.connection-source,
.connection-target {
    font-weight: 600;
    color: var(--dark-gray);
    font-size: 0.9rem;
    margin: 0.25rem 0;
}

.connection-verb {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--primary-pink);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0.5rem 0;
}

/* ============================================
   CONNECTION MODE STYLING
   ============================================ */

.graph-node.connecting-source {
    stroke: var(--primary-pink) !important;
    stroke-width: 4 !important;
    filter: drop-shadow(0 0 12px rgba(255, 105, 180, 0.8));
    animation: pulse-pink 1.5s infinite;
}

.graph-node.connection-target {
    stroke: #26de81 !important;
    stroke-width: 3 !important;
    opacity: 0.8;
    cursor: pointer;
    animation: pulse-green 2s infinite;
}

.graph-node.connection-target:hover {
    stroke-width: 4 !important;
    opacity: 1;
    /* Remove transform to prevent twitching */
}

@keyframes pulse-pink {
    0%, 100% { 
        stroke-opacity: 1;
        stroke-width: 4;
    }
    50% { 
        stroke-opacity: 0.6;
        stroke-width: 6;
    }
}

@keyframes pulse-green {
    0%, 100% { 
        stroke-opacity: 0.7;
    }
    50% { 
        stroke-opacity: 1;
    }
}

.connection-instruction kbd {
    background: rgba(255, 255, 255, 0.3);
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
}

/* ============================================
   ILLEGAL CONNECTION WARNING MODAL
   ============================================ */

.illegal-connection-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-modal);
    animation: fadeIn 0.3s ease-out;
}

.illegal-connection-modal .modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
}

.illegal-connection-modal .modal-content {
    background: var(--surface-color);
    border-radius: 16px;
    padding: 0;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.illegal-connection-modal .modal-header {
    background: linear-gradient(135deg, #f39c12, #e67e22);
    color: white;
    padding: 1.5rem;
    text-align: center;
}

.illegal-connection-modal .modal-header h3 {
    margin: 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.illegal-connection-modal .modal-body {
    padding: 2rem;
    color: var(--text-primary);
    line-height: 1.6;
}

.illegal-connection-modal .modal-body p {
    margin: 0 0 1rem 0;
}

.illegal-connection-modal .modal-body p:last-child {
    margin-bottom: 0;
}

.illegal-connection-modal .related-badge {
    background: linear-gradient(135deg, #8e44ad, #9b59b6);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.85rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.illegal-connection-modal .modal-footer {
    padding: 1.5rem 2rem;
    background: var(--background-color);
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.illegal-connection-modal .checkbox-container {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.illegal-connection-modal .checkbox-container input {
    margin-right: 0.5rem;
}

.connection-conversion-notice {
    animation: slideInRight 0.3s ease-out;
}

.connection-conversion-notice .notice-content {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.connection-conversion-notice .notice-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.connection-conversion-notice .notice-text {
    flex: 1;
    line-height: 1.4;
}

.connection-conversion-notice .related-badge {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.1rem 0.4rem;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.connection-conversion-notice .notice-close {
    background: none;
    border: none;
    color: white;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s ease;
}

.connection-conversion-notice .notice-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* Case Management Section */
.control-group:first-child {
    margin-bottom: 24px;
}

.control-group:first-child .btn-primary {
    width: 100%;
    padding: 12px 16px;
    background: #28a745;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.control-group:first-child .btn-primary:hover {
    background: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(40, 167, 69, 0.3);
}

.control-group:first-child .btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

.control-group:first-child .btn-primary .material-icons {
    font-size: 18px;
    line-height: 1;
}

/* ============================================
   SCRIPT SELECTION MODAL
   ============================================ */

.config-options {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.config-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #e9ecef;
}

.config-item .toggle-label {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin: 0;
    font-weight: 500;
    color: #495057;
}

.config-item .toggle-switch {
    position: relative;
    width: 20px;
    height: 20px;
}

.config-item .toggle-switch input[type="radio"] {
    width: 20px;
    height: 20px;
    margin: 0;
    cursor: pointer;
    accent-color: var(--primary-color);
}

/* Enhanced Real-time Analysis Loading Styles */
.analysis-loading {
    padding: 2rem 1.5rem;
    border-top: 1px solid #e9ecef;
    margin-top: 1rem;
    text-align: left;
}

.analysis-loading.hidden {
    display: none;
}

/* Progress Header */
.progress-header {
    text-align: center;
    margin-bottom: 2rem;
}

.progress-header h3 {
    margin: 1rem 0 0.5rem;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
}

.progress-subtitle {
    color: var(--text-medium);
    margin: 0;
    font-size: 0.9rem;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

/* Real-time Progress Container */
.progress-container {
    margin-bottom: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 10px;
    border: 1px solid #e9ecef;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 0.75rem;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-color), var(--accent-color));
    border-radius: 4px;
    transition: width 0.3s ease;
    position: relative;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: shimmer 2s infinite;
}

.progress-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-text {
    font-weight: 600;
    color: var(--primary-color);
    font-size: 0.9rem;
}

.progress-stage {
    color: var(--text-medium);
    font-size: 0.85rem;
    font-style: italic;
}

/* Detailed Stage Steps */
.stage-steps {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    max-height: 300px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.stage-step {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: #fafbfc;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
    transition: all 0.3s ease;
    position: relative;
}

.stage-step.active {
    background: rgba(255, 105, 180, 0.05);
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(255, 105, 180, 0.1);
}

.stage-step.completed {
    background: rgba(34, 197, 94, 0.05);
    border-color: #22c55e;
}

.stage-step.error {
    background: rgba(239, 68, 68, 0.05);
    border-color: #ef4444;
}

.step-icon {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e5e7eb;
    color: #6b7280;
    transition: all 0.3s ease;
}

.stage-step.active .step-icon {
    background: var(--primary-color);
    color: white;
}

.stage-step.completed .step-icon {
    background: #22c55e;
    color: white;
}

.stage-step.error .step-icon {
    background: #ef4444;
    color: white;
}

.step-icon .material-icons {
    font-size: 18px;
}

.step-spinner {
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    border: 2px solid transparent;
    border-top: 2px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.step-spinner.hidden {
    display: none;
}

.step-content {
    flex: 1;
    min-width: 0;
}

.step-title {
    font-weight: 500;
    color: var(--text-dark);
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.step-description {
    color: var(--text-medium);
    font-size: 0.8rem;
    line-height: 1.3;
}

.step-status {
    font-size: 0.75rem;
    color: var(--text-light);
    min-width: 60px;
    text-align: right;
}

.stage-step.active .step-status::after {
    content: 'In Progress';
    color: var(--primary-color);
    font-weight: 500;
}

.stage-step.completed .step-status::after {
    content: 'Complete';
    color: #22c55e;
    font-weight: 500;
}

.stage-step.error .step-status::after {
    content: 'Error';
    color: #ef4444;
    font-weight: 500;
}

/* Progress Errors Display */
.progress-errors {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    border-radius: 8px;
}

.progress-errors.hidden {
    display: none;
}

.error-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: #ef4444;
    font-weight: 500;
    font-size: 0.9rem;
}

.error-header .material-icons {
    font-size: 18px;
}

.error-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.error-item {
    padding: 0.5rem;
    background: rgba(239, 68, 68, 0.05);
    border-radius: 4px;
    border-left: 3px solid #ef4444;
    font-size: 0.8rem;
    color: var(--text-dark);
}

.error-stage {
    font-weight: 500;
    color: #ef4444;
}

/* Legacy step styles for backwards compatibility */
.step {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: #f8f9fa;
    border-radius: 8px;
    color: #6c757d;
    transition: all 0.3s ease;
}

.step.active {
    background: rgba(255, 105, 180, 0.1);
    color: var(--primary-color);
    border-left: 4px solid var(--primary-color);
}

.step .material-icons {
    font-size: 20px;
    opacity: 0.7;
}

.step.active .material-icons {
    opacity: 1;
    animation: pulse 1.5s ease-in-out infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Radio Group Styling */
.radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.radio-option {
    display: flex;
    align-items: center;
    cursor: pointer;
    padding: 0.75rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    transition: all 0.2s ease;
    background: white;
}

.radio-option:hover {
    border-color: #d1d5db;
    background: #f9fafb;
}

.radio-option input[type="radio"] {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #d1d5db;
    border-radius: 50%;
    margin-right: 0.75rem;
    position: relative;
    transition: all 0.2s ease;
}

.radio-custom::after {
    content: '';
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #3b82f6;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.2s ease;
}

.radio-option input[type="radio"]:checked + .radio-custom {
    border-color: #3b82f6;
}

.radio-option input[type="radio"]:checked + .radio-custom::after {
    transform: translate(-50%, -50%) scale(1);
}

.radio-option:has(input[type="radio"]:checked) {
    border-color: #3b82f6;
    background: #eff6ff;
}

.radio-text {
    font-weight: 500;
    color: #374151;
}

/* ====================================== */
/* PROOF MAP MANAGEMENT STYLES */
/* ====================================== */

.proof-map-actions {
    display: flex;
    gap: 0.5rem;
    flex-direction: column;
}

.proof-map-actions-top {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    justify-content: space-between;
    align-items: center;
}

.proof-map-list {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    background: #fafbfc;
}

.proof-map-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem;
    border-bottom: 1px solid #e5e7eb;
    transition: all 0.2s ease;
    cursor: pointer;
}

.proof-map-item:last-child {
    border-bottom: none;
}

.proof-map-item:hover {
    background: #f0f9ff;
    border-color: var(--primary-pink);
}

.proof-map-item.selected {
    background: rgba(255, 105, 180, 0.1);
    border-color: var(--primary-pink);
}

.proof-map-info {
    flex: 1;
    min-width: 0;
}

.proof-map-title {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--dark-gray);
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.proof-map-meta {
    display: flex;
    gap: 1rem;
    font-size: 0.75rem;
    color: #6b7280;
}

.proof-map-description {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.25rem;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.proof-map-actions-menu {
    display: flex;
    gap: 0.25rem;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.proof-map-item:hover .proof-map-actions-menu {
    opacity: 1;
}

.proof-map-action-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    color: #6b7280;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.proof-map-action-btn:hover {
    background: var(--primary-pink);
    color: white;
}

.proof-map-action-btn.delete:hover {
    background: #ef4444;
    color: white;
}

.proof-map-action-btn .material-icons {
    font-size: 1rem;
}

.proof-map-empty {
    text-align: center;
    padding: 3rem 2rem;
    color: #6b7280;
}

.proof-map-empty .material-icons {
    font-size: 3rem;
    color: #d1d5db;
    margin-bottom: 1rem;
    display: block;
}

.proof-map-empty h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--dark-gray);
}

.proof-map-empty p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.4;
}

.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
}

.loading-state .loading-spinner {
    margin-bottom: 1rem;
}

.loading-state p {
    margin: 0;
    color: #6b7280;
    font-size: 0.9rem;
}

/* ====================================== */
/* MANUAL ELEMENT ENTRY MODAL STYLES */
/* ====================================== */

.manual-elements-info {
    background: #fef3c7;
    border: 1px solid #f59e0b;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.manual-elements-info p {
    margin: 0;
    color: #92400e;
    font-size: 0.95rem;
}

.charge-section {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.charge-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.charge-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1;
}

.charge-title .material-icons {
    color: #3b82f6;
    font-size: 1.2rem;
}

.charge-name-input {
    flex: 1;
    padding: 0.75rem;
    border: 2px solid #d1d5db;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
    transition: border-color 0.2s ease;
}

.charge-name-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.remove-charge {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-left: 0.5rem;
}

.remove-charge:hover {
    background: #dc2626;
}

.remove-charge .material-icons {
    font-size: 1.2rem;
}

.elements-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.element-input {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 0.5rem;
    align-items: center;
}

.element-input input[type="text"] {
    padding: 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.95rem;
    transition: border-color 0.2s ease;
}

.element-input input[type="text"]:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.connector-select {
    padding: 0.5rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    background: white;
    font-size: 0.9rem;
    min-width: 80px;
}

.connector-select:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.remove-element {
    background: #ef4444;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.remove-element:hover {
    background: #dc2626;
}

.remove-element .material-icons {
    font-size: 1.2rem;
}

.add-element {
    background: #6b7280;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 0.5rem 1rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    align-self: flex-start;
}

.add-element:hover {
    background: #4b5563;
}

.add-element .material-icons {
    font-size: 1.1rem;
}

.form-actions {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #e5e7eb;
    text-align: center;
}

/* Modal responsive adjustments for manual elements */
@media (max-width: 768px) {
    .element-input {
        grid-template-columns: 1fr;
        gap: 0.5rem;
    }
    
    .connector-select {
        justify-self: start;
        min-width: 120px;
    }
    
    .remove-element {
        justify-self: start;
        width: fit-content;
    }
}

/* ============================================
   WARNING SYSTEM
   ============================================ */

.warning-system {
    position: absolute;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    font-family: 'Poppins', sans-serif;
}

/* Warning Trigger Button */
.warning-trigger {
    position: relative;
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, #ff6b6b, #ee5a24);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: 0 8px 25px rgba(255, 107, 107, 0.3);
    transition: all 0.3s ease;
    color: white;
}

.warning-trigger:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 35px rgba(255, 107, 107, 0.4);
}

.warning-trigger .material-icons {
    font-size: 28px;
}

/* Warning trigger safe state (no warnings) */
.warning-trigger.safe {
    background: linear-gradient(135deg, #27ae60, #2ecc71);
    box-shadow: 0 8px 25px rgba(46, 204, 113, 0.3);
}

.warning-trigger.safe:hover {
    box-shadow: 0 12px 35px rgba(46, 204, 113, 0.4);
}

/* Warning trigger info state (all dismissed) */
.warning-trigger.dismissed {
    background: transparent;
    border: 2px solid #27ae60;
    box-shadow: 0 4px 15px rgba(39, 174, 96, 0.2);
}

.warning-trigger.dismissed:hover {
    background: rgba(39, 174, 96, 0.1);
    box-shadow: 0 6px 20px rgba(39, 174, 96, 0.3);
}

.warning-trigger.dismissed .material-icons {
    color: #27ae60;
}

.warning-count {
    position: absolute;
    top: -8px;
    right: -8px;
    background: var(--primary-pink);
    color: white;
    border-radius: 50%;
    min-width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
    border: 2px solid white;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Warning Panel */
.warning-panel {
    position: absolute;
    bottom: 70px;
    right: 0;
    width: 400px;
    max-height: 500px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 105, 180, 0.1);
    transform: translateY(20px) scale(0.95);
    opacity: 0;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.warning-panel.show {
    transform: translateY(0) scale(1);
    opacity: 1;
}

/* Warning Panel Header */
.warning-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid #f0f0f0;
    background: linear-gradient(135deg, #fff5f7 0%, #ffe6f0 100%);
    border-radius: 12px 12px 0 0;
}

.warning-panel-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--dark-gray);
}

.warning-panel-title .material-icons {
    color: #ff6b6b;
    font-size: 20px;
}

.warning-panel-close {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.warning-panel-close:hover {
    background: rgba(255, 107, 107, 0.1);
    color: #ff6b6b;
}

/* Warning Panel Content */
.warning-panel-content {
    flex: 1;
    overflow-y: auto;
    max-height: 350px;
}

.warning-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    gap: 1rem;
}

.loading-spinner-small {
    width: 24px;
    height: 24px;
    border: 2px solid #f0f0f0;
    border-top: 2px solid var(--primary-pink);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

.warning-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    text-align: center;
    gap: 0.75rem;
}

.warning-empty-icon .material-icons {
    font-size: 48px;
    color: var(--accent-green);
}

.warning-empty p {
    font-weight: 500;
    color: var(--dark-gray);
    margin: 0;
}

.warning-empty small {
    color: var(--text-secondary);
}

/* Warning List */
.warning-list {
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.warning-item {
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1rem;
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
}

.warning-item:hover {
    border-color: var(--primary-pink);
    box-shadow: 0 4px 12px rgba(255, 105, 180, 0.1);
    transform: translateY(-1px);
}

.warning-item.critical {
    border-left: 4px solid #ff6b6b;
    background: linear-gradient(135deg, #fff5f5 0%, #ffe6e6 100%);
}

.warning-item.warning {
    border-left: 4px solid #ffa726;
    background: linear-gradient(135deg, #fff8f0 0%, #ffedcc 100%);
}

.warning-item.info {
    border-left: 4px solid #42a5f5;
    background: linear-gradient(135deg, #f0f8ff 0%, #e6f3ff 100%);
}

.warning-item.dismissed {
    opacity: 0.6;
    background: #f9f9f9;
}

.warning-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.75rem;
    margin-bottom: 0.5rem;
}

.warning-severity {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.8rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.warning-severity.critical {
    color: #ff6b6b;
}

.warning-severity.warning {
    color: #ffa726;
}

.warning-severity.info {
    color: #42a5f5;
}

.warning-severity .material-icons {
    font-size: 16px;
}

.warning-actions {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.warning-dismiss {
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    color: var(--text-secondary);
}

.warning-dismiss:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--text-primary);
}

.warning-dismiss .material-icons {
    font-size: 18px;
}

.warning-message {
    font-size: 0.9rem;
    color: var(--text-primary);
    line-height: 1.4;
    margin-bottom: 0.75rem;
}

.warning-details {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.affected-count {
    background: rgba(255, 105, 180, 0.1);
    color: var(--primary-pink);
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
}

.warning-suggestion {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 6px;
    border-left: 3px solid rgba(255, 105, 180, 0.3);
}

/* Warning Panel Footer */
.warning-panel-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
    border-radius: 0 0 12px 12px;
}

.btn-small {
    padding: 0.5rem 0.75rem;
    font-size: 0.8rem;
    height: auto;
    min-height: 32px;
}

.btn-small .material-icons {
    font-size: 16px;
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .warning-system {
        bottom: 1rem;
        right: 1rem;
    }
    
    .warning-panel {
        width: 320px;
        max-width: calc(100vw - 2rem);
    }
    
    .warning-trigger {
        width: 48px;
        height: 48px;
    }
    
    .warning-trigger .material-icons {
        font-size: 24px;
    }
}

/* Hide warning system when not needed */
.warning-system.hidden {
    display: none;
}

.hidden {
    display: none !important;
}

/* Outline Button Style for Validation */
.btn-outline {
    background: transparent;
    border: 2px solid var(--primary-pink);
    color: var(--primary-pink);
    padding: 0.75rem 1.25rem;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-decoration: none;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    min-height: 44px;
    white-space: nowrap;
}

.btn-outline:hover {
    background: var(--primary-pink);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 105, 180, 0.2);
}

.btn-outline:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.btn-outline:disabled:hover {
    background: transparent;
    color: var(--primary-pink);
    transform: none;
}
