/**
 * Estilos para la dirección del vendedor en el checkout
 */

/* Contenedor principal */
.dt24-direccion-tienda-container,
.dt24-pickup-address-container {
    margin-bottom: 10px;
    padding: 12px;
    border-radius: 4px;
    background-color: #f9f9f9;
    font-size: 14px;
    line-height: 1;
    transition: all 0.3s ease;
}

/* Título */
.dt24-pickup-address-container h4 {
    margin-top: 0;
    margin-bottom: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #333;
    border-bottom: 1px solid #e5e5e5;
    padding-bottom: 8px;
}

/* Dirección del vendedor */
.dt24-vendor-address {
    position: relative;
    padding-left: 25px;
    margin-bottom: 10px;
}

.dt24-vendor-address:before {
    content: "\f230"; /* Icono de ubicación de Dashicons */
    font-family: 'dashicons';
    position: absolute;
    left: 0;
    top: 0;
    color: #555;
}

/* Detalles adicionales del vendedor */
.dt24-vendor-details {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px dashed #e5e5e5;
}

.dt24-vendor-location {
    margin-bottom: 8px;
    font-style: italic;
    color: #555;
}

.dt24-vendor-reference,
.dt24-vendor-postal,
.dt24-vendor-type {
    margin-bottom: 5px;
    font-size: 13px;
}

.dt24-vendor-map-link {
    margin-top: 10px;
}

.dt24-vendor-map-link a {
    display: inline-block;
    background-color: #4285F4;
    color: white;
    padding: 6px 12px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 13px;
    transition: background-color 0.3s ease;
}

.dt24-vendor-map-link a:hover {
    background-color: #3367D6;
    text-decoration: none;
}

.dt24-vendor-map-link a:before {
    content: "\f231"; /* Icono de mapa de Dashicons */
    font-family: 'dashicons';
    margin-right: 5px;
    vertical-align: middle;
}

/* Mensaje de carga */
.dt24-loading-initial {
    color: #777;
    font-style: italic;
    padding-left: 25px;
    position: relative;
}

.dt24-loading-initial:before {
    content: "\f463"; /* Icono de carga de Dashicons */
    font-family: 'dashicons';
    position: absolute;
    left: 0;
    top: 0;
    animation: dt24-spin 2s infinite linear;
}

/* Mensaje de error */
.dt24-error {
    color: #d63638;
    padding-left: 25px;
    position: relative;
}

.dt24-error:before {
    content: "\f534"; /* Icono de error de Dashicons */
    font-family: 'dashicons';
    position: absolute;
    left: 0;
    top: 0;
}

/* Animación de giro */
@keyframes dt24-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Estilos responsivos */
@media screen and (max-width: 768px) {
    .dt24-direccion-tienda-container,
    .dt24-pickup-address-container {
        padding: 10px;
        font-size: 13px;
    }

    .dt24-pickup-address-container h4 {
        font-size: 15px;
    }

    .dt24-vendor-map-link a {
        display: block;
        text-align: center;
    }
}

.dt24-distance-green {
    color: green;
}

.dt24-distance-warning {
    color: orange;
}

.dt24-distance-red {
    color: red;
}


/**
 * Estilos para los indicadores de distancia y dirección del vendedor en el checkout
 *
 * Versión: 1.1.0 - Mejoras de visualización y compatibilidad
 */

.dt24-distance-info {
    margin-top: 10px;
    padding: 10px 15px;
    border-radius: 4px;
    font-size: 0.9em;
    display: flex;
    align-items: center;
    position: relative;
}

.dt24-distance-info::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 10px;
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

/* Indicador de distancia cercana (verde) */
.dt24-distance-close {
    background-color: #dff0d8;
    color: #3c763d;
    border: 1px solid #d6e9c6;
}

.dt24-distance-close::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-.997-4L6.76 11.757l1.414-1.414 2.829 2.829 5.656-5.657 1.415 1.414L11.003 16z" fill="%233c763d"/></svg>');
}

/* Indicador de distancia media (naranja) */
.dt24-distance-warning {
    background-color: #fcf8e3;
    color: #8a6d3b;
    border: 1px solid #faebcc;
}

.dt24-distance-warning::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-1-5h2v2h-2v-2zm0-8h2v6h-2V7z" fill="%238a6d3b"/></svg>');
}

/* Indicador de distancia lejana (rojo) */
.dt24-distance-far {
    background-color: #f2dede;
    color: #a94442;
    border: 1px solid #ebccd1;
}

.dt24-distance-far::before {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 22C6.477 22 2 17.523 2 12S6.477 2 12 2s10 4.477 10 10-4.477 10-10 10zm0-2a8 8 0 1 0 0-16 8 8 0 0 0 0 16zm-1-5h2v2h-2v-2zm0-8h2v6h-2V7z" fill="%23a94442"/></svg>');
}

/* Contenedor principal para pickup */
.dt24-pickup-container {
    margin: 10px 0;
    padding: 10px;
    border: 1px solid #e5e5e5;
    border-radius: 5px;
    background-color: #f9f9f9;
    clear: both;
    display: block;
    width: 100%;
    box-sizing: border-box;
    position: relative;
    z-index: 1;
}

/* Estilos para la dirección del vendedor */
.dt24-vendor-address {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px dashed #ddd;
}

.dt24-vendor-name {
    font-weight: bold;
    font-size: 1.1em;
    color: #333;
    margin-bottom: 5px;
}

.dt24-vendor-location {
    display: flex;
    align-items: flex-start;
    margin-bottom: 5px;
}

.dt24-location-icon {
    display: inline-block;
    width: 16px;
    height: 16px;
    margin-right: 10px;
    margin-top: 3px;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 20.9l4.95-4.95a7 7 0 1 0-9.9 0L12 20.9zm0 2.828l-6.364-6.364a9 9 0 1 1 12.728 0L12 23.728zM12 13a2 2 0 1 0 0-4 2 2 0 0 0 0 4zm0 2a4 4 0 1 1 0-8 4 4 0 0 1 0 8z" fill="%23555"/></svg>');
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;
}

.dt24-address-text {
    flex: 1;
    font-size: 0.95em;
    line-height: 1.4;
    color: #555;
}

/* Indicador de carga */
.dt24-loading {
    padding: 15px;
    text-align: center;
    color: #666;
    font-style: italic;
    background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="none" d="M0 0h24v24H0z"/><path d="M12 2a10 10 0 0 1 10 10 10 10 0 0 1-10 10 10 10 0 0 1-10-10 10 10 0 0 1 10-10zm0 2a8 8 0 0 0-8 8 8 8 0 0 0 8 8 8 8 0 0 0 8-8 8 8 0 0 0-8-8z" opacity=".3" fill="%23666"/><path d="M12 2a10 10 0 0 1 10 10 10 10 0 0 1-10 10 10 10 0 0 1-10-10 10 10 0 0 1 10-10zm0 2a8 8 0 0 0-8 8 8 8 0 0 0 8 8 8 8 0 0 0 8-8 8 8 0 0 0-8-8z" opacity=".3" fill="%23666"/><path d="M2 12a10 10 0 0 1 10-10v2a8 8 0 0 0-8 8H2z" fill="%23666"><animateTransform attributeName="transform" attributeType="XML" type="rotate" from="0 12 12" to="360 12 12" dur="1s" repeatCount="indefinite"/></path></svg>') no-repeat left center;
    background-size: 20px;
    padding-left: 30px;
}

/* Contenedor temporal */
.dt24-temp-container {
    border: 1px dashed #ddd;
    background-color: #f9f9f9;
}

/* Estilos para asegurar visibilidad */
.woocommerce-checkout .dt24-pickup-container {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Estilos para evitar conflictos con otros plugins */
.dt24-pickup-container * {
    box-sizing: border-box;
}

/* Estilos para mejorar la visualización en móviles */
@media (max-width: 480px) {
    .dt24-pickup-container {
        padding: 8px;
    }

    .dt24-vendor-name {
        font-size: 0.95em;
    }

    .dt24-address-text {
        font-size: 0.85em;
    }

    .dt24-distance-info {
        padding: 6px 10px;
        font-size: 0.8em;
    }
}

/* Estilos para mensajes de error */
.dt24-error {
    padding: 10px;
    color: #a94442;
    background-color: #f2dede;
    border: 1px solid #ebccd1;
    border-radius: 4px;
    margin: 5px 0;
    text-align: center;
}

/* Estilos para mensajes informativos */
.dt24-info {
    padding: 10px;
    color: #31708f;
    background-color: #d9edf7;
    border: 1px solid #bce8f1;
    border-radius: 4px;
    margin: 5px 0;
    text-align: center;
    font-style: italic;
}

/* Botón de recarga */
.dt24-reload-button {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 10px;
    background-color: #5bc0de;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 0.9em;
}

.dt24-reload-button:hover {
    background-color: #46b8da;
}

/* Contenedor de información */
.dt24-info-container {
    border: 1px dashed #bce8f1;
    background-color: #f9f9f9;
}

/* Estilos responsivos */
@media (max-width: 768px) {
    .dt24-distance-info {
        padding: 8px 12px;
        font-size: 0.85em;
    }

    .dt24-vendor-name {
        font-size: 1em;
    }

    .dt24-address-text {
        font-size: 0.9em;
    }
}
