/* SkyDropX Cotizador de Envíos - Estilos CSS v2.0 */

.skydropx-container {
    max-width: 1000px;
    margin: auto;
    background-color: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    box-sizing: border-box;
    height: auto;
    overflow: visible;
    padding-bottom: 30px;
    font-family: Arial, sans-serif;
}

.skydropx-container h2 {
    color: #333;
    margin-bottom: 20px;
    font-size: 1.8rem;
}

.skydropx-form-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    margin-bottom: 20px;
    align-items: flex-start;
}

.skydropx-input-group {
    display: flex;
    flex-direction: column;
    min-width: 10px;
}

.skydropx-input-group label {
    font-weight: bold;
    margin-bottom: 5px;
    font-size: 14px;
    color: #333;
}

.skydropx-input-group input,
.skydropx-input-group select {
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

/* Estilo específico para inputs de origen y destino */
#skydropx-origen,
#skydropx-destino {
    width: 250px;
}

/* Estilos para autocompletado */
.skydropx-autocomplete-wrapper {
    position: relative;
    width: 250px;
}

.skydropx-suggestions-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ccc;
    border-top: none;
    border-radius: 0 0 8px 8px;
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.skydropx-suggestion-item {
    padding: 10px 12px;
    cursor: pointer;
    border-bottom: 1px solid #f0f0f0;
    transition: background-color 0.2s ease;
    font-size: 14px;
}

.skydropx-suggestion-item:hover {
    background-color: #f8f9fa;
}

.skydropx-suggestion-item:last-child {
    border-bottom: none;
}

.skydropx-suggestion-item.selected {
    background-color: #5233ea;
    color: white;
}

.skydropx-loading-suggestions {
    padding: 10px 12px;
    text-align: center;
    color: #666;
    font-style: italic;
}

/* Estilo para inputs de dimensiones y peso */
#skydropx-peso,
#skydropx-largo,
#skydropx-ancho,
#skydropx-alto {
    width: 80px;
}

/* Estilo para input con sufijo (Kg) */
.skydropx-input-with-suffix {
    position: relative;
    display: inline-block;
    width: 80px;
}

.skydropx-input-with-suffix input {
    width: 100%;
    padding: 8px 25px 8px 8px;
    border: 1px solid #ccc;
    border-radius: 6px;
    font-size: 14px;
}

.skydropx-input-suffix {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    font-size: 14px;
    pointer-events: none;
    z-index: 1;
}

.skydropx-input-with-suffix input:focus + .skydropx-input-suffix {
    color: #999;
}

.skydropx-btn-primary {
    margin-top: 15px;
    background: #5233ea;
    color: #fff;
    padding: 10px 20px;
    border: none;
    cursor: pointer;
    border-radius: 5px;
    display: block;
    width: auto;
    margin-left: auto;
    margin-right: 0;
    font-size: 16px;
    transition: background-color 0.3s ease;
}

.skydropx-btn-primary:hover {
    background: #4029c7;
}

.skydropx-resultado {
    margin-top: 20px;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
}

/* Media queries para dispositivos móviles */
@media (max-width: 768px) {
    .skydropx-container {
        margin: 10px;
        padding: 15px;
        border-radius: 8px;
        width: calc(100% - 20px);
        max-width: none;
    }

    .skydropx-resultado {
        margin: 20px 10px 10px 10px;
        padding: 15px;
        width: calc(100% - 20px);
        max-width: none;
    }

    .skydropx-form-grid {
        flex-direction: column;
        gap: 10px;
        width: 100%;
    }

    .skydropx-input-group {
        width: 100%;
        min-width: unset;
    }

    #skydropx-origen,
    #skydropx-destino {
        width: 100%;
    }

    .skydropx-autocomplete-wrapper {
        width: 100%;
    }

    .skydropx-input-with-suffix {
        width: 100%;
        max-width: 120px;
    }

    #skydropx-peso,
    #skydropx-largo,
    #skydropx-ancho,
    #skydropx-alto {
        width: 100%;
    }

    .skydropx-container h2 {
        font-size: 1.5rem;
        text-align: center;
        margin-bottom: 20px;
    }
}

@media (max-width: 480px) {
    .skydropx-container {
        margin: 5px;
        padding: 10px;
        width: calc(100% - 10px);
        max-width: none;
    }

    .skydropx-resultado {
        margin: 20px 5px 5px 5px;
        padding: 10px;
        width: calc(100% - 10px);
    }

    .skydropx-form-grid {
        gap: 8px;
    }

    .skydropx-input-with-suffix {
        width: 100%;
        max-width: none;
    }

    #skydropx-peso,
    #skydropx-largo,
    #skydropx-ancho,
    #skydropx-alto {
        width: 100%;
    }

    .skydropx-container h2 {
        font-size: 1.3rem;
        margin-bottom: 15px;
    }

    .skydropx-btn-primary {
        width: 100%;
        margin-left: 0;
        margin-right: 0;
    }
}

/* Animación para la barra de progreso */
@keyframes skydropx-pulse {
    0% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
    100% {
        opacity: 1;
    }
}

/* Estilos para resultados de cotización */
.skydropx-resultado h3 {
    color: #5233ea;
    margin-bottom: 25px;
}

.skydropx-cotizacion-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 10px;
    background: #ffffff;
    transition: transform 0.2s ease;
}

.skydropx-cotizacion-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.skydropx-cotizacion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.skydropx-carrier-info {
    display: flex;
    align-items: center;
}

.skydropx-carrier-logo {
    width: 80px;
    height: 40px;
    object-fit: contain;
    margin-right: 10px;
}

.skydropx-carrier-name {
    color: #333;
    margin: 0;
    font-size: 1.1rem;
}

.skydropx-price-button {
    background: #5233ea;
    color: white;
    padding: 8px 15px;
    border-radius: 5px;
    font-weight: bold;
    text-decoration: none;
    display: inline-block;
    transition: background-color 0.3s ease;
}

.skydropx-price-button:hover {
    background: #4029c7;
    color: white;
    text-decoration: none;
}

.skydropx-cotizacion-details {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    font-size: 14px;
    color: #666;
}

.skydropx-loading-bar {
    width: 100%;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    height: 20px;
    margin: 15px 0;
}

.skydropx-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, #5233ea, #7c3aed);
    border-radius: 10px;
    transition: width 0.3s ease;
    animation: skydropx-pulse 2s infinite;
}

.skydropx-loading-text {
    text-align: center;
    margin: 10px 0;
    color: #666;
}

.skydropx-error-message {
    color: #dc3545;
    background-color: #f8d7da;
    border: 1px solid #f5c6cb;
    border-radius: 5px;
    padding: 12px;
    margin: 10px 0;
}

.skydropx-warning-message {
    color: #856404;
    background-color: #fff3cd;
    border: 1px solid #ffeaa7;
    border-radius: 5px;
    padding: 12px;
    margin: 10px 0;
}

.skydropx-success-message {
    color: #155724;
    background-color: #d4edda;
    border: 1px solid #c3e6cb;
    border-radius: 5px;
    padding: 12px;
    margin: 10px 0;
}
