﻿/* Representacion impresa tipo RIDE (SRI Ecuador) */
.ride-document {
    font-family: Arial, Helvetica, sans-serif;
    font-size: 11px;
    color: #111;
    background: #fff;
    max-width: 820px;
    margin: 0 auto;
    padding: 12px 16px;
    border: 1px solid #333;
}

.ride-document .ride-title {
    text-align: center;
    font-size: 16px;
    font-weight: bold;
    letter-spacing: 0.5px;
    margin: 8px 0 4px;
}

.ride-document .ride-subtitle {
    text-align: center;
    font-size: 12px;
    margin-bottom: 10px;
}

.ride-document table.ride-grid {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 8px;
}

.ride-document table.ride-grid td,
.ride-document table.ride-grid th {
    border: 1px solid #333;
    padding: 4px 6px;
    vertical-align: top;
}

.ride-document table.ride-grid th {
    background: #f0f0f0;
    font-weight: bold;
    text-align: center;
    font-size: 10px;
}

.ride-document .ride-label {
    font-weight: bold;
    font-size: 10px;
    color: #333;
}

.ride-document .ride-clave {
    font-family: Consolas, "Courier New", monospace;
    font-size: 9px;
    word-break: break-all;
    line-height: 1.35;
}

.ride-document .ride-totals td {
    text-align: right;
}

.ride-document .ride-totals .ride-label {
    text-align: left;
}

.ride-document .ride-total-final {
    font-weight: bold;
    font-size: 12px;
}

.ride-document .ride-footer {
    margin-top: 10px;
    font-size: 9px;
    color: #444;
    text-align: center;
}

.ride-preview-mini {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 108px;
    padding: 0;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.08);
    transition: box-shadow 0.15s ease, border-color 0.15s ease;
}

.ride-preview-mini:hover {
    border-color: #245563;
    box-shadow: 0 2px 8px rgba(16, 110, 120, 0.2);
}

.ride-preview-mini-frame {
    height: 118px;
    overflow: hidden;
    border-radius: 7px 7px 0 0;
    background: #fff;
}

.ride-preview-mini:not(.ride-preview-panel) .ride-preview-mini-scale {
    transform: scale(0.13);
    transform-origin: top left;
    width: 820px;
    pointer-events: none;
}

.ride-preview-mini-scale .ride-document {
    margin: 0;
}

.ride-preview-mini-label {
    display: block;
    text-align: center;
    font-size: 0.62rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    color: #245563;
    padding: 0.2rem 0.25rem 0.35rem;
    background: #f8fafc;
    border-top: 1px solid #e2e8f0;
    border-radius: 0 0 7px 7px;
}

.aprobacion-revisar-page {
    max-width: 100%;
    overflow-x: hidden;
}

.aprobacion-revisar-grid {
    max-width: 100%;
    overflow-x: hidden;
}

.aprobacion-revisar-form {
    min-width: 0;
}

.aprobacion-ride-column {
    align-self: flex-start;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
}

.aprobacion-ride-panel {
    max-width: 100%;
    overflow: hidden;
}

.aprobacion-ride-panel .ride-preview-panel-btn {
    width: 100%;
    max-width: 100%;
}

@media (min-width: 1280px) {
    .aprobacion-ride-panel {
        position: sticky;
        top: 5rem;
    }
}

/* Panel lateral aprobacion: RIDE a ancho completo (sin scale/zoom) */
.ride-preview-panel-btn {
    display: block;
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    cursor: pointer;
    font: inherit;
    color: inherit;
    text-align: inherit;
    appearance: none;
    -webkit-appearance: none;
}

.ride-preview-panel-btn:hover .ride-preview-panel-viewport {
    border-color: #245563;
    box-shadow: 0 2px 8px rgba(16, 110, 120, 0.15);
}

.ride-preview-panel-viewport {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    max-width: 100%;
    height: min(48vh, 420px);
    min-height: 300px;
    overflow: hidden;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    box-sizing: border-box;
}

.ride-preview-panel-doc {
    flex: 1 1 auto;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

.ride-preview-panel-fit {
    width: 118%;
    transform: scale(0.85);
    transform-origin: top left;
}

.ride-document-compact {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 3px 4px !important;
    font-size: 4.5px !important;
    line-height: 1.15 !important;
    border: 1px solid #333;
    box-sizing: border-box;
    overflow: hidden;
}

.ride-document-compact table.ride-grid {
    width: 100% !important;
    table-layout: fixed;
}

.ride-document-compact table.ride-grid th,
.ride-document-compact table.ride-grid td {
    padding: 1px 2px !important;
    font-size: 4.5px !important;
    word-break: break-word;
    overflow-wrap: anywhere;
}

.ride-document-compact table.ride-grid th {
    font-size: 4px !important;
}

.ride-document-compact .ride-title {
    font-size: 7.5px !important;
    margin: 1px 0 0;
}

.ride-document-compact .ride-subtitle {
    font-size: 5.5px !important;
    margin-bottom: 3px;
}

.ride-document-compact .ride-label {
    font-size: 4px !important;
}

.ride-document-compact .ride-clave {
    font-size: 3.8px !important;
    line-height: 1.1;
    word-break: break-all;
}

.ride-document-compact .ride-linea-desc {
    word-break: break-word;
    overflow-wrap: anywhere;
}

.ride-document-compact .ride-total-final {
    font-size: 5px !important;
}

.ride-document-compact table.ride-totals,
.ride-document-compact table.ride-totals-compact {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
}

.ride-document-compact b {
    font-size: inherit;
    font-weight: 600;
}

.ride-preview-panel-hint {
    display: block;
    flex: 0 0 auto;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    white-space: nowrap;
    font-size: 0.65rem;
    font-weight: 600;
    color: #245563;
    padding: 0.5rem 0.5rem 0.55rem;
    text-decoration: underline;
    text-underline-offset: 2px;
    border-top: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 0 0 7px 7px;
}

.ride-preview-panel-btn:hover .ride-preview-panel-hint {
    color: #1B3F4A;
    background: #f0fdfa;
}

@media print {
    body * {
        visibility: hidden;
    }

    .ride-print-root,
    .ride-print-root * {
        visibility: visible;
    }

    .ride-print-root {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    .no-print {
        display: none !important;
    }

    .ride-document {
        border: none;
        max-width: 100%;
    }
}

