/* ==========================================================================
   YPSOTEC - TERMINÁL (TERMINAL.CSS)
   Verze: 1.0
   Popis: Styly specifické pouze pro výrobní terminál
   ========================================================================== */

/* ========================================
   1. BAREVNÉ ŘÁDKY V PROTOKOLU
   ======================================== */
#protocol-table tbody tr.row-vyroba {
    background-color: rgba(40, 167, 69, 0.15) !important;
    border-left: 4px solid #28a745 !important;
}

#protocol-table tbody tr.row-vyroba td:first-child {
    color: #28a745 !important;
    font-weight: 700 !important;
}

#protocol-table tbody tr.row-serizeni {
    background-color: rgba(255, 193, 7, 0.15) !important;
    border-left: 4px solid #ffc107 !important;
}

#protocol-table tbody tr.row-serizeni td:first-child {
    color: #d39e00 !important;
    font-weight: 700 !important;
}

#protocol-table tbody tr.row-povoleni {
    background-color: rgba(23, 162, 184, 0.15) !important;
    border-left: 4px solid #17a2b8 !important;
}

#protocol-table tbody tr.row-povoleni td:first-child {
    color: #17a2b8 !important;
    font-weight: 700 !important;
}

#protocol-table tbody tr.row-porucha {
    background-color: rgba(220, 53, 69, 0.15) !important;
    border-left: 4px solid #dc3545 !important;
}

#protocol-table tbody tr.row-porucha td:first-child {
    color: #dc3545 !important;
    font-weight: 700 !important;
}

#protocol-table tbody tr.row-konec,
#protocol-table tbody tr.row-ukonceni {
    background-color: rgba(108, 117, 125, 0.15) !important;
    border-left: 4px solid #6c757d !important;
}

#protocol-table tbody tr.row-konec td:first-child,
#protocol-table tbody tr.row-ukonceni td:first-child {
    color: #6c757d !important;
    font-weight: 700 !important;
}

#protocol-table tbody tr:hover {
    background-color: rgba(0, 90, 156, 0.08) !important;
}

/* ========================================
   2. SOUHRN KUSŮ
   ======================================== */
.summary {
    display: flex;
    justify-content: space-between;
    margin-top: 1.5rem;
    padding: 1rem;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.sum-ok,
.sum-nok {
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sum-ok {
    color: var(--success-color);
}

.sum-nok {
    color: var(--error-color);
}

.sum-ok span,
.sum-nok span {
    font-size: 1.5rem;
}

/* ========================================
   3. MOBILNÍ STEPPER PRO ČÍSLA - UNIFIKOVANÝ DESIGN
   ======================================== */

/* Základní stepper pro desktop I mobil */
.input-stepper {
    display: flex;
    align-items: stretch;
    width: 100%;
    gap: 0;
}

.input-stepper button {
    flex: 0 0 50px;
    border-radius: 4px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #004a84 100%);
    color: white;
    border: none;
    cursor: pointer;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    user-select: none;
    -webkit-tap-highlight-color: transparent;
}

.input-stepper button:hover {
    background: linear-gradient(135deg, #004a84 0%, #003366 100%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

.input-stepper button:active {
    transform: scale(0.95);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}

.input-stepper button:first-child {
    border-radius: 6px 0 0 6px;
}

.input-stepper button:last-child {
    border-radius: 0 6px 6px 0;
}

.input-stepper input {
    flex: 1;
    text-align: center;
    font-weight: 700;
    font-size: 1.1rem;
    border-radius: 0;
    border-left: none;
    border-right: none;
    min-width: 60px;
}

/* ✅ NOVÁ SEKCE - Protokol stepper (počet destiček) */
.pocet-group .input-stepper {
    max-width: 250px;
}

.pocet-group .input-stepper button {
    flex: 0 0 45px;
}

.pocet-group .input-stepper input {
    min-width: 80px;
    font-size: 1.2rem;
}
/* Mobilní zařízení - větší stepper */
.mobile-device .mobile-stepper {
    display: flex;
    align-items: stretch;
    width: 100%;
    gap: 0;
}

.mobile-device .mobile-stepper input {
    flex: 1;
    text-align: center;
    font-size: 1.3rem;
    font-weight: 700;
    border-radius: 0;
    border-left: none;
    border-right: none;
}

.mobile-device .mobile-stepper-btn {
    flex: 0 0 70px;
    background: linear-gradient(135deg, var(--primary-color) 0%, #004a84 100%);
    color: white;
    border: none;
    font-size: 1.8rem;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.mobile-device .mobile-stepper-btn:active {
    transform: scale(0.95);
    background: linear-gradient(135deg, #003366 0%, #002244 100%);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.mobile-device .mobile-stepper-btn.minus {
    border-radius: 6px 0 0 6px;
}

.mobile-device .mobile-stepper-btn.plus {
    border-radius: 0 6px 6px 0;
}

/* ========================================
   4. UNITY KONTEJNER
   ======================================== */
.unity-container {
    margin: 20px auto;
    max-width: 1200px;
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
}

#unity-canvas {
    width: 100%;
    min-height: 50vh;
    background: #231F20;
    border-radius: 4px;
    display: block;
}

#unity-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(35, 31, 32, 0.95);
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
}

.unity-start-btn {
    background: #1976d2;
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.unity-start-btn:hover {
    background: #1565c0;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transform: translateY(-2px);
}

.close-unity-btn {
    background: #f44336;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.close-unity-btn:hover {
    background: #d32f2f;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    transform: translateY(-1px);
}

/* ========================================
   5. MOBILNÍ OPTIMALIZACE
   ======================================== */
.mobile-device input,
.mobile-device select,
.mobile-device textarea {
    font-size: 16px !important;
}

.mobile-device .submit-button {
    font-size: 1.2rem;
    padding: 1rem;
    min-height: 60px;
    touch-action: manipulation;
}

.mobile-device .button {
    min-height: 44px;
    min-width: 44px;
}

.mobile-device input[inputmode="numeric"] {
    -moz-appearance: textfield;
    appearance: textfield;
}

.mobile-device input[inputmode="numeric"]::-webkit-outer-spin-button,
.mobile-device input[inputmode="numeric"]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* ========================================
   6. RESPONZIVITA - TABLET
   ======================================== */
@media (min-width: 769px) and (max-width: 1024px) {
    .mobile-stepper-btn {
        flex: 0 0 70px;
    }
}

/* ========================================
   7. RESPONZIVITA - MOBILNÍ LANDSCAPE
   ======================================== */
@media (max-width: 768px) and (orientation: landscape) {
    .table-container {
        max-height: 40vh;
    }
}

body.terminal-page .nav-panel {
    min-height: 100vh;  /* Menu pokračuje dolů ✅ */
    height: 100%;
}

