/* Public Styles for Producción Órdenes Plugin */

/* Main Wrapper */
.po-consulta-wrapper {
    max-width: 900px;
    margin: 40px auto;
    padding: 0 20px;
}

.po-consulta-header {
    text-align: center;
    margin-bottom: 30px;
}

.po-consulta-header h2 {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 10px;
}

/* Mensaje de Error */
.po-message-container {
    margin-bottom: 20px;
}

.po-error-message {
    background: #fee;
    border-left: 4px solid #dc3232;
    padding: 15px 20px;
    border-radius: 8px;
    animation: slideDown 0.3s ease;
}

.po-error-message p {
    margin: 0;
    color: #b32d2e;
    font-weight: 600;
}

.po-success-message {
    background: #efe;
    border-left: 4px solid #46b450;
    padding: 15px 20px;
    border-radius: 8px;
    animation: slideDown 0.3s ease;
}

.po-success-message p {
    margin: 0;
    color: #32873d;
    font-weight: 600;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Formulario de Consulta */
.po-consulta-form {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    margin-bottom: 30px;
    display: flex;
    gap: 15px;
    align-items: flex-end;
}

.po-form-group {
    flex: 1;
}

.po-form-group label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #2c3e50;
    font-size: 14px;
}

.po-input-nit {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.po-input-nit:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.po-btn-consultar {
    padding: 12px 32px;
    background: linear-gradient(135deg, #7CB46D 0%, #517F7F 100%);
    color: #FFF;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(150, 190, 153, 0.3);
    position: relative;
    min-width: 140px;
}

.po-btn-consultar:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(150, 190, 153, 0.3);
}

.po-btn-consultar:active:not(:disabled) {
    transform: translateY(0);
}

.po-btn-consultar:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.po-btn-loading {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.po-btn-loading::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #fff;
    border-top-color: transparent;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Sin Resultados */
.po-no-resultados {
    text-align: center;
    padding: 60px 20px;
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.po-no-resultados-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    color: #95a5a6;
}

.po-no-resultados-icon svg {
    width: 100%;
    height: 100%;
}

.po-no-resultados h3 {
    font-size: 24px;
    color: #2c3e50;
    margin-bottom: 10px;
}

.po-no-resultados p {
    font-size: 16px;
    color: #7f8c8d;
    line-height: 1.6;
}

/* Resultados */
.po-resultados {
    margin-top: 30px;
}

.po-resultados>h3 {
    font-size: 20px;
    color: #2c3e50;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #3498db;
}

/* Orden Card */
.po-orden-card {
    background: #fff;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.po-orden-card:hover {
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
}

.po-orden-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ecf0f1;
}

.po-orden-numero,
.po-orden-compra {
    font-size: 16px;
    color: #2c3e50;
}

.po-orden-numero strong,
.po-orden-compra strong {
    color: #7f8c8d;
    font-weight: 600;
}

/* Barra de Progreso */
.po-progreso-wrapper {
    margin: 30px 0;
}

.po-progreso-label {
    font-size: 14px;
    font-weight: 600;
    color: #7f8c8d;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.po-progress-bar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    position: relative;
    margin-bottom: 20px;
}

.po-progress-step {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
}

.po-step-circle {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #ecf0f1;
    color: #95a5a6;
    font-weight: 600;
    font-size: 14px;
    position: relative;
    z-index: 2;
    transition: all 0.3s ease;
}

.po-progress-step.completed .po-step-circle {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.po-progress-step.current .po-step-circle {
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
    animation: pulse 2s infinite;
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.2);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(102, 126, 234, 0.1);
    }
}

.po-step-circle svg {
    width: 20px;
    height: 20px;
}

.po-step-label {
    margin-top: 10px;
    font-size: 11px;
    text-align: center;
    color: #95a5a6;
    line-height: 1.3;
    max-width: 100px;
}

.po-progress-step.completed .po-step-label {
    color: #667eea;
    font-weight: 600;
}

.po-progress-step.current .po-step-label {
    color: #2c3e50;
    font-weight: 700;
}

.po-step-line {
    position: absolute;
    top: 20px;
    left: 50%;
    width: 100%;
    height: 2px;
    background: #ecf0f1;
    z-index: 1;
}

.po-progress-step.completed .po-step-line {
    background: linear-gradient(90deg, #667eea 0%, #764ba2 100%);
}

.po-estado-actual {
    text-align: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 15px;
}

.po-estado-actual strong {
    color: #7f8c8d;
    margin-right: 10px;
}

.po-estado-badge {
    display: inline-block;
    padding: 6px 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 20px;
    font-weight: 600;
    font-size: 14px;
}

/* Información Adicional */
.po-orden-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 15px;
    margin-top: 25px;
}

.po-info-item {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #3498db;
}

.po-info-label {
    display: block;
    font-size: 12px;
    color: #7f8c8d;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.po-info-value {
    display: block;
    font-size: 16px;
    color: #2c3e50;
    font-weight: 600;
}

.po-info-value.po-highlight {
    color: #667eea;
    font-size: 18px;
}

/* Responsive */
@media screen and (max-width: 768px) {
    .po-consulta-form {
        flex-direction: column;
        align-items: stretch;
    }

    .po-btn-consultar {
        width: 100%;
    }

    .po-orden-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }

    .po-progress-bar {
        flex-wrap: wrap;
    }

    .po-progress-step {
        flex-basis: 33.333%;
        margin-bottom: 20px;
    }

    .po-step-line {
        display: none;
    }

    .po-orden-info {
        grid-template-columns: 1fr;
    }
}

@media screen and (max-width: 480px) {
    .po-consulta-header h2 {
        font-size: 24px;
    }

    .po-consulta-form {
        padding: 20px;
    }

    .po-orden-card {
        padding: 20px;
    }

    .po-step-label {
        font-size: 10px;
        max-width: 80px;
    }

    .po-step-circle {
        width: 32px;
        height: 32px;
        font-size: 12px;
    }
}