/**
 * WC MP Booking Pro - Number Field Styles
 * Estilos para el template personalizado de campos de número
 * Protegidos con alta especificidad para evitar conflictos con temas
 * Version: 1.0.3
 */

/* Wrapper principal - Alta especificidad */
.mp-booking-pro-wrapper.mp-booking-pro-number-wrapper {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    max-width: 100% !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
}

.mp-booking-pro-wrapper.mp-booking-pro-number-wrapper * {
    box-sizing: border-box !important;
}

.mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-travelers-card {
    background: white !important;
    border-radius: 12px !important;
    padding: 5px !important;
    margin: 10px 0 !important;
    max-width: 100% !important;
    box-sizing: border-box !important;
}

.mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-number-total-info {
    font-size: 14px !important;
    color: #666 !important;
    margin-bottom: 5px !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    text-align: center !important;
    padding-bottom: 10px !important;
    border-bottom: 1px solid #f0f0f0 !important;
    line-height: normal !important;
}

.mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-travelers-container {
    display: flex !important;
    flex-direction: column !important;
    gap: 5px !important;
    width: 100% !important;
}

.mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-travelers-container:first-child {
    gap: 5px !important;
}

.mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-traveler-item {
    display: flex !important;
    align-items: center !important;
    justify-content: space-between !important;
    padding: 5px 0 !important;
    border-bottom: 1px solid #f8f9fa !important;
    width: 100% !important;
    box-sizing: border-box !important;
    gap: 5px !important;
}

.mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-traveler-item:last-child {
    border-bottom: none !important;
}

.mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-traveler-info {
    flex: 1 !important;
    min-width: 0 !important;
    padding-right: 15px !important;
}

.mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-traveler-label {
    display: block !important;
    font-weight: bold !important;
    font-size: 16px !important;
    color: #333 !important;
    margin: 0 !important;
    word-wrap: break-word !important;
    line-height: normal !important;
}

.mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-traveler-subtitle {
    font-weight: normal !important;
    color: #666 !important;
    font-size: 14px !important;
}

.mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-traveler-constraints {
    font-size: 12px !important;
    color: #999 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    line-height: 12px !important;
}

.mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-traveler-selector {
    flex: 0 0 auto !important;
    display: flex !important;
    align-items: center !important;
    gap: 0px !important;
    min-width: 0 !important;
}

.mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-traveler-price {
    flex: 0 0 auto !important;
    min-width: 75px !important;
    text-align: right !important;
}

.mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-price-amount {
    font-size: 16px !important;
    font-weight: bold !important;
    color: #333 !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    transition: color 0.2s ease !important;
}

.mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-price-amount.mp-price-zero {
    color: #999 !important;
    font-weight: normal !important;
    opacity: 0.7 !important;
}

.mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-number-btn {
    width: 30px !important;
    height: 30px !important;
    border: 2px solid #f26a1b !important;
    background: white !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease !important;
    font-size: 16px !important;
    font-weight: bold !important;
    color: #f26a1b !important;
    user-select: none !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1) !important;
    flex-shrink: 0 !important;
}

.mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-number-btn:hover {
    background: #f26a1b !important;
    color: white !important;
    transform: scale(1.05) !important;
    box-shadow: 0 4px 8px rgba(242, 106, 27, 0.3) !important;
}

.mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-number-btn.disabled {
    border-color: #e9ecef !important;
    color: #e9ecef !important;
    cursor: not-allowed !important;
    opacity: 0.5 !important;
    box-shadow: none !important;
}

.mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-number-btn.disabled:hover {
    background: white !important;
    color: #e9ecef !important;
    transform: none !important;
    box-shadow: none !important;
}

.mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-number-input-container {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-width: 50px !important;
    max-width: 70px !important;
    flex: 0 0 auto !important;
}

.mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-number-input {
    width: 100% !important;
    height: 40px !important;
    border: none !important;
    text-align: center !important;
    font-size: 18px !important;
    font-weight: bold !important;
    color: #333 !important;
    background: transparent !important;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important;
    pointer-events: none !important;
    padding: 0px 10px !important;
    -webkit-appearance: none !important;
    -moz-appearance: textfield !important;
    appearance: textfield !important;
    box-sizing: border-box !important;
    margin: 0 !important;
}

.mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-number-input::-webkit-outer-spin-button,
.mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-number-input::-webkit-inner-spin-button {
    -webkit-appearance: none !important;
    margin: 0 !important;
}

.mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-number-input:focus {
    outline: none !important;
    border: none !important;
    box-shadow: none !important;
}

.mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-number-icon {
    line-height: 1 !important;
    font-weight: bold !important;
    margin-top: -1px !important;
}

/* Override para WooCommerce */
.mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .wc-bookings-booking-form .form-field input[type=number] {
    width: 100% !important;
}

/* Responsive - Pantallas medianas (tablets) */
@media (max-width: 1024px) and (min-width: 481px) {
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-travelers-card {
        padding: 8px !important;
        margin: 8px 0 !important;
    }
    
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-travelers-container {
        gap: 5px !important;
    }
    
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-traveler-item {
        gap: 8px !important;
        padding: 4px 0 !important;
    }
    
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-traveler-info {
        padding-right: 8px !important;
    }
    
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-traveler-selector {
        gap: 0px !important;
    }
    
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-number-btn {
        width: 26px !important;
        height: 26px !important;
        font-size: 13px !important;
    }
    
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-number-input-container {
        min-width: 50px !important;
        max-width: 60px !important;
    }
    
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-number-input {
        font-size: 16px !important;
        padding: 0px 6px !important;
    }
    
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-traveler-label {
        font-size: 14px !important;
    }
    
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-price-amount {
        font-size: 14px !important;
    }
    
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-traveler-price {
        min-width: 60px !important;
    }
}

/* Responsive - Tablets pequeñas */
@media (max-width: 768px) {
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-travelers-card {
        padding: 10px !important;
        margin: 10px 0 !important;
    }
    
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-travelers-container {
        gap: 5px !important;
    }
    
    /* Mantener layout horizontal en tablets */
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-traveler-item {
        flex-direction: column !important;
        align-items: center !important;
        justify-content: space-between !important;
        gap: 2px !important;
        padding: 2px 0 !important;
    }
    
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-traveler-info {
        flex: 1 !important;
        padding-right: 8px !important;
        min-width: 0 !important;
    }
    
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-traveler-selector {
        flex: 0 0 auto !important;
        gap: 0px !important;
    }
    
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-number-btn {
        width: 26px !important;
        height: 26px !important;
        font-size: 13px !important;
    }
    
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-number-input-container {
        min-width: 50px !important;
        max-width: 60px !important;
    }
    
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-number-input {
        font-size: 15px !important;
    }
    
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-traveler-label {
        font-size: 14px !important;
    }
    
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-price-amount {
        font-size: 14px !important;
    }
}

@media (max-width: 480px) {
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-travelers-card {
        padding: 10px !important;
    }
    
    /* Solo en móviles muy pequeños cambiar a columna */
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-traveler-item {
        flex-direction: column !important;
        align-items: flex-start !important;
        gap: 12px !important;
        padding: 10px 0 !important;
    }
    
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-traveler-info {
        flex: 1 !important;
        padding-right: 0 !important;
        width: 100% !important;
    }
    
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-traveler-selector {
        flex: 0 0 auto !important;
        justify-content: center !important;
        width: 100% !important;
        gap: 0px !important;
    }
    
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-number-btn {
        width: 32px !important;
        height: 32px !important;
        font-size: 14px !important;
    }
    
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-number-input {
        font-size: 16px !important;
    }
    
    .mp-booking-pro-wrapper.mp-booking-pro-number-wrapper .mp-number-input-container {
        min-width: 70px !important;
    }
}
