/* Estilos para el selector de watchfaces de Garmin */

.gwe-container {
    width: 100% !important;
    max-width: none !important;
    margin: 0 !important;
    box-sizing: border-box !important;
    border-radius: 8px;
    font-family: inherit;
}

.gwe-title {
    text-align: center;
    margin-top: 0;
    margin-bottom: 20px;
    font-size: 1.4em;
}

/* Estilos para el modal de reemplazo */
.gwe-replace-file-selector {
    margin: 15px 0;
}

#gwe-replace-file-selected {
    background: #f0f0f0;
    padding: 5px 10px;
    border-radius: 3px;
    margin-top: 10px;
    word-break: break-all;
}


/* Asegurar que todos los elementos internos se expandan correctamente */
.gwe-model-selector,
.gwe-custom-select,
.gwe-select-button,
.gwe-actions,
.gwe-download-button {
    width: 100% !important;
    box-sizing: border-box !important;
}


.gwe-model-selector {
    margin-bottom: 20px;
}

.gwe-model-selector label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

/* Selector personalizado con búsqueda */
.gwe-custom-select {
    position: relative;
    width: 100%;
    margin-bottom: 15px;
}

.gwe-select-button {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gwe-select-arrow {
    transition: transform 0.3s;
}

.gwe-custom-select.open .gwe-select-arrow {
    transform: rotate(180deg);
}

.gwe-search-field {
    display: none;
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-top: none;
    border-bottom: none;
    background-color: #f8f8f8;
}

.gwe-options-container {
    display: none;
    position: absolute;
    width: 100%;
    max-height: 250px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-top: none;
    border-radius: 0 0 4px 4px;
    background-color: white;
    z-index: 10;
}

.gwe-custom-select.open .gwe-search-field,
.gwe-custom-select.open .gwe-options-container {
    display: block;
}

/* Estilos específicos para contenedores de Elementor */
.elementor-widget-shortcode .elementor-widget-container,
.elementor-widget-shortcode .elementor-shortcode {
    width: 100% !important;
}

.gwe-option {
    padding: 10px 15px;
    cursor: pointer;
}

.gwe-option:hover {
    background-color: #f0f0f0;
}

/* Botón de descarga */
.gwe-actions {
    text-align: center;
    margin-bottom: 15px;
    width: 100%;
}

.gwe-download-button {
    display: inline-block;
    line-height: 1;
    background-color: var(--e-global-color-primary, #61ce70);
    font-size: 15px;
    padding: 12px 24px;
    border-radius: 3px;
    color: #fff;
    fill: #fff;
    text-align: center;
    transition: all .3s;
    border: none;
    font-weight: 500;
}

.gwe-download-button:hover:not(:disabled) {
    background-color: var(--e-global-color-primary-hover, #61ce70);
    color: #fff;
    opacity: 0.9;
}


/* Estos estilos se aplican solo si el botón está deshabilitado */
.gwe-download-button:disabled {
    opacity: 0.7;
    cursor: not-allowed;
}

.gwe-message {
    padding: 10px 15px;
    margin-top: 15px;
    border-radius: 4px;
    text-align: center;
}

.gwe-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.gwe-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.gwe-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
}

.gwe-spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #2271b1;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    animation: gwe-spin 2s linear infinite;
    margin-right: 10px;
}

/* Estilo nativo del tema (heredado) */
.gwe-container input, 
.gwe-container select, 
.gwe-container button {
    font-family: inherit;
}

/* Animación */
@keyframes gwe-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 90%) {
    .gwe-container {
        width: 100%;
        padding: 15px;
    }
    
    .gwe-download-button {
        width: 100%;
    }
}