/* ============================================
   Beam Analyzer - Premium CSS
   ============================================ */

html {
    scrollbar-gutter: stable;
}

/* Page Layout */
.beam-app {
    min-height: 100vh;
    background: var(--color-bg-primary);
}

.beam-app-header {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--color-border);
    padding: 0.75rem 1.5rem;
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.beam-app-header .back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--color-text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.9rem;
    transition: all 0.2s ease;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.beam-app-header .back-link:hover {
    color: var(--color-accent);
    background: var(--color-bg-tertiary);
}

.beam-app-header .back-link svg {
    width: 18px;
    height: 18px;
    transition: transform 0.2s ease;
}

.beam-app-header .back-link:hover svg {
    transform: translateX(-3px);
}

.beam-app-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--color-text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.beam-app-title .title-icon {
    font-size: 1.3rem;
}

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

/* Main Layout Container */
.beam-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    width: 100%;
}

/* Accordion Toggle Button */
.accordion-toggle-btn {
    width: 100%;
    padding: 1rem 1.5rem;
    background: var(--color-bg-secondary);
    border: 1.5px solid var(--color-border);
    border-radius: 10px;
    color: var(--color-text-primary);
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.95rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
    outline: none;
}
.accordion-toggle-btn:hover {
    border-color: var(--color-accent);
    background: var(--color-bg-tertiary);
    color: var(--color-accent);
}
.accordion-toggle-btn .chevron {
    transition: transform 0.3s ease;
    font-size: 0.8rem;
    color: var(--color-text-muted);
}
.accordion-toggle-btn.active .chevron {
    transform: rotate(180deg);
    color: var(--color-accent);
}

/* Collapsible Accordion Content */
.accordion-content {
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s ease;
    width: 100%;
}
.accordion-content.expanded {
    max-height: 3500px; /* Safe upper limit for accordion height */
    opacity: 1;
    margin-top: 0.5rem;
}

/* Main Grid Layout */
.beam-main-grid {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    width: 100%;
}

.grid-col-left {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    width: 100%;
}

.grid-col-middle {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    width: 100%;
}

.grid-col-right {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    width: 100%;
}

.control-panel-stack {
    display: flex;
    flex-direction: column;
    gap: 1.2rem;
    width: 100%;
}

.panel-section {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
}

/* Theory Card and Formula Styling */
.info-card {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 10px;
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.info-card-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1.5px solid var(--color-border-light);
    padding-bottom: 0.5rem;
    margin-bottom: 0.25rem;
}

.info-card-text {
    font-size: 0.76rem;
    color: var(--color-text-secondary);
    line-height: 1.5;
}

.info-formula {
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border-light);
    border-radius: 6px;
    padding: 0.5rem;
    text-align: center;
    margin: 0.15rem 0;
    overflow-x: auto;
    color: var(--color-accent);
}

.info-formula .katex-display {
    margin: 0.2rem 0;
}

.panel-section-title {
    font-family: var(--font-heading);
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.panel-section-title .section-icon {
    font-size: 1rem;
}

/* Beam Properties */
.prop-row {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.prop-group {
    flex: 1;
}

.prop-label {
    display: block;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    margin-bottom: 0.3rem;
}

.prop-input {
    width: 100%;
    padding: 0.5rem 0.65rem;
    background: var(--color-bg-tertiary);
    border: 1.5px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text-primary);
    font-family: var(--font-mono);
    font-size: 0.88rem;
    transition: all 0.2s ease;
}

.prop-input:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
    background: var(--color-bg-secondary);
}

.prop-select {
    width: 100%;
    padding: 0.5rem 0.65rem;
    background: var(--color-bg-tertiary);
    border: 1.5px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-text-primary);
    font-family: var(--font-body);
    font-size: 0.88rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.prop-select:focus {
    outline: none;
    border-color: var(--color-accent);
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.1);
}

/* Item Lists (Supports & Loads) */
.item-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.item-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    background: var(--color-bg-tertiary);
    border: 1px solid var(--color-border-light);
    border-radius: 10px;
    transition: all 0.2s ease;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-10px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.item-card:hover {
    border-color: var(--color-accent);
    background: var(--color-bg-elevated);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

.item-icon {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
    flex-shrink: 0;
}

.item-icon.support-icon {
    background: linear-gradient(135deg, #fef3c7, #fcd34d);
    color: #92400e;
}

.item-icon.load-icon {
    background: linear-gradient(135deg, #dbeafe, #60a5fa);
    color: #1e40af;
}

.item-icon.moment-icon {
    background: linear-gradient(135deg, #e0e7ff, #818cf8);
    color: #3730a3;
}

.item-details {
    flex: 1;
    min-width: 0;
}

.item-type {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--color-text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.item-value {
    font-size: 0.72rem;
    color: var(--color-text-muted);
    font-family: var(--font-mono);
}

.item-delete {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 6px;
    font-size: 0.85rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
}

.item-card:hover .item-delete {
    opacity: 1;
}

.item-delete:hover {
    background: #fee2e2;
    color: #dc2626;
}

/* Add Item Form */
.add-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    padding: 0.75rem;
    background: var(--color-bg-primary);
    border: 1.5px dashed var(--color-border);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.add-form:focus-within {
    border-color: var(--color-accent);
    background: var(--color-bg-secondary);
}

.add-form .full-width {
    grid-column: 1 / -1;
}

.add-btn {
    grid-column: 1 / -1;
    padding: 0.5rem;
    background: var(--color-accent);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
}

.add-btn:hover {
    background: var(--color-accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.add-btn:active {
    transform: translateY(0);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 1.5rem;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.empty-state .empty-icon {
    font-size: 2rem;
    margin-bottom: 0.5rem;
    opacity: 0.5;
}

/* Results Panel */
.results-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.result-card {
    padding: 0.75rem;
    background: linear-gradient(135deg, var(--color-bg-tertiary), var(--color-bg-primary));
    border: 1px solid var(--color-border-light);
    border-radius: 10px;
    text-align: center;
    transition: all 0.3s ease;
}

.result-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.result-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--color-text-muted);
    margin-bottom: 0.25rem;
}

.result-value {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-accent);
    font-family: var(--font-mono);
}

.result-unit {
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--color-text-secondary);
}

.result-card.full-span {
    grid-column: 1 / -1;
}

/* Results and Visualization Wrapper */

.diagram-container {
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.diagram-container:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.diagram-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--color-text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.diagram-title .dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.diagram-title .dot.red { background: #dc2626; }
.diagram-title .dot.blue { background: #2563eb; }
.diagram-title .dot.green { background: #059669; }
.diagram-title .dot.purple { background: #7c3aed; }

.diagram-svg {
    width: 100%;
    display: block;
    border-radius: 8px;
    background: var(--color-bg-primary);
    border: 1px solid var(--color-border-light);
}

/* SVG Styles */
.beam-line {
    stroke: #374151;
    stroke-width: 5;
    stroke-linecap: round;
}

.support-symbol {
    fill: none;
    stroke: #b45309;
    stroke-width: 2;
}

.support-fill {
    fill: #fbbf24;
    opacity: 0.6;
}

.load-arrow {
    stroke: #2563eb;
    stroke-width: 2.5;
    fill: none;
    marker-end: url(#arrowhead-blue);
}

.load-label {
    fill: #2563eb;
    font-family: 'Inter', sans-serif;
    font-size: 11px;
    font-weight: 600;
}

.moment-arc {
    stroke: #7c3aed;
    stroke-width: 2.5;
    fill: none;
}

.dimension-line {
    stroke: #9ca3af;
    stroke-width: 1;
    stroke-dasharray: 4 3;
}

.dimension-text {
    fill: #6b7280;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    text-anchor: middle;
}

.reaction-arrow {
    stroke: #059669;
    stroke-width: 2;
    fill: none;
    marker-end: url(#arrowhead-green);
}

.reaction-label {
    fill: #059669;
    font-family: 'Inter', sans-serif;
    font-size: 10px;
    font-weight: 600;
}

/* Shear & Moment Diagram SVG Styles */
.diagram-axis {
    stroke: #d1d5db;
    stroke-width: 1;
}

.diagram-fill-positive {
    opacity: 0.15;
}

.diagram-fill-negative {
    opacity: 0.15;
}

.diagram-line-shear {
    stroke: #dc2626;
    stroke-width: 2.5;
    fill: none;
    stroke-linejoin: round;
}

.diagram-line-moment {
    stroke: #059669;
    stroke-width: 2.5;
    fill: none;
    stroke-linejoin: round;
}

.diagram-value-text {
    font-family: 'JetBrains Mono', monospace;
    font-size: 9px;
    font-weight: 500;
}

.diagram-grid {
    stroke: #e5e7eb;
    stroke-width: 0.5;
    stroke-dasharray: 2 4;
}

/* Tooltip for diagrams */
.beam-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 0.4rem 0.6rem;
    border-radius: 6px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
    pointer-events: none;
    z-index: 50;
    white-space: nowrap;
    transform: translate(-50%, -100%);
    margin-top: -8px;
    opacity: 0;
    transition: opacity 0.15s ease;
}

.beam-tooltip.visible {
    opacity: 1;
}

/* Preset Buttons */
.preset-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}

.preset-btn {
    padding: 0.6rem 0.5rem;
    background: var(--color-bg-tertiary);
    border: 1.5px solid var(--color-border);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: center;
}

.preset-btn:hover {
    border-color: var(--color-accent);
    background: var(--color-bg-elevated);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.preset-btn:active {
    transform: translateY(0);
}

.preset-btn .preset-icon {
    display: block;
    font-size: 1.5rem;
    margin-bottom: 0.3rem;
}

.preset-btn .preset-name {
    display: block;
    font-size: 0.72rem;
    font-weight: 600;
    color: var(--color-text-secondary);
}

/* Status/Info Bar */
.status-bar {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.5rem 1rem;
    background: var(--color-bg-tertiary);
    border-radius: 8px;
    font-size: 0.78rem;
    color: var(--color-text-muted);
    margin-bottom: 1rem;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #059669;
    animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

.status-info {
    display: flex;
    gap: 1rem;
    margin-left: auto;
}

.status-info span {
    font-family: var(--font-mono);
    font-size: 0.72rem;
}

/* Warning / Error Messages */
.analysis-warning {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fef3c7;
    border: 1px solid #fcd34d;
    border-radius: 10px;
    color: #92400e;
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.analysis-warning .warn-icon {
    font-size: 1.1rem;
    flex-shrink: 0;
}

.analysis-error {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fee2e2;
    border: 1px solid #fca5a5;
    border-radius: 10px;
    color: #991b1b;
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

/* ============================================
   Responsive Design
   ============================================ */

@media (max-width: 1024px) {
    .beam-layout {
        grid-template-columns: 1fr;
    }

    .beam-panel-left {
        position: static;
        height: auto;
        border-right: none;
        border-bottom: 1px solid var(--color-border);
        max-height: 50vh;
        overflow-y: auto;
    }

    .beam-panel-right {
        height: auto;
        min-height: 60vh;
    }
}

@media (max-width: 640px) {
    .beam-app-header {
        padding: 0.5rem 1rem;
    }

    .beam-app-title {
        font-size: 0.95rem;
    }

    .beam-panel-right {
        padding: 1rem;
    }

    .diagram-container {
        padding: 1rem;
    }

    .panel-section {
        padding: 1rem;
    }

    .add-form {
        grid-template-columns: 1fr;
    }

    .results-grid {
        grid-template-columns: 1fr;
    }

    .preset-grid {
        grid-template-columns: 1fr 1fr;
    }
}

/* ============================================
   Dark Mode Overrides
   ============================================ */

body.dark-mode .beam-app-header {
    background: rgba(15, 15, 20, 0.9);
}

body.dark-mode .beam-panel-left {
    background: var(--color-bg-secondary);
}

body.dark-mode .item-card {
    background: var(--color-bg-tertiary);
    border-color: var(--color-border);
}

body.dark-mode .item-icon.support-icon {
    background: linear-gradient(135deg, #78350f, #92400e);
    color: #fcd34d;
}

body.dark-mode .item-icon.load-icon {
    background: linear-gradient(135deg, #1e3a5f, #1e40af);
    color: #93c5fd;
}

body.dark-mode .item-icon.moment-icon {
    background: linear-gradient(135deg, #312e81, #3730a3);
    color: #a5b4fc;
}

body.dark-mode .item-delete:hover {
    background: #7f1d1d;
    color: #fca5a5;
}

body.dark-mode .diagram-svg {
    background: var(--color-bg-tertiary);
}

body.dark-mode .beam-line {
    stroke: #d1d5db;
}

body.dark-mode .dimension-text {
    fill: #9ca3af;
}

body.dark-mode .dimension-line {
    stroke: #4b5563;
}

body.dark-mode .diagram-axis {
    stroke: #4b5563;
}

body.dark-mode .diagram-grid {
    stroke: #374151;
}

body.dark-mode .analysis-warning {
    background: #451a03;
    border-color: #78350f;
    color: #fcd34d;
}

body.dark-mode .analysis-error {
    background: #450a0a;
    border-color: #7f1d1d;
    color: #fca5a5;
}

body.dark-mode .result-card {
    background: linear-gradient(135deg, var(--color-bg-tertiary), var(--color-bg-secondary));
}

body.dark-mode .preset-btn:hover {
    background: var(--color-bg-secondary);
}

body.dark-mode .beam-tooltip {
    background: rgba(255, 255, 255, 0.9);
    color: #1a1a1a;
}

/* Scrollbar for panels */
.beam-panel-left::-webkit-scrollbar {
    width: 6px;
}

.beam-panel-left::-webkit-scrollbar-track {
    background: transparent;
}

.beam-panel-left::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

.beam-panel-left::-webkit-scrollbar-thumb:hover {
    background: var(--color-accent);
}

.beam-panel-right::-webkit-scrollbar {
    width: 6px;
}

.beam-panel-right::-webkit-scrollbar-track {
    background: transparent;
}

.beam-panel-right::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

/* Desktop 3-Column Layout */
@media (min-width: 1280px) {
    .beam-container {
        max-width: 1600px;
    }
    .beam-main-grid {
        display: grid;
        grid-template-columns: 1fr 900px 1fr;
        gap: 1.5rem;
    }
    .grid-col-left {
        display: flex;
        order: 0;
    }
    .grid-col-middle {
        order: 0;
    }
    .grid-col-right {
        order: 0;
    }
}

/* Mobile/Tablet Column Stacking Order */
@media (max-width: 1279px) {
    .grid-col-middle {
        order: 1;
    }
    .grid-col-left {
        order: 2;
    }
    .grid-col-right {
        order: 3;
    }
}

/* ============================================
   Popover Editor and Pencil Button Styles
   ============================================ */

.beam-popover {
    position: absolute;
    background: var(--color-bg-secondary);
    border: 1px solid var(--color-border);
    border-radius: 12px;
    padding: 1rem;
    box-shadow: var(--shadow-lg), 0 10px 25px -5px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    width: 290px;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.95);
    animation: fadeInScale 0.2s ease-out;
}

body.dark-mode .beam-popover {
    background: rgba(26, 26, 26, 0.95);
    border-color: var(--color-border);
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(-5px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.beam-popover-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--color-text-primary);
    border-bottom: 1px solid var(--color-border-light);
    padding-bottom: 0.4rem;
    margin-bottom: 0.2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.beam-popover-close {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px;
}
.beam-popover-close:hover {
    color: var(--color-accent);
}

.beam-popover-fields {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.beam-popover-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.beam-popover-btn {
    flex: 1;
    padding: 0.45rem;
    font-size: 0.78rem;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    border: none;
    transition: all 0.15s ease;
    text-align: center;
}

.beam-popover-btn.primary {
    background: var(--color-accent);
    color: #fff;
}
.beam-popover-btn.primary:hover {
    background: var(--color-accent-dark);
}

.beam-popover-btn.danger {
    background: #fee2e2;
    color: #dc2626;
}
.beam-popover-btn.danger:hover {
    background: #fca5a5;
}

body.dark-mode .beam-popover-btn.danger {
    background: #450a0a;
    color: #fca5a5;
}
body.dark-mode .beam-popover-btn.danger:hover {
    background: #7f1d1d;
}

.beam-popover-btn.secondary {
    background: var(--color-bg-tertiary);
    color: var(--color-text-primary);
}
.beam-popover-btn.secondary:hover {
    background: var(--color-border);
}

/* Sidebar List Edit Button */
.item-edit {
    background: transparent;
    border: none;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 0.3rem;
    border-radius: 6px;
    font-size: 0.8rem;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    margin-left: auto; /* Push edit button next to delete button */
}

.item-card:hover .item-edit {
    opacity: 1;
}

.item-edit:hover {
    background: var(--color-bg-tertiary);
    color: var(--color-accent);
}

/* Make sure close button overlaps correctly */
.item-delete {
    opacity: 0;
    margin-left: 0.2rem;
}

.item-card:hover .item-delete {
    opacity: 1;
}
