/* Custom Styles to enhance Pico.css with a slight Minecraft feel */

:root {
    --mc-green: #2ecc71;
    --mc-dark: #2c3e50;
}

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
}

h1, h2, h3, h4, h5, h6 {
    font-family: 'VT323', monospace;
    letter-spacing: 1px;
}

.header-mc h1 {
    color: var(--pico-primary);
    text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}

.alert {
    padding: 1rem;
    margin-bottom: 1.5rem;
    border-radius: var(--pico-border-radius);
    font-weight: bold;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.2);
    color: #27ae60;
    border: 1px solid #27ae60;
}

.alert-error {
    background-color: rgba(231, 76, 60, 0.2);
    color: #c0392b;
    border: 1px solid #c0392b;
}

@media (prefers-color-scheme: dark) {
    .alert-success {
        color: #2ecc71;
    }
    .alert-error {
        color: #e74c3c;
    }
    .header-mc h1 {
        text-shadow: 2px 2px 0px rgba(0,0,0,0.5);
    }
}

/* Responsive Table & UI enhancements */
figure {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
    margin-bottom: 1rem;
}

.table-actions {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.table-actions button {
    margin: 0;
    padding: 0.35rem 0.65rem;
    font-size: 0.85rem;
    white-space: nowrap;
}

.cell-date {
    white-space: nowrap;
    font-size: 0.85rem;
}

@media (max-width: 640px) {
    .responsive-table thead {
        display: none;
    }
    .responsive-table tbody tr {
        display: block;
        background: rgba(255, 255, 255, 0.02);
        border: 1px solid rgba(255, 255, 255, 0.1);
        border-radius: var(--pico-border-radius, 8px);
        margin-bottom: 1rem;
        padding: 0.85rem;
    }
    .responsive-table th, 
    .responsive-table td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.35rem 0;
        border: none;
        font-size: 0.95rem;
    }
    .responsive-table th::before,
    .responsive-table td::before {
        content: attr(data-label);
        font-weight: 600;
        opacity: 0.7;
        font-size: 0.85rem;
    }
    .responsive-table td.table-actions {
        margin-top: 0.75rem;
        padding-top: 0.75rem;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        gap: 0.75rem;
    }
    .responsive-table td.table-actions::before {
        display: none;
    }
    .responsive-table td.table-actions form {
        flex: 1;
    }
    .responsive-table td.table-actions button {
        width: 100%;
        padding: 0.5rem;
    }
}

/* Mods Manifest Code Editor Styles */
.code-editor {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    line-height: 1.45;
    tab-size: 2;
    -moz-tab-size: 2;
    width: 100%;
    border-radius: var(--pico-border-radius);
    padding: 0.85rem;
    box-sizing: border-box;
    white-space: pre;
    overflow-x: auto;
}

.editor-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.toolbar-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    flex-wrap: wrap;
}

.btn-sm {
    margin: 0 !important;
    padding: 0.25rem 0.6rem !important;
    font-size: 0.8rem !important;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    padding: 0.2rem 0.6rem;
    font-size: 0.8rem;
    border-radius: 4px;
    font-weight: 600;
}

.badge-info {
    background-color: rgba(52, 152, 219, 0.15);
    color: #3498db;
    border: 1px solid rgba(52, 152, 219, 0.3);
}

.badge-success {
    background-color: rgba(46, 204, 113, 0.15);
    color: #2ecc71;
    border: 1px solid rgba(46, 204, 113, 0.3);
}

.validation-status {
    font-size: 0.85rem;
    font-weight: bold;
}

.status-valid {
    color: #2ecc71;
}

.status-invalid {
    color: #e74c3c;
}

