/* =========================================
   WOODROP IMPORT MODAL V5.1 (FIX CORTADO)
   ========================================= */

:root {
    --wd-purple: #7B61FF;
    --wd-purple-hover: #6347ea;
    --wd-green: #00b894;
    --wd-text: #2D3436;
    --wd-gray: #dfe6e9;
    --wd-radius: 12px;
}

/* Forzamos esquema de color claro globalmente en el modal */
.wd-modal-card, 
.woodrop-import-wrapper {
    color-scheme: light !important; 
}

/* --- Botones --- */
.wd-btn-main { background: var(--wd-purple) !important; color: #fff !important; border: none !important; padding: 12px 25px !important; border-radius: 50px !important; font-size: 1rem !important; font-weight: 600 !important; cursor: pointer; box-shadow: 0 4px 15px rgba(123, 97, 255, 0.3) !important; transition: all 0.3s ease !important; display: inline-flex; align-items: center; gap: 10px; width: 100%; justify-content: center; max-width: 350px; }
.wd-btn-main:hover { background: var(--wd-purple-hover) !important; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(123, 97, 255, 0.4) !important; }

/* --- Modal Base --- */
.wd-modal-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(4px); z-index: 999999; display: flex; align-items: center; justify-content: center; padding: 20px; }
.wd-modal-card { background: #fff; width: 100%; max-width: 450px; border-radius: 20px; box-shadow: 0 20px 50px rgba(0,0,0,0.2); overflow: hidden; animation: wdSlideUp 0.3s ease-out; }
@keyframes wdSlideUp { from { transform: translateY(50px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }

.wd-modal-header { background: #f8f9fa; padding: 15px 20px; display: flex; justify-content: space-between; align-items: center; border-bottom: 1px solid #eee; }
.wd-modal-header h3 { margin: 0; font-size: 1rem; color: #555; font-weight: 600; display: flex; gap: 8px; align-items: center; }
.wd-close-icon { background: none; border: none; font-size: 1.2rem; cursor: pointer; color: #999; }
.wd-modal-body { padding: 25px; }

.wd-product-summary { padding: 15px 20px; display: flex; align-items: center; gap: 15px; border-bottom: 1px solid #f0f0f0; }
.wd-product-summary img { width: 50px; height: 50px; border-radius: 8px; border: 1px solid #eee; object-fit: cover; }
.wd-product-summary span { font-weight: 600; color: var(--wd-text); font-size: 0.95rem; line-height: 1.3; }

/* --- INPUTS Y SELECTS --- */
.wd-input-group { margin-bottom: 20px; }
.wd-input-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 8px; color: #666; }

/* 🔥🔥 ZONA DE FIX ALINEACIÓN Y CORTE 🔥🔥 */
.wd-modal-body select,
.wd-modal-body input,
#woodrop-category-select,
.wd-input-group input,
.wd-select-wrapper select {
    /* 1. Reset de Sistema */
    color-scheme: light !important;
    appearance: none !important;
    -webkit-appearance: none !important;
    
    /* 2. Dimensiones Flexibles (Evita el corte) */
    width: 100%;
    height: auto !important;       /* Deja que el padding defina la altura */
    min-height: 48px !important;   /* Altura mínima cómoda */
    line-height: normal !important; /* Evita que la línea sea gigante o diminuta */
    
    /* 3. Espaciado Interno */
    padding: 12px 15px !important;
    
    /* 4. Estilos Visuales */
    border: 2px solid #eee !important;
    border-radius: 10px !important;
    font-size: 1.1rem !important;
    font-weight: 700 !important;
    outline: none;
    transition: 0.2s;
    
    /* 5. Colores (Negro sobre Blanco) */
    background-color: #ffffff !important;
    background: #ffffff !important;
    color: #222222 !important;
    -webkit-text-fill-color: #222222 !important;
    opacity: 1 !important;
}

/* Ajustes específicos para el Select */
#woodrop-category-select,
.wd-modal-body select, 
.wd-select-wrapper select {
    padding-right: 40px !important; /* Espacio extra a la derecha para la flecha */
    text-align: left;
    cursor: pointer;
    white-space: nowrap;      /* Evita que el texto salte de línea */
    text-overflow: ellipsis;  /* Pone ... si es muy largo */
}

/* Ajustes para el Input de Número */
.wd-modal-body input {
    text-align: center;
    color: var(--wd-purple) !important;
    -webkit-text-fill-color: var(--wd-purple) !important;
}

/* Focus States */
.wd-modal-body select:focus,
.wd-modal-body input:focus {
    border-color: var(--wd-purple) !important;
    box-shadow: 0 0 0 3px rgba(123, 97, 255, 0.1);
}

/* Flecha personalizada (Centrada Verticalmente) */
.wd-select-wrapper { position: relative; display: block; }
.wd-select-arrow { 
    position: absolute; 
    right: 15px; 
    top: 50%; 
    margin-top: -7px; /* Ajuste fino de centrado */
    color: var(--wd-purple); 
    pointer-events: none; 
    z-index: 10; 
    font-size: 0.9rem;
    height: 14px;
    line-height: 1;
}

/* Opciones del Dropdown */
.wd-modal-body select option {
    background-color: #ffffff !important;
    color: #000000 !important;
    padding: 10px;
}

/* --- Resto de UI --- */
.wd-price-preview { margin: 20px 0; padding: 15px; background: #f0fdf4; border: 1px solid #dcfce7; border-radius: 12px; text-align: center; }
.wd-price-preview span { display: block; font-size: 0.85rem; color: #166534; margin-bottom: 5px; }
.wd-price-preview strong { display: block; font-size: 1.8rem; color: var(--wd-green); line-height: 1; }

.wd-btn-confirm { width: 100%; padding: 15px; background: var(--wd-purple); color: white; border: none; border-radius: 50px; font-size: 1rem; font-weight: 600; cursor: pointer; transition: 0.2s; }
.wd-btn-confirm:hover { background: var(--wd-purple-hover); transform: translateY(-2px); }
.wd-btn-confirm:disabled { background: #ccc; cursor: not-allowed; transform: none; }

.wd-progress-container { margin-top: 20px; text-align: center; }
.wd-progress-bar { height: 8px; background: #eee; border-radius: 10px; overflow: hidden; margin-bottom: 8px; }
.wd-progress-fill { height: 100%; width: 0%; background: var(--wd-purple); transition: width 0.3s; animation: wdProgress 2s infinite; }
@keyframes wdProgress { 0% { width: 0%; } 50% { width: 70%; } 100% { width: 90%; } }
.wd-progress-text { font-size: 0.8rem; color: #666; animation: blink 1.5s infinite; }
@keyframes blink { 50% { opacity: 0.5; } }

.wd-success-state { background: #e6fcf5; border: 1px solid #c3fae8; padding: 20px; border-radius: var(--wd-radius); text-align: center; }
.wd-success-msg { color: var(--wd-green); margin-bottom: 15px; }
.wd-success-msg i { font-size: 2rem; margin-bottom: 10px; display: block; }
.wd-success-msg p { margin: 0; font-weight: 600; font-size: 0.95rem; }

.wd-action-buttons { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.wd-btn { padding: 8px 16px !important; border-radius: 8px !important; font-size: 0.85rem !important; font-weight: 600 !important; cursor: pointer; text-decoration: none !important; border: none !important; display: inline-flex; align-items: center; gap: 6px; transition: 0.2s; }
.wd-btn-dashboard { background: var(--wd-purple) !important; color: white !important; }
.wd-btn-reset { background: white !important; border: 1px solid #e0e0e0 !important; color: #666 !important; }