/* Estilos para contenido de documentación */

/* Breadcrumb mejorado */
.breadcrumb .separator {
    color: var(--text-secondary);
    margin: 0 4px;
}

/* Secciones */
.doc-section {
    margin-bottom: 48px;
}

.doc-section h2 {
    margin-top: 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-color);
}

.doc-section p {
    margin-bottom: 16px;
    color: var(--text-secondary);
}

/* Alertas */
.alert {
    display: flex;
    gap: 16px;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
}

.alert .material-icons {
    font-size: 24px;
    flex-shrink: 0;
}

.alert strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-color);
}

.alert p {
    margin: 0;
    font-size: 14px;
}

.alert-info {
    background: #e3f2fd;
    border-left: 4px solid #1976d2;
}

.alert-info .material-icons {
    color: #1976d2;
}

.alert-tip {
    background: #e8f5e9;
    border-left: 4px solid #43a047;
}

.alert-tip .material-icons {
    color: #43a047;
}

.alert-warning {
    background: #fff3e0;
    border-left: 4px solid #ef6c00;
}

.alert-warning .material-icons {
    color: #ef6c00;
}

/* Tablas */
.table-container {
    overflow-x: auto;
    margin-bottom: 24px;
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.doc-table th,
.doc-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.doc-table th {
    background: var(--sidebar-bg);
    font-weight: 600;
    color: var(--text-color);
}

.doc-table tr:hover {
    background: #f8f9fa;
}

.code {
    background: #f1f3f4;
    padding: 2px 8px;
    border-radius: 4px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 13px;
    color: #d93025;
}

/* Ejemplo visual */
.example-box {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

.example-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 16px 20px;
    background: var(--sidebar-bg);
    font-weight: 600;
    border-bottom: 1px solid var(--border-color);
}

.example-header .material-icons {
    color: var(--primary-color);
}

.example-content {
    padding: 16px 20px;
}

.example-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px dashed var(--border-color);
}

.example-item:last-child {
    border-bottom: none;
}

.item-name {
    flex: 1;
    font-size: 14px;
}

.item-class {
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
}

.class-a { background: #e3f2fd; color: #1565c0; }
.class-b { background: #e8f5e9; color: #2e7d32; }
.class-c { background: #fff3e0; color: #ef6c00; }
.class-d { background: #fce4ec; color: #c2185b; }
.class-e { background: #f3e5f5; color: #7b1fa2; }

.item-printer {
    font-size: 13px;
    color: var(--text-secondary);
    font-family: monospace;
}

.example-footer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #e8f5e9;
    font-size: 13px;
    color: #2e7d32;
}

.example-footer .material-icons {
    font-size: 18px;
}

/* Lista de pasos */
.steps-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.steps-list li {
    display: flex;
    gap: 16px;
    padding: 16px 0;
    border-bottom: 1px solid var(--border-color);
}

.steps-list li:last-child {
    border-bottom: none;
}

.step-number {
    width: 32px;
    height: 32px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    flex-shrink: 0;
}

.step-content strong {
    display: block;
    margin-bottom: 4px;
    color: var(--text-color);
}

.step-content p {
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Bloques de código */
.code-block {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 24px;
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: #2d2d2d;
    color: #ccc;
    font-size: 13px;
    font-family: monospace;
}

.copy-btn {
    background: none;
    border: none;
    color: #888;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    display: flex;
}

.copy-btn:hover {
    background: #444;
    color: #fff;
}

.copy-btn .material-icons {
    font-size: 18px;
}

.code-block pre {
    margin: 0;
    padding: 16px;
    background: #1e1e1e;
    overflow-x: auto;
}

.code-block code {
    font-family: 'Monaco', 'Consolas', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #d4d4d4;
}

/* FAQ */
.faq-item {
    border: 1px solid var(--border-color);
    border-radius: 8px;
    margin-bottom: 12px;
    overflow: hidden;
}

.faq-question {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px;
    cursor: pointer;
    font-weight: 500;
    transition: background 0.2s;
}

.faq-question:hover {
    background: var(--sidebar-bg);
}

.faq-question .material-icons:first-child {
    color: var(--primary-color);
}

.faq-arrow {
    margin-left: auto;
    color: var(--text-secondary);
    transition: transform 0.2s;
}

.faq-item.open .faq-arrow {
    transform: rotate(180deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.open .faq-answer {
    max-height: 200px;
}

.faq-answer p {
    padding: 0 16px 16px 52px;
    margin: 0;
    font-size: 14px;
    color: var(--text-secondary);
}

/* Footer de navegación */
.content-footer {
    margin-top: 48px;
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.footer-nav {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}

.footer-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text-color);
    transition: all 0.2s;
    flex: 1;
}

.footer-nav-item:hover {
    border-color: var(--primary-color);
    background: var(--hover-bg);
}

.footer-nav-item.prev {
    justify-content: flex-start;
}

.footer-nav-item.next {
    justify-content: flex-end;
    text-align: right;
}

.footer-nav-item .material-icons {
    color: var(--primary-color);
}

.nav-label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
}

.nav-title {
    font-weight: 500;
}

.footer-help {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
}

.footer-help a {
    color: var(--primary-color);
    text-decoration: none;
}

.footer-help a:hover {
    text-decoration: underline;
}

/* Feature list */
.feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 24px 0;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 15px;
}

.feature-list li:last-child {
    border-bottom: none;
}

.feature-list .material-icons {
    color: var(--primary-color);
    font-size: 22px;
}

/* Workflow */
.workflow {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}

.workflow-step {
    flex: 1;
    min-width: 150px;
    text-align: center;
    padding: 16px;
}

.workflow-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 20px;
    margin: 0 auto 12px;
}

.workflow-content h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
    color: var(--text-color);
}

.workflow-content p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.workflow-arrow {
    display: flex;
    align-items: center;
    padding-top: 24px;
    color: var(--text-secondary);
}

/* Modifiers */
.modifier-group {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.modifier-group:last-child {
    border-bottom: none;
}

.modifier-title {
    display: block;
    font-weight: 500;
    margin-bottom: 10px;
    font-size: 14px;
}

.modifier-options {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.modifier-option {
    padding: 6px 12px;
    background: #f1f3f4;
    border-radius: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

.modifier-option.selected {
    background: #e8f0fe;
    color: var(--primary-color);
    font-weight: 500;
}

/* H3 dentro de secciones */
.doc-section h3 {
    font-size: 18px;
    margin: 24px 0 12px 0;
    color: var(--text-color);
}

/* Status grid (estados de mesa) */
.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.status-card {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.status-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.status-icon .material-icons {
    font-size: 24px;
    color: white;
}

.status-info h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
}

.status-info p {
    margin: 0 0 6px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.status-color {
    font-size: 11px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.status-available .status-icon { background: #43a047; }
.status-available .status-color { background: #e8f5e9; color: #2e7d32; }

.status-occupied .status-icon { background: #e53935; }
.status-occupied .status-color { background: #ffebee; color: #c62828; }

.status-pending .status-icon { background: #fdd835; }
.status-pending .status-color { background: #fffde7; color: #f57f17; }

.status-reserved .status-icon { background: #1e88e5; }
.status-reserved .status-color { background: #e3f2fd; color: #1565c0; }

/* Demo rejilla de mesas */
.mesa-grid-demo {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 12px;
    padding: 8px;
}

.mesa-demo {
    aspect-ratio: 1;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 500;
    position: relative;
    min-height: 90px;
}

.mesa-demo.available {
    background: linear-gradient(135deg, #66bb6a, #43a047);
}

.mesa-demo.occupied {
    background: linear-gradient(135deg, #ef5350, #e53935);
}

.mesa-demo.pending {
    background: linear-gradient(135deg, #ffee58, #fdd835);
    color: #5d4037;
}

.mesa-demo.reserved {
    background: linear-gradient(135deg, #42a5f5, #1e88e5);
}

.mesa-number {
    font-size: 24px;
    font-weight: 700;
}

.mesa-status-text {
    font-size: 11px;
    margin-top: 4px;
}

.mesa-time {
    font-size: 10px;
    opacity: 0.85;
    margin-top: 2px;
}

/* Options grid (opciones de división) */
.options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.option-card {
    background: var(--sidebar-bg);
    border-radius: 10px;
    padding: 20px;
    text-align: center;
}

.option-card .material-icons {
    font-size: 36px;
    color: var(--primary-color);
    margin-bottom: 12px;
}

.option-card h4 {
    margin: 0 0 8px 0;
    font-size: 15px;
}

.option-card p {
    margin: 0 0 12px 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.option-example {
    display: inline-block;
    background: white;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 12px;
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

/* Payment grid */
.payment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.payment-card {
    background: var(--sidebar-bg);
    border-radius: 10px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s;
}

.payment-card:hover {
    background: var(--hover-bg);
}

.payment-card .material-icons {
    font-size: 28px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.payment-card h4 {
    margin: 0 0 4px 0;
    font-size: 14px;
}

.payment-card p {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Interface diagram */
.interface-diagram {
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-bottom: 24px;
}

.interface-area {
    padding: 16px;
    border-bottom: 1px dashed var(--border-color);
}

.interface-area:last-child {
    border-bottom: none;
}

.interface-main {
    display: flex;
    gap: 1px;
    background: var(--border-color);
}

.interface-main .interface-area {
    flex: 1;
    background: white;
    border-bottom: none;
}

.area-header {
    background: #2d2d2d;
    color: white;
}

.area-header .area-label {
    color: #4fc3f7;
}

.area-header p {
    color: #ccc;
}

.area-mesas {
    background: #f0f7ff;
}

.area-detalle {
    background: #fff8e1;
}

.area-acciones {
    background: #e8f5e9;
}

.area-label {
    font-weight: 600;
    font-size: 13px;
    color: var(--primary-color);
    display: block;
    margin-bottom: 4px;
}

.interface-area p {
    margin: 0;
    font-size: 12px;
    color: var(--text-secondary);
}

/* Corte de caja */
.corte-line {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

.corte-line:last-child {
    border-bottom: none;
}

.corte-line.total {
    font-weight: 600;
    font-size: 16px;
    background: var(--sidebar-bg);
    margin: 8px -20px;
    padding: 12px 20px;
}

.corte-line .negative {
    color: #d32f2f;
}

.corte-line.success {
    color: #2e7d32;
    font-weight: 500;
}

/* Keyboard shortcuts */
.kbd {
    display: inline-block;
    background: linear-gradient(180deg, #f5f5f5, #e0e0e0);
    border: 1px solid #ccc;
    border-radius: 4px;
    padding: 4px 8px;
    font-family: 'Monaco', 'Consolas', monospace;
    font-size: 12px;
    color: #333;
    box-shadow: 0 2px 0 #999;
    min-width: 32px;
    text-align: center;
}

.shortcuts-table {
    margin-bottom: 24px;
}

.shortcuts-table .doc-table td:first-child {
    width: 100px;
}

/* Hierarchy diagram */
.hierarchy-diagram {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    background: var(--sidebar-bg);
    border-radius: 12px;
    margin-bottom: 24px;
}

.hierarchy-level {
    width: 100%;
    max-width: 400px;
}

.hierarchy-node {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 24px;
    background: white;
    border-radius: 10px;
    border: 2px solid var(--primary-color);
    text-align: center;
}

.hierarchy-node .material-icons {
    font-size: 32px;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.node-label {
    font-weight: 600;
    font-size: 16px;
    color: var(--text-color);
}

.node-example {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.hierarchy-connector {
    width: 2px;
    height: 24px;
    background: var(--primary-color);
}

.level-1 .hierarchy-node { border-color: #1565c0; }
.level-1 .hierarchy-node .material-icons { color: #1565c0; }

.level-2 .hierarchy-node { border-color: #7b1fa2; }
.level-2 .hierarchy-node .material-icons { color: #7b1fa2; }

.level-3 .hierarchy-node { border-color: #2e7d32; }
.level-3 .hierarchy-node .material-icons { color: #2e7d32; }

/* Tree structure */
.tree-structure {
    font-size: 14px;
}

.tree-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    border-bottom: 1px dashed var(--border-color);
}

.tree-item:last-child {
    border-bottom: none;
}

.tree-item.level-1 {
    font-weight: 600;
    color: #1565c0;
}

.tree-item.level-2 {
    padding-left: 24px;
    color: #7b1fa2;
}

.tree-item.level-3 {
    padding-left: 48px;
    color: var(--text-secondary);
    font-weight: normal;
}

.tree-item .material-icons {
    font-size: 18px;
}

/* Fields grid */
.fields-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-bottom: 24px;
}

.field-card {
    background: var(--sidebar-bg);
    border-radius: 8px;
    padding: 12px 16px;
    border-left: 3px solid var(--primary-color);
}

.field-name {
    display: block;
    font-weight: 600;
    font-size: 14px;
    color: var(--text-color);
    margin-bottom: 4px;
}

.field-desc {
    font-size: 12px;
    color: var(--text-secondary);
}

/* Modifier example */
.modifier-example {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.modifier-group-example {
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

.modifier-group-example:last-child {
    border-bottom: none;
}

.group-title {
    display: block;
    font-weight: 500;
    font-size: 14px;
    margin-bottom: 10px;
    color: var(--text-color);
}

.modifier-options-example {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.modifier-options-example span {
    padding: 6px 12px;
    background: #e3f2fd;
    border-radius: 16px;
    font-size: 13px;
    color: #1565c0;
}

/* Sync timeline */
.sync-timeline {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px;
    background: var(--sidebar-bg);
    border-radius: 12px;
    margin-bottom: 24px;
}

.sync-step {
    display: flex;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 500px;
    padding: 16px;
    background: white;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.sync-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-color);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sync-icon .material-icons {
    color: white;
    font-size: 24px;
}

.sync-content h4 {
    margin: 0 0 4px 0;
    font-size: 15px;
    color: var(--text-color);
}

.sync-content p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

.sync-arrow {
    padding: 8px 0;
    color: var(--primary-color);
}

.sync-arrow .material-icons {
    font-size: 28px;
}

/* Responsive para contenido */
@media (max-width: 768px) {
    .example-item {
        flex-wrap: wrap;
    }

    .item-name {
        width: 100%;
        margin-bottom: 8px;
    }

    .footer-nav {
        flex-direction: column;
    }

    .footer-nav-item.prev,
    .footer-nav-item.next {
        justify-content: flex-start;
        text-align: left;
    }

    .workflow {
        flex-direction: column;
    }

    .workflow-arrow {
        transform: rotate(90deg);
        padding: 0;
        justify-content: center;
    }

    .workflow-step {
        width: 100%;
    }
}
