/**
 * Estilos para información de vehículo
 * Usado en shortcodes de vehículo y resultados
 */

/* Contenedor principal de resultados de vehículo */
.pc-vehicle-results {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin: 20px 0;
    border-left: 4px solid #3498db;
}

.pc-vehicle-results h3 {
    margin: 0 0 20px 0;
    color: #333;
    font-size: 22px;
    font-weight: bold;
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.pc-vehicle-results h3:before {
    content: "🚗";
    font-size: 24px;
}

/* Grid de información del vehículo */
.vehicle-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 15px;
}

.vehicle-info p {
    margin: 0;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border-left: 4px solid #3498db;
    transition: background 0.3s, transform 0.2s;
}

.vehicle-info p:hover {
    background: #e3f2fd;
    transform: translateX(5px);
}

.vehicle-info strong {
    color: #2c3e50;
    font-weight: 600;
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.vehicle-info span {
    color: #34495e;
    font-size: 16px;
    font-weight: 500;
}

/* Campos específicos con colores */
.vehicle-info .field-patente {
    border-left-color: #e74c3c;
}

.vehicle-info .field-patente:hover {
    background: #ffebee;
}

.vehicle-info .field-motor {
    border-left-color: #f39c12;
}

.vehicle-info .field-motor:hover {
    background: #fff8e1;
}

.vehicle-info .field-vin {
    border-left-color: #9b59b6;
}

.vehicle-info .field-vin:hover {
    background: #f3e5f5;
}

.vehicle-info .field-marca {
    border-left-color: #27ae60;
}

.vehicle-info .field-marca:hover {
    background: #e8f5e8;
}

/* Información compacta de vehículo */
.vehicle-info-compact {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.vehicle-info-compact .info-item {
    background: #fff;
    padding: 8px 12px;
    border-radius: 4px;
    border: 1px solid #dee2e6;
    font-size: 14px;
}

.vehicle-info-compact .info-item strong {
    color: #495057;
    margin-right: 5px;
}

/* Shortcodes individuales de vehículo */
.pc-vehicle-field {
    display: inline-block;
    padding: 8px 16px;
    background: #ffffff;
    border-radius: 8px;
    border: 2px solid #e9ecef;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-weight: 600;
    color: #495057;
    font-size: 14px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05);
}

.pc-vehicle-field.loading {
    background: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
    animation: pulse 1.5s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Estados especiales */
.vehicle-field-patente {
    background: linear-gradient(135deg, #1B49C2 0%, #3C7EFF 100%);
    border-color: #1B49C2;
    color: #ffffff;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 12px 20px;
    box-shadow: 0 4px 15px rgba(27, 73, 194, 0.3);
    position: relative;
    overflow: hidden;
}

.vehicle-field-patente:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(27, 73, 194, 0.4);
}

.vehicle-field-patente:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.vehicle-field-patente:hover:before {
    left: 100%;
}

.vehicle-field-motor,
.vehicle-field-numero_motor {
    background: linear-gradient(135deg, #DB760E 0%, #b8610b 100%);
    border-color: #DB760E;
    color: #ffffff;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(219, 118, 14, 0.3);
}

.vehicle-field-motor:hover,
.vehicle-field-numero_motor:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(219, 118, 14, 0.4);
}

.vehicle-field-vin {
    background: linear-gradient(135deg, #DB760E 0%, #b8610b 100%);
    border-color: #DB760E;
    color: #ffffff;
    font-family: 'Courier New', monospace;
    font-size: 12px;
    font-weight: 600;
    box-shadow: 0 3px 10px rgba(219, 118, 14, 0.3);
}

.vehicle-field-vin:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(219, 118, 14, 0.4);
}

/* Estilos para otros campos */
.vehicle-field-tipo,
.vehicle-field-categoria {
    background: linear-gradient(135deg, #1B49C2 0%, #3C7EFF 100%);
    border-color: #1B49C2;
    color: #ffffff;
    font-weight: 600;
    text-transform: uppercase;
    box-shadow: 0 3px 10px rgba(27, 73, 194, 0.3);
}

.vehicle-field-tipo:hover,
.vehicle-field-categoria:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(27, 73, 194, 0.4);
}

.vehicle-field-marca,
.vehicle-field-modelo,
.vehicle-field-anio,
.vehicle-field-comuna {
    background: #ffffff;
    border-color: #3C7EFF;
    color: #1B49C2;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(60, 126, 255, 0.2);
}

.vehicle-field-marca:hover,
.vehicle-field-modelo:hover,
.vehicle-field-anio:hover,
.vehicle-field-comuna:hover {
    background: #f0f4ff;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(60, 126, 255, 0.3);
}

/* ===== ICONOS DE VEHÍCULO ===== */
.pc-vehicle-icon {
    display: inline-block;
    transition: all 0.3s ease;
    border-radius: 8px;
    object-fit: contain;
}

.pc-vehicle-icon-small {
    width: 48px;  /* Era 32px - AGRANDADO */
    height: 48px;
}

.pc-vehicle-icon-medium {
    width: 72px;  /* Era 48px - AGRANDADO BASTANTE */
    height: 72px;
}

.pc-vehicle-icon-large {
    width: 96px;  /* Era 64px - AGRANDADO BASTANTE */
    height: 96px;
}

.pc-vehicle-icon:hover {
    transform: scale(1.1);
    filter: brightness(1.1);
}

/* Emoji fallback */
.pc-vehicle-icon-emoji {
    display: inline-block;
    transition: all 0.3s ease;
    filter: grayscale(0.2);
}

.pc-vehicle-icon-emoji:hover {
    transform: scale(1.1);
    filter: grayscale(0);
}

/* ===== CAMPOS HISTÓRICOS ===== */
.vehicle-field-historical {
    font-size: 16px;
    font-weight: 700;
    padding: 12px 20px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.15);
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.vehicle-field-historical:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
}

/* Estados específicos para campos históricos */
.vehicle-field-valor_permiso.success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: #ffffff;
    border-color: #27ae60;
}

.vehicle-field-valor_permiso.success:hover {
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

.vehicle-field-multas.success {
    background: linear-gradient(135deg, #27ae60 0%, #2ecc71 100%);
    color: #ffffff;
    border-color: #27ae60;
}

.vehicle-field-multas.success:hover {
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.4);
}

.vehicle-field-multas.warning {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    color: #ffffff;
    border-color: #e74c3c;
    animation: pulse-warning 2s infinite;
}

.vehicle-field-multas.warning:hover {
    box-shadow: 0 5px 15px rgba(231, 76, 60, 0.4);
}

@keyframes pulse-warning {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.8; }
}

/* ===== RESPONSIVE PARA SHORTCODES HISTÓRICOS (MISMO QUE pc-vehicle-field-uniform) ===== */
@media (max-width: 768px) {
    .pc-historical-value {
        width: 180px; /* MISMO ANCHO que pc-vehicle-field-uniform en tablet */
        font-size: 13px;
        padding: 6px 12px;
    }

    /* ICONOS EN TABLET - TAMAÑO INTERMEDIO */
    .pc-vehicle-icon-small {
        width: 40px;  /* Un poco más pequeño que PC */
        height: 40px;
    }

    .pc-vehicle-icon-medium {
        width: 60px;  /* Un poco más pequeño que PC */
        height: 60px;
    }

    .pc-vehicle-icon-large {
        width: 80px;  /* Un poco más pequeño que PC */
        height: 80px;
    }
}

@media (max-width: 480px) {
    .pc-historical-value {
        width: 150px; /* MISMO ANCHO que pc-vehicle-field-uniform en móvil */
        font-size: 12px;
        padding: 5px 10px;
    }

    /* ICONOS EN MÓVIL - SOLO UN POCO MÁS GRANDES QUE ANTES */
    .pc-vehicle-icon-small {
        width: 36px;  /* Era 32px - Solo un poco más grande */
        height: 36px;
    }

    .pc-vehicle-icon-medium {
        width: 52px;  /* Era 48px - Solo un poco más grande */
        height: 52px;
    }

    .pc-vehicle-icon-large {
        width: 68px;  /* Era 64px - Solo un poco más grande */
        height: 68px;
    }
}

.vehicle-field-revision_tecnica.info {
    background: linear-gradient(135deg, #1B49C2 0%, #3C7EFF 100%);
    color: #ffffff;
    border-color: #1B49C2;
}

.vehicle-field-revision_tecnica.info:hover {
    box-shadow: 0 5px 15px rgba(27, 73, 194, 0.4);
}

/* Estados comunes */
.vehicle-field-historical.loading {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: #ffffff;
    border-color: #f39c12;
    animation: pulse 1.5s infinite;
}

.vehicle-field-historical.unavailable {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
    color: #ffffff;
    border-color: #95a5a6;
}

/* Responsive Design */
@media (max-width: 768px) {
    .pc-vehicle-results {
        padding: 20px 15px;
        margin: 15px 0;
    }

    .pc-vehicle-results h3 {
        font-size: 20px;
    }

    .vehicle-info {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .vehicle-info p {
        padding: 12px;
    }

    .vehicle-info-compact {
        flex-direction: column;
        align-items: stretch;
    }

    .vehicle-info-compact .info-item {
        text-align: center;
    }

    .vehicle-field-historical {
        font-size: 14px;
        padding: 10px 16px;
        justify-content: center;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .pc-vehicle-results {
        padding: 15px 10px;
        border-radius: 6px;
    }
    
    .pc-vehicle-results h3 {
        font-size: 18px;
        flex-direction: column;
        text-align: center;
    }
    
    .vehicle-info p {
        padding: 10px;
        text-align: center;
    }
    
    .vehicle-field-patente {
        font-size: 16px;
        padding: 8px 12px;
    }
}

/* ===== NUEVOS ESTILOS PARA TARJETAS HISTÓRICAS (ESTILO PROFESIONAL) ===== */

.pc-historical-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px;
    border-radius: 12px;
    transition: all 0.3s ease;
    min-height: 120px;
    max-width: 280px;
    margin: 10px auto;
}

.pc-historical-card:hover {
    transform: translateY(-2px);
}

.pc-historical-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 12px;
    line-height: 1.3;
    text-transform: none;
    letter-spacing: 0;
}

.pc-historical-value {
    display: inline-block;
    width: 200px; /* MISMO ANCHO que pc-vehicle-field-uniform */
    padding: 8px 16px;
    border-radius: 20px; /* MISMO BORDER-RADIUS que pc-vehicle-field-uniform */
    font-weight: 600;
    text-align: center; /* CENTRADO como pc-vehicle-field-uniform */
    font-size: 14px; /* MISMO TAMAÑO que pc-vehicle-field-uniform */
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: #ffffff;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease; /* TRANSICIÓN PARA HOVER */
    cursor: pointer; /* CURSOR POINTER COMO LOS DEMÁS */
}

/* HOVER EFFECT COMO LOS DEMÁS SHORTCODES */
.pc-historical-value:hover {
    transform: translateY(-1px);
    filter: brightness(1.1);
}

/* Colores específicos basados en tu imagen - APLICADOS DIRECTAMENTE */
.pc-historical-green {
    background: linear-gradient(135deg, #28a745 0%, #20c997 100%);
    border: 1px solid #28a745;
}

.pc-historical-blue {
    background: linear-gradient(135deg, #007bff 0%, #0056b3 100%);
    border: 1px solid #007bff;
}

.pc-historical-default {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border: 1px solid #6c757d;
}

/* Estados especiales - APLICADOS DIRECTAMENTE */
.pc-historical-loading {
    background: linear-gradient(135deg, #ffc107 0%, #fd7e14 100%);
    border: 1px solid #ffc107;
    animation: pulse 1.5s infinite;
}

.pc-historical-warning {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    border: 1px solid #dc3545;
    animation: pulse-warning 2s infinite;
}

.pc-historical-unavailable {
    background: linear-gradient(135deg, #6c757d 0%, #495057 100%);
    border: 1px solid #6c757d;
    opacity: 0.7;
}

/* Responsive para tarjetas históricas */
@media (max-width: 768px) {
    .pc-historical-card {
        max-width: 100%;
        margin: 10px 0;
        padding: 15px;
        min-height: 100px;
    }

    .pc-historical-title {
        font-size: 13px;
        margin-bottom: 10px;
    }

    .pc-historical-value {
        font-size: 14px;
        padding: 8px 16px;
        min-width: 150px;
    }
}

@media (max-width: 480px) {
    .pc-historical-card {
        padding: 12px;
        min-height: 90px;
    }

    .pc-historical-title {
        font-size: 12px;
        margin-bottom: 8px;
    }

    .pc-historical-value {
        font-size: 13px;
        padding: 6px 12px;
        min-width: 120px;
    }
}
