﻿/* wwwroot/css/kanban-cars.css */

/* ==========================================
   LAYOUT GERAL DO KANBAN
   ========================================== */
.ynex-kanban-board {
    display: flex;
    gap: 1rem;
    overflow-x: auto;
    padding: 0 0.5rem 1rem;
    min-height: 600px;
}

.kanban-tasks-type {
    min-width: 300px;
    max-width: 350px;
    flex-shrink: 0;   
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.kanban-tasks-scrollable {
    max-height: 600px;
    overflow-y: auto;
    padding-right: 0.5rem;
}

.kanban-tasks {
    min-height: 100px;
}

/* ==========================================
   CABEÇALHO DAS COLUNAS
   ========================================== */
.text-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: #495057;
}

    .text-badge .badge {
        font-size: 0.75rem;
        padding: 0.25rem 0.5rem;
    }

    .text-badge .text {
        font-size: 0.875rem;
        letter-spacing: 0.5px;
    }

/* ==========================================
   CARDS DOS CARROS
   ========================================== */
.kanban-tasks .card {
    margin-bottom: 1rem;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: move;
    
}

    .kanban-tasks .card:hover {
        transform: translateY(-2px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        border-color: #007bff;
    }

    .kanban-tasks .card.gu-mirror {
        transform: rotate(5deg);
        opacity: 0.8;
    }

.kanban-board-head {
    border-bottom: 1px solid #f1f3f4;
}

/* ==========================================
   NOVO LAYOUT DO CARRO
   ========================================== */
.car-layout-new {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    padding: 0.5rem 0;
}

.car-left-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    min-width: 80px;
}

.car-image-left-new {
    width: 70px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 6px;
    border: 1px solid #dee2e6;
}

.car-img-new {
    max-width: 60px;
    max-height: 40px;
    object-fit: contain;
    filter: drop-shadow(0 1px 3px rgba(0,0,0,0.1));
}

.car-info-new {
    flex: 1;
    min-width: 0;
}

    .car-info-new h6 {
        margin-bottom: 0.5rem;
        color: #2c3e50;
        font-size: 0.95rem;
        line-height: 1.3;
    }

.kanban-task-description {
    font-size: 0.8rem;
    line-height: 1.4;
    color: #6c757d;
}

    .kanban-task-description strong {
        color: #495057;
        font-weight: 600;
    }

/* ==========================================
   PLACA MERCOSUL
   ========================================== */
.placa-container-new {
    position: relative;
    display: inline-block;
    width: 65px;
    height: 32px;
}

.placa-fundo-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 3px;
}

.placa-numero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Courier New', monospace;
    font-weight: bold;
    font-size: 0.7rem;
    color: #1e3a8a;
    text-shadow: 0 1px 2px rgba(255,255,255,0.8);
    letter-spacing: 0.5px;
}

/* Versão maior para modal */
.placa-mercosul-large {
    width: 240px;
    height: 120px;
    margin: 1rem 0;
}

    .placa-mercosul-large .placa-numero-overlay {
        font-size: 2rem;
        letter-spacing: 3px;
    }

/* ==========================================
   BADGES E TAGS
   ========================================== */
.task-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

    .task-badges .badge {
        font-size: 0.7rem;
        padding: 0.2rem 0.4rem;
        font-weight: 500;
        border-radius: 4px;
    }

/* ==========================================
   ESTADOS DE DRAG AND DROP
   ========================================== */
.gu-mirror {
    position: fixed !important;
    margin: 0 !important;
    z-index: 9999 !important;
    opacity: 0.8;
    transform: rotate(3deg);
    box-shadow: 0 8px 24px rgba(0,0,0,0.2) !important;
}

.gu-hide {
    display: none !important;
}

.gu-unselectable {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

.gu-transit {
    opacity: 0.2;
    transform: scale(0.95);
}

/* ==========================================
   HOVER EFFECTS
   ========================================== */
.kanban-tasks-type:hover {
    background: #f1f3f4;
    transition: background-color 0.2s ease;
}

.kanban-tasks .card:active {
    transform: scale(0.98);
}

/* ==========================================
   RESPONSIVE
   ========================================== */
@media (max-width: 768px) {
    .ynex-kanban-board {
        flex-direction: column;
        gap: 1.5rem;
    }

    .kanban-tasks-type {
        min-width: 100%;
        max-width: 100%;
    }

    .car-layout-new {
        gap: 0.75rem;
    }

    .car-left-section {
        min-width: 70px;
    }

    .car-image-left-new {
        width: 60px;
        height: 45px;
    }

    .car-img-new {
        max-width: 50px;
        max-height: 35px;
    }

    .placa-container-new {
        width: 55px;
        height: 28px;
    }

    .placa-numero-overlay {
        font-size: 0.65rem;
    }
}

/* ==========================================
   ANIMAÇÕES
   ========================================== */
@keyframes cardSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.kanban-tasks .card {
    animation: cardSlideIn 0.3s ease-out;
}

@keyframes statusChange {
    0%, 100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.05);
    }
}

.kanban-tasks .card.status-changing {
    animation: statusChange 0.6s ease-in-out;
}

/* ==========================================
   CORES PERSONALIZADAS POR STATUS
   ========================================== */
.kanban-tasks-type[data-status-id="1"] {
    border-top: 4px solid #28a745;
}

.kanban-tasks-type[data-status-id="2"] {
    border-top: 4px solid #ffc107;
}

.kanban-tasks-type[data-status-id="3"] {
    border-top: 4px solid #dc3545;
}

.kanban-tasks-type[data-status-id="4"] {
    border-top: 4px solid #6c757d;
}

.kanban-tasks-type[data-status-id="5"] {
    border-top: 4px solid #17a2b8;
}

/* ==========================================
   SCROLLBAR PERSONALIZADA
   ========================================== */
.kanban-tasks-scrollable::-webkit-scrollbar {
    width: 6px;
}

.kanban-tasks-scrollable::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.kanban-tasks-scrollable::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

    .kanban-tasks-scrollable::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }

/* ==========================================
   ESTADOS DE LOADING
   ========================================== */
.kanban-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #6c757d;
}

.kanban-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 150px;
    color: #adb5bd;
    font-style: italic;
}

    .kanban-empty i {
        font-size: 2rem;
        margin-bottom: 0.5rem;
        opacity: 0.5;
    }

/* ==========================================
   MELHORIAS DE ACESSIBILIDADE
   ========================================== */
.kanban-tasks .card:focus {
    outline: 2px solid #007bff;
    outline-offset: 2px;
}

.kanban-tasks-type:focus-within {
    box-shadow: 0 0 0 2px rgba(0,123,255,0.25);
}

/* ==========================================
   UTILITÁRIOS
   ========================================== */
.drag-handle {
    cursor: grab;
}

    .drag-handle:active {
        cursor: grabbing;
    }

.no-drag {
    cursor: default !important;
}

.kanban-fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}
